Relational Databases Overview
A relational database stores data in tables, which are made up of rows and columns. Each table represents a specific entity, and relationships can be formed between them using keys.
- Primary Key: Uniquely identifies each row in a table.
- Foreign Key: References the primary key in another table to create relationships.
Example tables:
Users(id, name, email)
Orders(id, user_id, total)
These tables are linked via user_id
which is a foreign key.