answersLogoWhite

0

In a relational database it is used as a way to uniquely identify a record in a table. It also allows tables within the database to reference the specific record within the table.

For example, a common practice is to have the database automatically determine the Primary Key with an auto-incrementing value starting at 1 upon inserting each new record.

The reason for uniquely identifying the record is there could be cases where the data between two records are exactly the same, but they need to be separate as they do represent different things.

For example, let's say you have a database containing the name of a person "John Smith". What would happen if you added "John Smith" into the database multiple times without a Primary Key? By providing the Primary Key as shown below, you can now reference the correct "John Smith".

Id Name

1 John Smith

2 John Smith

User Avatar

Wiki User

11y ago

Still curious? Ask our experts.

Chat with our AI personalities

JordanJordan
Looking for a career mentor? I've seen my fair share of shake-ups.
Chat with Jordan
DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin
ReneRene
Change my mind. I dare you.
Chat with Rene

Add your answer:

Earn +20 pts
Q: Is the primary key field
Write your answer...
Submit
Still have questions?
magnify glass
imp