Databases: SQL and NoSQL

13 min read

Every app must remember things: your orders, your messages, your marks. A database is where an app keeps this data safely. In this lesson you learn SQL and NoSQL databases, what an index is, and how to choose between them.

New words

Database
A program that stores data safely and finds it fast.
SQL
A database that keeps data in tables with rows and columns.
NoSQL
A database that keeps data as documents or key-value pairs.
Primary key
A column whose value is different in every row, like a roll number.
Index
A small extra list that helps the database find rows fast.
Schema
The fixed plan of a table: its columns and their types.

What you will learn

  1. Why does an app need a database?
  2. SQL: tables, rows and columns
  3. Relationships: students and marks
  4. NoSQL: documents and key-value
  5. Indexes: the back of a textbook
  6. Try it: the food app orders
  7. SQL or NoSQL: what do you gain and lose?
  8. In a real system
  9. Interview tip
  10. Key takeaways

10 quiz questions at the end.

Start this lesson

The full lesson, with interactive demos and the quiz, opens after you sign in with Google. It is free.

All lessons · Back to the roadmap