
Composite key
A composite key is a combination of two or more columns (attributes) in a database table that together uniquely identify each record. Unlike a single primary key, which uses just one column, a composite key relies on multiple columns working together to ensure each entry is distinct. For example, in a table recording course enrollments, the combination of Student ID and Course ID can serve as a composite key, because neither alone uniquely identifies a record, but together they do. This approach helps maintain data integrity and accurately link related information.