Database NoteS 10 Notes
Database NoteS 10 Notes
Student table
Admissio Full Name Class Date of Birth Subject
n No s
studyin
g
Composite Primary Key
🠶 What is Composite Primary Key?
The primary key which consists of two or more columns of a table uniquely identifies a record is called
Composite Primary Key.
Sport Table
Foreign Key
🠶 If a field of one table can be used to uniquely identify rows of another table, is called the foreign key.
🠶 This key builds connection of two tables.
Disadvantages of data duplication
1. One-to-One (1:1)
2. One-to-Many(1:m)
3. Many-to Many (m:n)
One-to-One Relationship(1:1)
🠶 If only a row of a table is related to a row of another table, it is
called a one-to-one relationship.
One-to-Many Relationship(1:m)
🠶 If each record of a table is related to several records of the other
table, this is called a one-to-many relationship.
Many-to-Many Relationship(m:n)
🠶 If a record of a table is related to several records of another table
and if a record of that related table is related to several records of
the other table, there is a many-to-many relationship between
those two tables.