Chapter 3. Building the Data Schema

The data layer covers a lot, so it’s awesome that we have so many good tools to work with. Regardless of the tools you choose, you do need to understand what’s going on beneath the surface. When you start building your data schema, take your time to really write it out. The data schema drives everything for the app and any of its dependencies. Over time, it can become hard to update the schema without breaking everything.

Since you’ve already decided what kind of backend architecture to go with, you probably have an idea of how data will be related and what that data looks like. Making a diagram of how the data will be connected is going to help you and the team a lot because you’ll see the relationships.

That’s why this chapter is going to cover:

  • Initial considerations for setting up the data schema

  • Setting up a database

  • Using object relational mapping (ORM) tools

  • Writing data migrations in your database

  • Seeding the database with initial data

Get Full Stack JavaScript Strategies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.