Keys in Database Management System
Keys in Database Management System
1
KEYS in
DBMS
2
Index
SQL
Keys Explain Keys Command
1 3 5
2 4 6
Types of Conclusion
Example
Keys
3
Keys in DBMS
4
Types
Candidate Key
5
Primary Key
Primary Key is the minimal super Key.
Ideally a primary key is composed of only a single attribute.
Primary key field cannot be null.
Its attribute values are never or very rarely changed.
SQL Command
SQL Command
CREATE TABLE EMPLOYEE(
…..,
FOREIGN KEY (Department_ID) REFERENCES EMPLOYEE(Department_ID)
………); 7
Super Key
8
Candidate Key
9
Alternate Key
10
Composite Key
Composite Key
11
Unique Key
SQL Command
13
Thanks!