Choosing the right database

Stage 1 of 9 · 6 lessons · ~1 week

Start from the data, not the product

Before picking a database, describe the data: its shape, how it is read and written, how correct it must be and how much there will be. These answers choose the database for you.

Start: Structured, semi-structured and unstructured data

Lessons· one lesson for each topic, in this order

  1. 1Structured, semi-structured and unstructured data
  2. 2Access patterns: the questions your app asks
  3. 3Reads, writes and how much data
  4. 4How correct must the data be, and how fast
  5. 5The questions to ask before naming a product
  6. 6SQL versus NoSQL, without the myths

Do this

  • Choose one project you are building or want to build and write two sentences about it.
  • List its data and label each item structured, semi-structured or unstructured.
  • Write its five most important access patterns, with how often each runs.
  • Estimate the number of records after one year for the biggest table or collection.
  • Mark which data must be exact and which can be a little behind.
  • Save all of this as a short data brief in the project README.

Start with· follow one of these

Practise

  • Pick any dataset and practise describing its shape, size and the questions you would ask of it

Keep handy

  • The data types chapter shows how much one relational database can store, JSON included

  • The data modelling introduction shows the same questions from the document side

Also worth your time

Before moving on: A one-page data brief for a project you care about: its data shapes, top five access patterns, rough sizes, which data must be exact, and any search, similarity or reporting needs.

Tauseef's advice
Every stage after this one ends with "use it when" and "avoid it when". Those only make sense once you know your own data. Pick one real project now, even a small one like a society event app or a family shop, and carry its data brief through the whole roadmap. If you are stuck between the two most common picks, sefism.com/questions/postgres-or-mongodb-for-my-project/ walks through it.

Mark this stage as not done?