A primary key is a column in a table that uniquely identifies the rows in that table.
In the above ER-Diagram there are 5 Primary Key :
- c_code → (c_name, course_fees)
Attribute c_code uniquely identifies each row in course table. So c_code is the Primary Key of the course table. - f_code → (f_name, f_address, f_phone, f_qualification)
Attribute f_code uniquely identifies each row in faculty table. So f_code is the Primary Key of the faculty table. - s_code → (s_name, s_address, s_phone)
Attribute s_code uniquely identifies each row in student table. So s_code is the Primary Key of the student table. - exam_code → (week_number, full_marks)
Attribute exam_code uniquely identifies each row in test_schedule table. So exam_code is the Primary Key of the test_schedule table. - class_code → (duration, class_type, date_and_time)
Attribute class_code uniquely identifies each row in classes table. So class_code is the Primary Key of the classes table.