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

Code Wars: Database Decisions for Application Development

Jennifer Reif
September 08, 2021

Code Wars: Database Decisions for Application Development

Data access and storage methods continue to grow and diversify. As data volumes and complexities grow, it is vital for developers to maximize application efficiency. Understanding the structure of data behind applications can make a big impact on the complexity of the application and queries. Maybe the data layer isn’t something that keeps developers up at night, but maybe it should.

In this session, we will compare and contrast databases connecting to a typical Java application to understand where each makes life easier or harder for you as the developer. From relational to NoSQL to graph, we will explore various types of data, the way it is stored, and how best to go about retrieving it. A live-coding demo will bring all this to life, as the presenter shows exactly how your database choices change how you write applications.

Github repositories: https://github.com/JMHReif?tab=repositories&q=code-wars&type=&language=&sort=

Jennifer Reif

September 08, 2021
Tweet

More Decks by Jennifer Reif

Other Decks in Technology

Transcript

  1. Code Wars Database Decisions for Application Development Jennifer Reif Email:

    [email protected] Twitter: @JMHReif LinkedIn: linkedin.com/in/jmhreif Github: GitHub.com/JMHReif Website: jmhreif.com
  2. Who Am I? • Developer relations engineer at Neo4j •

    Developer • Blogger • Conference speaker • Continuous learner + geek Jennifer Reif Email: [email protected] Twitter: @JMHReif LinkedIn: linkedin.com/in/jmhreif Github: GitHub.com/JMHReif Website: jmhreif.com
  3. Why should the database matter to us? • Long-term: •

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

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

    Order -> OrderedProduct <- Product • Mongo: Order { Product: [{}] } • Neo4j: Order -[INCLUDES]-> Product • @Query annotation (DSL syntax) • Maria: JPQL / SQL • Mongo: JSON-parameter / SQL • Neo4j: Cypher
  6. Key Differences • TL;DR - data model impacts app development

    • Fit data into a database that creates the… • Cleanest model • Simplest queries • Best application
  7. • GitHub projects: • MariaDB • Docker: github.com/JMHReif/docker-maria • Application:

    github.com/JMHReif/maria-code-wars • MongoDB • Docker: github.com/JMHReif/docker-mongo • Application: github.com/JMHReif/mongo-code-wars • Neo4j • Docker: github.com/JMHReif/docker-neo4j • Application: github.com/JMHReif/neo4j-code-wars • Db import fi les/scripts: github.com/JMHReif/code-wars-import-data-scripts • Spring Docs: spring.io/projects/spring-data Resources Jennifer Reif Email: [email protected] Twitter: @JMHReif LinkedIn: linkedin.com/in/jmhreif Github: GitHub.com/JMHReif Website: jmhreif.com