
- DBMS Tutorial
- DBMS - Home
- DBMS - Overview
- DBMS - Architecture
- DBMS - Data Models
- DBMS - Data Schemas
- DBMS - Data Independence
- Entity Relationship Model
- DBMS - ER Model Basic Concepts
- DBMS - ER Diagram Representation
- DBMS - Generalization, Aggregation
- Relational Model
- DBMS - Codd's Rules
- DBMS - Relational Data Model
- DBMS - Relational Algebra
- DBMS - ER to Relational Model
- DBMS- SQL Overview
- Relational Database Design
- DBMS - Database Normalization
- DBMS - Database Joins
- Storage and File Structure
- DBMS - Storage System
- DBMS - File Structure
- Indexing and Hashing
- DBMS - Indexing
- DBMS - Hashing
- Transaction And Concurrency
- DBMS - Transaction
- DBMS - Concurrency Control
- DBMS - Deadlock
- Backup and Recovery
- DBMS - Data Backup
- DBMS - Data Recovery
- DBMS Useful Resources
- DBMS - Quick Guide
- DBMS - Useful Resources
- DBMS - Discussion
Composite Key in RDBMS
A primary key having two or more attributes is called composite key. It is a combination of two or more columns.
An example can be −
Here our composite key is OrderID and ProductID −
{OrderID, ProductID} |
Let us see another example −
<Student>
StudentID | StudentEnrollNo | StudentMarks | StudentPercentage |
S001 | 0721722 | 570 | 90 |
S002 | 0721790 | 490 | 80 |
S003 | 0721766 | 440 | 86 |
Above, our composite keys are StudentID and StudentEnrollNo. The table has two attributes as primary key.
Therefore, the Primary Key consisting of two or more attribute is called Composite Key.
- Related Articles
- Secondary Key in RDBMS
- Super Key in RDBMS
- Surrogate Key in RDBMS
- Candidate Key in RDBMS
- Alternate Key in RDBMS
- Foreign Key in RDBMS
- Unique Key in RDBMS
- Finding Duplicate Rows in MySQL (Composite Key)?
- ALTER TABLE to add a composite primary key in MySQL?
- How to form a composite key to be unique in MySQL?
- How to identify composite primary key in any MySQL database table?
- RDBMS terminologies
- Referential Integrity Rule in RDBMS
- Entity Integrity Rule in RDBMS
- Future of RDBMS

Advertisements