InterviewSolution
Saved Bookmarks
| 1. |
Consider the following tables PATIENT and TEST and answer the questions that follow :PCODENAMEPHONEDTADMITTESTID6473Amit Sharma91235689919 - JUN - 2017T1027134Rose Mathew88674453612 - NOV - 2017T1018786Tina Sharma Arora88908876506 - DEC - 2017T1026477Vijay Shah71456744507 - DEC - 2017T5027658Venkat Fazal86554534331 - DEC - 2017T101Note : NAME holds the Names of patients. DTADMIT holds dates on which a patient was admitted to hospital. TESTID holds Ids of Medical tests done on patients.TESTIDTESTNAMECOSTT101Platelet Count200.00T102Hemogram190.00T301Malaria Detection350.00T502Glucose test150.00Name the Primary keys in both the tables and foreign key in ‘PATIENT’ table. State the reason for your choice. |
|
Answer» Primary key in PATIENT and TEST tables are PCODE and TESTID respectively. Because primary key of a relational table uniquely identifies each record. Foreign key in PATIENT table is TESTID whose value is derived from the primary key (TESTID) of another table (TEST). |
|