Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Code Wars: How the database affects your application

Code Wars: How the database affects your application

Learn how different data sources and a variety of query languages impact the amount of code required to store and retrieve data. From relational to NoSQL to graph, we will explore various types of data - the way it is stored underneath and how best to go about retrieving it.

Jennifer Reif

March 08, 2019
Tweet

More Decks by Jennifer Reif

Other Decks in Technology

Transcript

  1. Who Am I? • Developer relations engineer at Neo4j •

    Developer • Blogger • Conference speaker • Continuous learner + geek Email: [email protected] Twitter: @JMHReif
  2. Why should the database matter to us? • Long-term: •

    Right tool for the right job • Future maintenance/improvement efforts • Short-term: • Forcing data into unnatural format • Data model confusion and iterations • Complex queries to handle business questions • Data storage can impact application development!
  3. Using Spring • Quick-start (Spring Initializr) • Reduce boilerplate (Spring

    Boot) • Consistent integration (Spring Data): • Annotation-based mapping for POJOs • Repository support via interface • Domain-specific language queries for each https://spring.io/projects/spring-data
  4. Key Differences • POJOs aligning with data models • Maria:

    Order -> OrderedProduct <- Product • Mongo: Order { Shipping: {}, OrderedProduct: [{}] } • Neo4j: Country <- Order -> Product • @Query annotation (DSL syntax) • Maria: JPQL / SQL • Mongo: JSON-parameter / SQL • Neo4j: Cypher • Business data set and use case
  5. • GitHub projects: • MariaDB • Docker: https://github.com/JMHReif/docker-maria • Application:

    https://github.com/JMHReif/maria-code-wars • MongoDB • Docker: https://github.com/JMHReif/docker-mongo • Application: https://github.com/JMHReif/mongo-code-wars • Neo4j • Docker: https://github.com/JMHReif/docker-neo4j • Application: https://github.com/JMHReif/neo4j-code-wars • Db import files/scripts: https://github.com/JMHReif/code-wars-import-data-scripts • Spring Docs: https://spring.io/projects/spring-data Resources [email protected] @JMHReif