KnowledgeBoat Logo
|

Computer Science

For the below given database STUDENT-PROJECT, answer the following:

(a) Name primary key of each table.

(b) Find foreign key(s) in table PROJECT-ASSIGNED.

(c) Is there any alternate key in table STUDENT? Give justification for your answer.

(d) Can a user assign duplicate value to the field RollNo of STUDENT table? Justify.

Student Project Database

Table: STUDENT

Roll NoNameClassSectionRegistration_ID
11MohanXI1IP-101-15
12SohanXI2IP-104-15
21JohnXII1CS-103-14
22MeenaXII2CS-101-14
23JuhiXII2CS-101-10

Table: PROJECT

ProjectNoPNameSubmissionDate
101Airline Database12/01/2018
102Library Database12/01/2018
103Employee Database15/01/2018
104Student Database12/01/2018
105Inventory Database15/01/2018
106Railway Database15/01/2018

Table: PROJECT ASSIGNED

Registration_IDProjectNo
IP-101-15101
IP-104-15103
CS-103-14102
CS-101-14105
CS-101-10104

Relational Database

2 Likes

Answer

(a) Primary key of each table:

STUDENT: Roll No.
PROJECT: ProjectNo.
PROJECT ASSIGNED: Registration_ID.

(b) The ProjectNo column in the PROJECT ASSIGNED table is a foreign key that references the ProjectNo column in the PROJECT table.

(c) In the STUDENT table, the Registration_ID column serves as an alternate key since it uniquely identifies each student.

(d) No, a user cannot assign a duplicate value to the Roll No field of the STUDENT table because Roll No is the primary key of the table and it must be unique.

Answered By

1 Like


Related Questions