Give any two advantages of relating a table in a database
•Relations in DBMS are set up between the tables to control data redundancy and inconsistency.
•This helps in proper maintenance of a database by checking that neither the records are duplicated nor there is variable data value for a particular field in two or more tables.
•If you set up relations between tables, then adding or updating a record in one table reflect the changes in all the related tables.
One-to-Many relationship explain with an example.
This is one of the most common types of relationship between the tables in a database. As the name says, in this type of relationship, one specific record of the master table has more than one corresponding records in the related transaction table. For example, one teacher can teach multiple students or multiple classes, or one person can sell multiple products
What are the different types of Relationships?
Primarily three types of relationships can
be set up between two tables in a relational database
These are:
(i) One-to-One
(ii) One-to-many
(iii) Many-to-Many
What is referential integrity?
According to the principle of referential integrity, no
unmatched foreign key values should exist in the
database.
One-to-One relationship Explain with a reallife example
In a one-to-one relationship, one record in a table is associated with one and only one record in another table. For example, in a school database, each student has only one student ID, and each student ID is assigned to only one perso
Many-to-Many relationship explain with an example
In this type of relationship, there will be multiple records in the master table that correspond to multiple records in the transaction table as well
For example, a teacher in a school may hold multiple responsibilities such as class teacher, an activity in charge or examination in-charge