We started the class with several questions to refresh the previous lesson on last week (which was about DATABASE)
"Relationship"
*related to each other
Why?
- To combine/relate the tables after we normalize it
How we relate one to another tables?
- Conditions (primary key, foreign key & type of relationship)
- Primary key- a field (column) that uniquely identifies each record in the table [eg: matric numbers]
- Foreign key- a field added to a table in order to relate record to another table [when a primary key goes to another table, it becomes a foreign key]-just like a foreign student, we call them foreign when they study at another country
- Types of relationship:
- One-to-one relationship-only have one related record [for confidential & general information]
- One to many
- Many to many
No comments:
Post a Comment