Database Design - II
Each table in a relational database is made unique by designating a 'primary key' - a column or set of columns that have unique values. A table can have only one primary key. A 'foreign key' is a column in one table that references the primary key of another table.
There are 3 types of relationships amongst two tables:
- One-to-One - For each row in the first table, there is atmost one row in the second table.
- One-to-Many - For each row in the first table, there can be zero, one, or many rows in the second table, but for each row in the second table, there is exactly one row in the first table.