wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

The purpose of the primary key in a database is to

A
unlock the database
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
provide a map of the data
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
uniquely identify a record
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
establish constraints on database operations
No worries! We‘ve got your back. Try BYJU‘S free classes today!
E
None of these
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is B provide a map of the data

The purpose of the primary key in a database is to provide a map of the data.

A primary key is a special relational database table column (or combination of columns) designated to uniquely identify all table records. A primary key's main features are: It must contain a unique value for each row of data. It cannot contain null values.

The main purpose of a primary key is to implement a relationship between two tables in a relational database; it's not called a relational database for nothing! More specifically, the primary key is the "target" which a foreign key can reference.

A primary key is used to ensure data in the specific column is unique. You can only set constraints with primary keys, by setting a foreign key to another column which creates a relationship with the column that has the primary key set. A prime use of a primary key is in the case of a users table.


flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Database Structuring
ACCOUNTANCY
Watch in App
Join BYJU'S Learning Program
CrossIcon