Save 37% off PRO during our Black Friday Sale! »

Code Wars: Database Decisions for Application Development

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=

10f2b035856eef2b59c02267e3ee9e63?s=128

Jennifer Reif

September 08, 2021
Tweet

Transcript

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

    jennifer.reif@neo4j.com 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: jennifer.reif@neo4j.com 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. None
  5. Use case - Northwind sales system

  6. 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
  7. Data Models Relational - MariaDB Document - MongoDB Graph -

    Neo4j
  8. Data Models

  9. Data Models Relational - MariaDB Document - MongoDB Graph -

    Neo4j
  10. Data Models

  11. Data Models Relational - MariaDB Document - MongoDB Graph -

    Neo4j
  12. Data Models

  13. Demo Time!

  14. 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
  15. Key Differences • TL;DR - data model impacts app development

    • Fit data into a database that creates the… • Cleanest model • Simplest queries • Best application
  16. • 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: jennifer.reif@neo4j.com Twitter: @JMHReif LinkedIn: linkedin.com/in/jmhreif Github: GitHub.com/JMHReif Website: jmhreif.com