9. An organisation wants to create a database EMPDEPENDENT to maintain following details about its employees and their dependent.
EMPLOYEE(AadharNumber, Name, Address, Department,EmployeeID)
DEPENDENT(EmployeeID, DependentName, Relationship)
a) Name the attributes of EMPLOYEE, which can be used as candidate keys.
Answer: AadharNumber, EmployeeId
b) The company wants to retrieve details of dependent of a particular employee. Name the tables and the key which are required to retrieve this detail.
Answer: Employee and Dependent tables linked via key EmployeeId
c) What is the degree of EMPLOYEE and DEPENDENT relation?
Answer: Degree of Employee : 5, Degree of Dependent : 3
10. School uniform is available at M/s Sheetal Private Limited. They have maintained SCHOOL_UNIFORM Database with two relations viz. UNIFORM and COST. The following figure shows database schema and its state.
a) Can they insert the following tuples to the UNIFORM Relation? Give reasons in support of your answer.
i) 7, Handkerchief, NULL
ii) 4, Ribbon, Red
iii) 8, NULL, White
Answer: (i) Yes, it can be inserted.
(ii) Yes, It can be inserted,
(iii) No. It cannot be inserted as UName cannot be NULL
b) Can they insert the following tuples to the COST Relation? Give reasons in support of your answer.
i) 7, S, 0
ii) 9, XL, 100
Answer: (i) NO, it cannot be inserted as price must be > 0.
(ii) Yes, it can be inserted.
11. In a multiplex, movies are screened in different auditoriums. One movie can be shown in more than one auditorium. In order to maintain the record of movies, the multiplex maintains a relational database consisting of two relations viz. MOVIE and AUDI respectively as shown below:
Movie(Movie_ID, MovieName, ReleaseDate)
Audi(AudiNo, Movie_ID, Seats, ScreenType, TicketPrice)
a) Is it correct to assign Movie_ID as the primary key in the MOVIE relation? If no, then suggest an appropriate primary key.
Answer: Yes, It is correct to assign Movie_ID as the primary key.
b) Is it correct to assign AudiNo as the primary key in the AUDI relation? If no, then suggest appropriate primary key.
Answer: No, AudiNo along with MovieID should be made the primary key. That is, the relation should have composite primary key as AudiNo + Movie_ID
c) Is there any foreign key in any of these relations?
Answer: MovieID
12. For the below given database STUDENT-PROJECT, answer the following:
a) Name primary key of each table.
Answer: Table STUDENT : RollNo ,
Table PROJECT : ProjectNo,
Table PROJECT_ASSIGNED : Registration_ID
b) Find foreign key(s) in table PROJECT-ASSIGNED.
Answer: ProjectNo
c) Is there any alternate key in table STUDENT? Give justification for your answer.
Answer: Name can be an alternate key as it stores unique values for each row.
d) Can a user assign duplicate value to the field RollNo of STUDENT table? Jusify.
Answer: No, RollNo being the primary key must be unique values for each row.
13. For the above given database STUDENT-PROJECT, can we perform the following operations?
a) Insert a student record with missing roll number value.
Answer: No
b) Insert a student record with missing registration number value.
Answer: Yes
c) Insert a project detail without submission-date.
Answer: Yes
d) Insert a record with registration ID IP-101-19 and ProjectNo 206 in table PROJECT-ASSIGNED.
Answer: No, because Registration Id IP-101-19 does not exists in Student Table, and ProjectNo 206 is also does not exists in Project Table.
Class 11 Informatics Practices – NCERT Book exercise Solution