Key Integrity Constraints
Set of Attributes K, whose values uniquely identify a Tuple of Relation is called Key. Each Relation must have one Key that helps to uniquely identify a Tuple of Relation. Relation can have more than one Key that is called Candidate Key.
Super Key is a set of columns that uniquely identify a Record of Table in the Relational Database. An instance, Employee Table designed with {Emp_Code, Emp_Name, Designation, Phone, Salary, Dept_Code} and the Record can identify through following Super Key {Emp_Code, Emp_Name, Designation} or {Emp_Code, Designation, Dept_Code} or {Emp_Code, Emp_Name, Dept_Code}.
Candidate Key is a minimal set of columns that uniquely identify a Record of Table in the Relational Database. An instance, Employee Table designed with {Emp_Code, Emp_Name, Designation, Salary, Dept_Code} and the Record can identify through following Candidate Key {Emp_Code, Phone} or {Emp_Code} or {Phone}.
Primary Key is a column that uniquely identifies a Record of Table in the Relational Database. Composite Primary Key is a set of columns that uniquely identifies a Record of Table in the Relational Database. Primary Key must define from Candidate Key and the remaining Candidate Key is called Alternative Key. An instance, {Emp_Code, Phone} is a Composite Primary Key, {Emp_Code} is a Primary Key and {Phone} is an Alternative Key.
Primary Key Constraint
Primary Key Constraint is used to define with one column or set of columns that uniquely identify a Record and avoid duplicate Records of Table in the Relational Database. Primary Key Constraint must define with Unique, Never Update, Not Null and Sequence Numeric Data Column. Each Table can define with one Primary Key Constraint.
Unique Constraint
Unique Constraint is used to define with one column or set of columns that uniquely identify a Record and avoid duplicate Records of Table in the Relational Database. Unique Constraint is accepting Null Data. Each Table can define with one or more than one Unique Constraint. Unique Constraint is helps to define Alternative Key.
Your Comment To AUTHOR |
|