Database Management System – Database Keys MCQs
This set of Advanced Database Management System Multiple Choice Questions and Answers (MCQs) focuses on “Database Keys”.
1. Which one of the following allows us to uniquely identify the entity in the entity set?
- Domain
- Tuple
- Row
- Key
A key allows us to identify a set of attributes that suffice to distinguish entities from each other. Keys also help uniquely identify relationships and thus distinguish relationships from each other
2. A_______is a set of one or more attributes that, taken collectively; allow us to identify uniquely an entity in the entity set.
- Primary key
- Super Key
- Candidate Key
- Foreign Key
For Example, the customer-id attribute of the entity set customer is sufficient to distinguish one customer entity from another, thus customer-id is a super key, similarly the combination of customer-name and customer-id is a super key for the entity set customer.
3. A Super keys for which no proper subset is a super key. Such a minimal Super keys are called _______
- Primary key
- Simple Key
- Candidate Key
- Foreign Key
It is possible that several distinct sets of attributes could serve as a candidate key. Suppose that a combination of customer-name and customer-street is sufficient to distinguish among members of the customer entity set. Then, both {customer-id} and {customer-name, customer-street} are candidate keys. Although the attributes customer-id and customer-name together can distinguish customer entities, their combination does not form a candidate key, since the attribute customer-id alone is a candidate key
4. We shall use the term ________ to denote a candidate key that is chosen by the database designer as the principal means of identifying entities within in an entity set.
- Primary key
- Super Key
- Candidate Key
- Foreign Key
5. The _______ should be chosen such that its attributes are never, or very rarely changed.
- Primary key
- Super Key
- Candidate Key
- Foreign Key
The address field of the person should not be the part of the primary key, since it’s likely to change. But a Driving license numbers on the other hand can be be guaranteed to never change.
6. ________ is the columns of a table that points to the candidate key of another table.
- Primary key
- Super Key
- Candidate Key
- Foreign Key
In simpler words, a foreign key is a set of attributes that references a candidate key. For example, a table called FOOTBALLTEAM may have an attribute, PLAYER_NAME, which is a foreign key referencing a candidate key, PERSON_NAME, in the PERSON table. Since PLAYER_NAME is a foreign key, any value existing as the name of a member in FOOTBALLTEAM must also exist as a person's name in the PERSON table; in other words, every member of a FOOTBALLTEAM is also a PERSON.
7. The table containing the foreign key is called the child table, and the table containing the candidate key is called the referenced or parent table.
- Parent table, Child table
- Child table, Parent table
- Child table, Referenced table
- Both B and C
The table containing the foreign key is called the child table, and the table containing the candidate key is called the referenced or parent table.
8. The purpose of the foreign key is to identify a particular row of ___________.
- Parent table and Child table
- Referencing table
- Referenced table
- Both B and C
The purpose of the foreign key is to identify a particular row of referenced table, it is generally required that the foreign key is equal to the candidate key in some row of the primary table.
9. The foreign key is equal to the candidate key in some row of the primary table, or else has no value (the NULL value.). This rule is called a ______ between the two tables.
- referencing integrity constraint
- referenced integrity constraint
- referential integrity constraint
- referred integrity constraint
10. ______ should not contain NULL value in its Attribute value.
- Primary key
- Super Key
- Candidate Key
- Foreign Key