What does a database schema describe?
Options
- The physical building in which the servers are placed
- The structure of the data: tables, columns, types and relations (Correct option)
- The password rules that the database enforces for users
- The schedule on which the backups of the data are taken
Answer
The structure of the data: which tables exist, their columns and types, and how they relate
Why
The schema is the blueprint of a database.
Example: a table users with columns id (number), email (text), created_at (date), and a table orders with a user_id that points to users.id.
Changing the schema (adding a column, for example) is called a migration.
Remember
Schema = the structure of the data.