Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
1.5k views
in Information Technology by (45.3k points)
closed by

Consider the following tables PATIENT and TEST and answer the questions that follow :

PCODE NAME PHONE DTADMIT TESTID
6473 Amit Sharma 912356899 19 - JUN - 2017 T102
7134 Rose Mathew 886744536 12 - NOV - 2017 T101
8786 Tina Sharma Arora 889088765 06 - DEC - 2017 T102
6477 Vijay Shah 714567445 07 - DEC - 2017 T502
7658 Venkat Fazal 865545343 31 - DEC - 2017 T101

Note : 

  • 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.
TESTID TESTNAME COST
T101 Platelet Count 200.00
T102 Hemogram 190.00
T301 Malaria Detection 350.00
T502 Glucose test 150.00

Name the Primary keys in both the tables and foreign key in ‘PATIENT’ table. State the reason for your choice.

1 Answer

+1 vote
by (50.9k points)
selected by
 
Best 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).

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...