0% found this document useful (0 votes)
27 views3 pages

Class 10 (CH-10)

Uploaded by

ictlab1514013
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views3 pages

Class 10 (CH-10)

Uploaded by

ictlab1514013
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CHAPTER-10(WORKING WITH MULTIPLE TABLES)

Ques 1: Give any two advantages of relating a table in a database.


Ans: Advantages of relating a table in a database are:
a) A relationship can help prevent data redundancy.
b) Creating relationships between tables restricts the user from entering invalid data in the
referenced fields.
c) Any updation in the master table is automatically reflected in the transaction tables.

Ques: 2 How is redundancy or inconsistency controlled in a database? Explain with an example.


Ans: Relations 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.

Ques: 3 Define referential integrity. Who maintains referential integrity in a database?


Ans: Referential integrity is used to maintain accuracy and consistency of data in a relationship.
According to the principle of referential integrity , no unmatched foreign key values should exist in
the database.
The referential integrity in a database is maintained by DBMS.

Ques: 4 Differentiate between one-to-one relationship and one-to-many relationship. Give suitable
examples to explain your answer.
Ans:
One-to-One One-to-Many
In this type of relationship, one specific record In this type of relationship, one specific record
of master table has one and only one of master table has more than one corresponding
corresponding record in the related transaction record in the related transaction table.
table.

Example: One-to-One
Table: Student_details
AdmissionNo Name Father’s name Class DoB
1001 Neha DK Bose 10 10/10/2004 Here AdmissionNo is primary key
1005 Sonia Tej Singh 9 11/05/2005
1110 Ruhi R Reddy 10 05/12/2004
1002 Shivani Rajesh Jain 7 23/11/2007
1134 Priya Pawan Sharma 10 12/09/2004

Table:Student_Result
RollNo AdmissionNo Class Marks
1 1001 10 78 Here AdmissionNo is foreign key. RollNo is
2 1110 10 65 the primary key.
3 1134 10 53
Only One Corresponding Record
Fo example, the record for AdmissionNo in the master table (Student_details) will have only one
corresponding record of same value of AdmissionNo in the transaction table of student_Result. This
is because no two students will be given same admission number.
Example: One-to-Many
Table: Teacher_details
Teacher_id Teacher_Name Subject
T002 Aarti Hindi
T123 Seema Social science
T009 Pinki Sanskrit
T342 Bhawna Science
T765 Nisha History

Table: Class_Allocation
Class Section Subject Teacher_id
10 A Hindi T002 Multiple corresponding record
10 A Science T342
10 B Hindi T002
10 A History T765
9 C History T765
8 A History T765

For example, one teacher can teach multiple students or multiple classes. So we can say that there is
a one-to-many relationship between a teacher and class or teacher and students.

Ques:5 Explain Many-to-Many relationship with an example.


Ans: 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: Many-to-Many

Table: Department_Incharge

Department Teacher_id
Examination T002
Discipline T765
Co_Curricular T056
Time Table T002
Website Update T765
Table: Activity-duty
Activity Department Teacher_id
UT-1 Examination T002
TERM-1 Examination T002
Home work upload Website Update T765
Timetable upload Website Update T765
Inter-house Dance Co_Curricular T056
Inter-class Debate Co_Curricular T056
Discipline duties Discipline T765

For example, a teacher in a school may hold multiple responsibilities such as class teacher, an
activity incharge or examination incharge. For each responsibility the teacher might be attached
with multiple students. So, this type of relationship will be many-to-many relationship.
Similarly, a shopkeeper may sell multiple products to multiple customers. So, many-to-
many relationship exists between a product and a customer.

You might also like