PRIMARY KEY | CANDIDATE KEY |
---|---|
which helps us to uniquely identifies every row in that table is called a primary key | A candidate key is a column, or set of columns, in a table that can uniquely identify any database record without referring to any other data. Each table may have one or more candidate keys, but one candidate key is unique, and it is called the primary key. |
There can be only one primary key in any relation. | There can be more than one candidate key in a relation. |
No attribute of a Primary key can contain NULL value. | The attribute of a Candidate key can have NULL value. |
It is optional to specify a primary key for any relation. | There can not be a relation without candidate key specified. |
Primary key describes the most important attribute for the relation. | Candidate keys present candidates that can qualify for Primary Key. |
A primary key is a candidate key. | But it not compulsory that each candidate key can be a primary key. |
A corner of Computer Science & Engineering related things
Home
4th Semester
Algorithm Design Computer Architecture Database Management System Data Communications Economics5th Semester
Theory of Computation Microprocessor and Assembly Language Engineering Mathematics Sociology Technical Writing and Communications
.