English

For the above-given database STUDENT-PROJECT, answer the following: Name the primary key of each table. Find foreign key(s) in table PROJECT-ASSIGNED. Is there any alternate key in table STUDENT?

Advertisements
Advertisements

Question

Student Project Database
Table: STUDENT
Roll No Name Class Section Registration_ID
11 Mohan XI 1 IP-101-15
12 Sohan XI 2 IP-104-15
21 John XII 1 CS-103-14
22 Meena XII 2 CS-101-14
23 Juhi XII 2 CS-101-10
Table: PROJECT
ProjectNo PName SubmissionDate    
101 Airline Database 12/01/2018    
102 Library Database 12/01/2018    
103 Employee Database 15/01/2018    
104 Student Database 12/01/2018    
105 Inventory Database 15/01/2018    
106 Railway Database 15/01/2018    
PROJECT ASSIGNED      
Registration_ID ProjectNo      
IP-101-15 101      
IP-104-15 103      
CS-103-14 102      
CS-101-14 105      
CS-101-10 104      
 
For the above-given database STUDENT-PROJECT, answer the following:
  1. Name the primary key of each table.
  2. Find foreign key(s) in table PROJECT-ASSIGNED.
  3. Is there any alternate key in table STUDENT? Give justification for your answer.
  4. Can a user assign duplicate value to the field RollNo of STUDENT table? Justify.
Short/Brief Note
Advertisements

Solution

  1. The primary key of Table STUDENT: Roll No.
    The primary key of Table PROJECT: Project No.
    The primary key of Table PROJECT ASSIGNED: Registration_ID.
  2. Foreign key in table PROJECT ASSIGNED: ProjectNo.
  3. Yes, the Name is the alternate key in table STUDENT. In this table, Roll No. and Name is the candidate key in which Roll No. is selected as the primary key then the remaining key (Name) is an alternate key.
  4. No, a user cannot assign duplicate value to the field RollNo, of the STUDENT table because Roll No. is the primary key and the primary key uniquely identifies each record in a table.
shaalaa.com
Keys in a Relational Database
  Is there an error in this question or solution?
Chapter 8: Database Concepts - Exercise [Page 130]

APPEARS IN

NCERT Computer Science [English] Class 12
Chapter 8 Database Concepts
Exercise | Q 12. | Page 130
NCERT Informatics Practices [English] Class 11
Chapter 7 Database Concepts
Exercise | Q 12. | Page 142
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×