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

Code Wars: How the database affects your applic...

Jennifer Reif
September 16, 2019

Code Wars: How the database affects your application

We know that different business needs and standards drive toward one technology or another, but how can we truly know which is the best technology for the job? In this session, learn how different datasources and a variety of query languages impact the amount of code required for storing and retrieving data. From relational to NoSQL to graph, the presentation explores various types of data—the way it is stored underneath and how best to go about retrieving it.

Jennifer Reif

September 16, 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 • TL;DR - data model…data 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