List all the primary keys and foreign for the following thre
List all the primary keys and foreign for the following three tables.
Students SNum 101 GPA 3.2 1.8 3.8 Enrollments SNum CNum Grade 101 101 102 103 Courses CNum Ctitl IS380 Database IS385 Systems Sname Major Andy IS Instr IS380 IS385 A IS380 A IS355 B Lee Smith 103 Cindy IS IS355 Telecomm LeeSolution
Primary Key :-
* A PRIMARY KEY is a key in a table which uniquely identifies each record in a database table.
List all the primary keys :-
FOREIGN KEY :-
* A FOREIGN KEY is a key in one table points to a PRIMARY KEY in another table.
List all the foreign keys :-
Explanation :-
The SNum column in the Enrollments Table points to the SNum column in the Students Table.
The SNum column in the Students Table is a PRIMARY KEY.
The SNum column in the Enrollments Table is a FOREIGN KEY.
at the same time...
The CNum column in the Courses Table points to the CNum column in the Enrollments Table.
The CNum column in the Enrollments Table is a PRIMARY KEY.
The CNum column in the Courses Table is a FOREIGN KEY
| PRIMARY KEY | IN WHICH TABLE ? |
| SNum | In students Table |
| CNum | In Enrollments Table |
| CNum | In Courses Table |
