Databases: SQL and NoSQL
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
- Why does an app need a database?
- SQL: tables, rows and columns
- Relationships: students and marks
- NoSQL: documents and key-value
- Indexes: the back of a textbook
- Try it: the food app orders
- SQL or NoSQL: what do you gain and lose?
- In a real system
- Interview tip
- Key takeaways
10 quiz questions at the end.
The full lesson, with interactive demos and the quiz, opens after you sign in with Google. It is free.