Skip to content
Think & Reflect · Q3
Q.

Name foreign keys in table ATTENDANCE and STUDENT. Is there any foreign key in table GUARDIAN.

Attribute NameData typeConstraint
RollNumberINTPRIMARY KEY
SNameVARCHAR(20)NOT NULL
SDateofBirthDATENOT NULL
GUIDCHAR(12)FOREIGN KEY

Table: STUDENT

Attribute NameData typeConstraint
GUIDCHAR(12)PRIMARY KEY
GNameVARCHAR(20)NOT NULL
GPhoneCHAR(10)NULL UNIQUE
GAddressVARCHAR(30)NOT NULL

Table: GUARDIAN

Attribute NameData typeConstraint
AttendanceDateDATEPRIMARY KEY*
RollNumberINTPRIMARY KEY* and FOREIGN KEY
AttendanceStatusCHAR(1)NOT NULL

Table: ATTENDANCE — * = part of composite primary key.

Puducherry CbseNCERTSubjective· 2mImportance★★★★★est
54% · 51/95 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

This question tests your understanding of foreign keys — a constraint that links a column in one table to the primary key of another. In the given schema, ATTENDANCE has a foreign key referencing STUDENT, and STUDENT has a foreign key referencing GUARDIAN. GUARDIAN itself has no foreign key.

This is a plain theory question about database schema design — specifically, identifying foreign keys from a table definition. Let's walk through each table.


STUDENT table

The schema says: GUID CHAR(12) FOREIGN KEY. That means the GUID column in STUDENT is a foreign key. It must reference the primary key of some other table — and the only table with GUID as its primary key is GUARDIAN. So STUDENT has one foreign key: GUID → GUARDIAN(GUID).

ATTENDANCE table

The schema says: RollNumber INT PRIMARY KEY* and FOREIGN KEY. The asterisk means it's part of the composite primary key (along with AttendanceDate), but it's also explicitly declared as a foreign key. That foreign key must reference the RollNumber column in STUDENT (the only table with RollNumber as primary key). So ATTENDANCE has one foreign key: RollNumber → STUDENT(RollNumber).

GUARDIAN table …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.