Working with multiple tables
A. Multiple choice questions
Q1. Which of the following actions can be performed
once the tables are created in a database?
(a) Add a field in a table
(b) Rename a table
(c) Delete a table
(d) All of the above
Ans. (d) All of the above
Q2. Which of the following is checked by a DBMS?
(a) Redundancy
(b) Inconsistency
(c) Both (a) and (b)
(d) Neither (a) nor (b)
Ans. (c) Both (a) and (b)
Q3. Which of the following is required to set a
relationship between the two tables?
(a) Both the tables must be in different databases
(b) Both the tables must have a common field
(c) Both the tables must have the same name
(d) Both tables must be stored in documents folder
only.
Ans. (b) Both the tables must have a common field
Q4. If a record is added in a master table, which of
the following is NOT true for transaction table
(a) The record in the master table is called the
master record
(b) The corresponding record in transaction table can
only be entered once.
(c) The record in the transaction table is called the
transaction record.
(d) It is possible to add a record in the master table
And.(b) The corresponding record in transaction table
can only be entered once.
Q5. Which type of relationship exists between a
student and the subjects studied by him/her?
(a) One-to-one
(b) One-to-many
(c) Many-to-many
(d) All of the above
Ans. (b) One-to-many
Q6. Consider the following tables. Which type of
relationship can be established between the two
tables?
(a) One-to-one
(b) One-to-many
(c) Many-to-many
(d) None of the above
Ans. (b) One-to-many
Q7. Which of the following menus contains the
Relationship option?
(a) Edit
(b) File
(c) Tools
(d) View
Ans. (c) Tools
Q8. The list of tables to be added is displayed in
________dialog box in the Relationship the Screen.
(a) Add Tables
(b) Add Databases
(c) Both (a) and (b)
(d) Neither (a) nor (b)
Ans. (a) Add Tables
Q9. In the relationship design screen, the relationship
between the two tables is done using_______
operation
(a) Click
(b) Double Click
(c) Drag and Drop
(d) Right click
Ans. (c) Drag and Drop
Q10. Which of the following is NOT an option that can
be used to maintain referential integrity in a
database?
(a) No Action
(b) Set NULL %
(c) Set Default
(d) Set Value
Ans. (d) Set Value
B.State whether the following statements are
True or False
1. Redundancy is preferred in a database.
Ans. 1. Redundancy is preferred in a database. False
2. In a table, a record for a particular entity should not
be repeated.
Ans. 2. In a table, a record for a particular entity should
not be repeated. True
3. A single field should always have only one data
value.
Ans. 3. A single field should always have only one data
value. False
4. If a table is edited, the records already entered in it
are deleted.
Ans. 4. If a table is edited, the records already entered
in it are deleted. False
5. The record in master table should be entered before
the corresponding record is entered in the transaction
table.
Ans. 5. The record in master table should be entered
before the corresponding record is entered in the
transaction table. True
6. In one-to-many relationship, one specific record of
the master table has more than one corresponding
records in the related transaction table.
Ans. 6. In one-to-many relationship, one specific record
of the master table has more than one corresponding
records in the related transaction table. True
7. The Relationship option is present in the Widows
menu.
Ans. 7. The Relationship option is present in the Widows
menu. False
8. In a database, the referential integrity is maintained
by the user.
Ans. 8. In a database, the referential integrity is
maintained by the user. False
9. A relationship is always set between the tables based
on a common field.
Ans. 9. A relationship is always set between the tables
based on a common field. True
10. If the master record is deleted, the transaction
records will always be deleted.
Ans. 10. If the master record is deleted, the transaction
records will always be deleted. False
C.Fill in the blanks
1.A table to be edited is displayed in ________________
view.
Ans. 1. A table to be edited is displayed in Design view.
2.The most important prerequisite for setting a
relationship between the two tables is that there must
be a __________ between them.
Ans. 2. The most important prerequisite for setting a
relationship between the two tables is that there must
be a Common field between them.
3.In __________ relationship, one specific record of a
master table has one and only one corresponding
record in the transaction table.
Ans. 3. In One-to-One relationship, one specific record
of a master table has one and only one corresponding
record in the transaction table.
4.________________ is one of the most common types of
relationship between the tables in a database.
Ans. 4. One-to-Many relationship is one of the most
common types of relationship between the tables in a
database.
5.A record being entered in a __________ table must
always exist in a __________ table.
Ans. 5. A record being entered in a transaction table
must always exist in a master table.
6.The principle of __________ helps prevent missing data
by keeping deleted data from getting out of sync.
Ans. 6. The principle of referential integrity helps
prevent missing data by keeping deleted data from
getting out of sync.
7.Creating __________ between tables restricts the user
from entering invalid data in the referenced fields.
Ans. 7. Creating relationship between tables restricts
the user from entering invalid data in the referenced
fields.
8.Data integrity is maintained by _________________.
Ans. 8. Data integrity is maintained by DBMS.
9.A relationship between customers and products is an
example of _____ relationship.
Ans. 9. A relationship between customers and products
is an example of Many-to-Many relationship.
10.The ______ window is used to set relationships
between the tables.
Ans. 10. The Relationship design window is used to set
relationships between the tables.
D.Answer the following questions
Q1. Give any two advantages of relatinga table in a
database.
Ans. Two advantages of relating a table in a database
are:
1. A relationship can help prevent data
redundancy.
2. Creating relationships between tables restricts
the user from entering invalid data in the
referenced fields.
3. Any updation in the master table is
automatically reflected in the transaction tables.
Q2. How is redundancy or inconsistency controlled in a
database? Explain with an example.
Ans. Redundancy or inconsistency is controlled in a
database by setting the relationship between tables
which help in checking that neither the records are
duplicated nor there is variable data value for a
particular field in two or more tables. After creating
relationship between table, then adding or updating a
record in one table reflect the changes in all the related
tables.
Q3. Define referential integrity. Who maintains
referential integrity in a database?
Ans. Referential integrity refers to the relationship
between tables. Referential integrity is used to maintain
accuracy and consistency of data in a relationship.
LibreOffice Base will allow only that corresponding
record to be entered in the transaction table which
already exists in the master table. DBMS maintains
referential integrity in a database.
Q4. Differentiate between one to one relationship and
one to many relationship. Give suitable examples to
explain your answer.
Ans. One-to-One relationship: In this type of
relationship, one specific record of a master table has
one and only one corresponding record in the
transaction table.
One-to-Many relationship: 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 example.
Q5. Explain many to many relationship with an
HomeWork Upload Timetable Upload Chemistry
Geography Maths Maths
Ans. Many-to-Many relationship: 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.
English For example, a teacher in a school may hold
multiple responsibilities such as class teacher, an
activity incharge Computers or examination in-
charge.For each responsibility the teacher might be
attached with multiple students.