Understanding Composite Keys in DBMS: Definition, Use Cases, and Examples

Rumman Ansari   Software Engineer   2024-07-19 02:39:55   6436  Share
Subject Syllabus DetailsSubject Details
☰ TContent
☰Fullscreen

Table of Content:

Key that consists of two or more attributes that uniquely identify any record in a table is called Composite key. But the attributes which together form the Composite key are not a key independentely or individually.

In the above picture we have a Score table which stores the marks scored by a student in a particular subject.

In this table student_id and subject_id together will form the primary key, hence it is a composite key.



Stay Ahead of the Curve! Check out these trending topics and sharpen your skills.