COMPUTER SCIENCE AND ENGINEERING
SQL
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
P=A+C
|
|
C=P+A
|
|
A=P-C
|
|
A=P+C
|
Detailed explanation-1: -There can be multiple Super keys and Candidate keys in a table, but there can be only one Primary key in a table. Alternate keys are those Candidate keys that were not chosen to be the Primary key of the table. A Composite key is a Candidate key with more than one attribute.
Detailed explanation-2: -Super Key. A super key is a set of one or more than one key that can be used to identify a record uniquely in a table. Example: Primary key, Unique key, Alternate key are a subset of Super Keys.
Detailed explanation-3: -A primary key-foreign key relationship defines a one-to-many relationship between two tables in a relational database. A foreign key is a column or a set of columns in one table that references the primary key columns in another table.
Detailed explanation-4: -Candidate Key – is a set of attributes that uniquely identify tuples in a table. Candidate Key is a super key with no repeated attributes. Alternate Key – is a column or group of columns in a table that uniquely identify every row in that table. Foreign Key – is a column that creates a relationship between two tables.