Help Me/Question Selection Of Primary Key

Doominic anderson

White Belt
Every record in a database management system(DBMS) is uniquely identified by using of primary key.
What are important points which should keep in mind while selecting primary key from the table in a DBMS?

Can we select the combination of two or more columns as a primary key or always take a single column as a primary key?


Content Writer
Primary key uniquely identify each record in the table. It possess two properties one is unique other is not null.
Primary key in the table can be selected from the fields of table it can be single column or composite primary key means more than 1 column.
And you can also create another column as primary key if no particular column in the table can be taken as primary key

steve taylor

White Belt
Selection of the primary key is depend on the following things :-
The attribute which is chosen for primary key must be unique .
Attribute does not contain null value .
Definition of primary key - Set of attribute which identify all the record uniquely .
That means there are no repetition allowed in the primary key field and null value.

Swati Mishra

Content Writer
Primary key is unique key that is unique record in database, primary key is unique identifier that is roll number, employee identification number. Database have only one primary key, so it is not possible to create multiple column as primary key.


White Belt
A primary key is unique identity of any table in database, and you can also select more than one primary key from that table or database.
Suppose you have a table about student.
Roll no.:- Primary key
Email id :- Primary key
Address :-

You can choose Roll no. and Email id as a primary key but not Name is a primary key, Because in a college many students are same name but ever students haven't same roll no. and same email id.