1Z0-006 Entity-Relationship Modeling Questions and Answers — Questions and Answers
Question 1: A database designer is creating a model for a university. The 'PERSON' entity has common attributes like 'PersonID' and 'Name'. There are also more specific entities like 'STUDENT' (with 'GPA') and 'PROFESSOR' (with 'Salary'). 'STUDENT' and 'PROFESSOR' both inherit the attributes of 'PERSON'. What is the 'PERSON' entity an example of in this relationship?
- An associative entity
- A subtype entity
- A supertype entity (Correct answer)
- A recursive entity
Correct answer: A supertype entity
A supertype entity is a generic entity type that has a relationship with one or more specific subtypes and contains attributes common to the subtypes. In this scenario, 'PERSON' is the supertype, and 'STUDENT' and 'PROFESSOR' are the subtypes that inherit its common attributes.
Question 2: In an Entity-Relationship Diagram, a student's age can be calculated from their 'DateOfBirth' attribute. How would the 'Age' attribute be BEST classified?
- Composite attribute
- Derived attribute (Correct answer)
- Multivalued attribute
- Simple attribute
Correct answer: Derived attribute
A derived attribute is an attribute whose value is calculated or derived from another attribute. Since 'Age' can be determined from the 'DateOfBirth', it is a derived attribute and does not need to be stored directly in the database.
Question 3: A database for a small company needs to model the relationship where an 'EMPLOYEE' manages other 'EMPLOYEEs'. What type of relationship is this, where an entity has a relationship with itself?
- A ternary relationship
- An arc relationship
- A binary relationship
- A recursive relationship (Correct answer)
Correct answer: A recursive relationship
A recursive relationship, sometimes called a unary relationship, is one in which a relationship exists between occurrences of the same entity set. In this case, the 'EMPLOYEE' entity is related to itself to represent the management hierarchy.
Question 4: When modeling a database, you identify a many-to-many relationship between 'STUDENT' and 'COURSE'. To resolve this relationship in the logical model, what should be created?
- A supertype entity
- A recursive relationship
- An intersection entity (associative entity) (Correct answer)
- A foreign key in the 'STUDENT' table
Correct answer: An intersection entity (associative entity)
Many-to-many relationships are resolved by creating an intersection entity, also known as an associative entity or junction table. This new entity will have a many-to-one relationship with each of the original entities, typically containing foreign keys that reference the primary keys of the 'STUDENT' and 'COURSE' tables.
Question 5: Which of the following describes the aspect of a relationship that specifies the minimum number of instances an entity can be associated with in that relationship?
- Degree
- Cardinality
- Ordinality (Correct answer)
- Domain
Correct answer: Ordinality
Ordinality specifies the minimum number of times an instance in one entity can be associated with an instance in a related entity, defining the relationship as either mandatory (minimum of one) or optional (minimum of zero). Cardinality, in contrast, defines the maximum number of associations.
Question 6: A database designer is creating a table for 'EMPLOYEE' and needs to store their phone numbers. An employee can have multiple phone numbers (e.g., home, mobile, work). Which type of attribute is MOST appropriate for storing the phone numbers?
- Composite attribute
- Simple attribute
- Derived attribute
- Multivalued attribute (Correct answer)
Correct answer: Multivalued attribute
A multivalued attribute is one that can hold more than one value for a single entity instance. Since an employee can have several phone numbers, a multivalued attribute is the correct classification for this property.
A database designer is creating a model for a university.
The 'PERSON' entity has common attributes like 'PersonID' and 'Name'.
There are also more specific entities like 'STUDENT' (with 'GPA') and 'PROFESSOR' (with 'Salary'). 'STUDENT' and 'PROFESSOR' both inherit the attributes of 'PERSON'.
What is the 'PERSON' entity an example of in this relationship?