Question
Hello, I'm having trouble understanding entities in database. How do I find out which is the...
Hello,
I'm having trouble understanding entities in database. How do I find out which is the super key, candidate key, and primary key? I dont undersntad
Thank you for your help in advance
Answers
superkey -- superkey is a combination of attributes that can be uniquely used to identify a database record. A table might have many superkeys.
AccidentNum , VinNum ,ssnDriver,accidentLoc,Date are a combination of attributes that uniquely identify a record. While ssnOwner is not uniquely identified as a record.Because ssnOwner has multiple vehicles.
Candidate keys--Candidate keys are a special subset of superkeys that do not have any extraneous information in them.
AccidentNum , VinNum are a subset of the super key which identified the record uniquely.
Primary Key-- The attribute or combination of attributes that uniquely identifies a row or record in a relation is known as a primary key.
VinNum is primary key that uniquely identifies a row or record in a relation.