InterviewSolution
Saved Bookmarks
| 1. |
Consider the following tables PATIENT and TEST and answer the questions that follow :Table: PATIENTPCODENAMEPHONEDTADMITTESTID6473Amit Sharma91235589915-JUN-2017T1027134Rose Mathew88674453612-NOV-2017T1018786Tina Sharma Arora88908876506-DEC-2017T1026477Vijay Shah71456744507-DEC-2017T5027658Venkat Fazal86554534337-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.Table: TESTTESTIDTESTNAMECOSTT101Platelet Count200.00T102Hemogram190.00T301Malaria Detection350.00T502Glucose Test150.00Name the Primary keys in both the tables and foreign key in 'PATIENT' table. |
|
Answer» PCODE is the primary key in PATIENT table and TESTID is the primary key in TEST table. because primary key of a relational table uniquely identifies each record in the table. TESTID is the foreign key in PATIENT table whose value is derived from the primary key of test table. |
|