Question 51
MediumA many-to-one relationship from Employee to Department has total participation for Employee. How is it mapped?
- A.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
DBMS
A many-to-one relationship from Employee to Department has total participation for Employee. How is it mapped?
Merge both tables
Add emp_id to Department
Create a separate table for the relationship
Add dept_id to Employee as a foreign key that is NOT NULL
Sign up free to see the answer and a step-by-step explanation.
In min–max notation, Employee takes part in Manages with (0, 1). What does it mean?
An employee manages many departments
An employee manages at most one department and may manage none
An employee manages exactly one department
An employee manages at least one department
Sign up free to see the answer and a step-by-step explanation.
Which is a good candidate for an entity rather than an attribute in a library design?
Publisher, because it has its own attributes such as name and address and is shared by many books
Book title
Page count
Year of publication
Sign up free to see the answer and a step-by-step explanation.
What is the difference between a key attribute and a partial key?
A key attribute is always composite
A partial key is always derived
There is no difference
A key attribute identifies an entity alone; a partial key identifies a weak entity only together with its owner's key
Sign up free to see the answer and a step-by-step explanation.
A one-to-one relationship between Employee and Parking_Spot has total participation on the Parking_Spot side. Where is the foreign key best placed?
In Employee, referencing Parking_Spot
In Parking_Spot, referencing Employee
In a separate table only
In both tables
Sign up free to see the answer and a step-by-step explanation.
An entity set has a multivalued attribute (e.g. a student's several phone numbers). How is it mapped to tables?
A separate table with the entity's key and the attribute value
A single column holding a comma-separated list
Several columns phone1, phone2, phone3 in the entity table
It is ignored
Sign up free to see the answer and a step-by-step explanation.
How many tables does a standard mapping produce for two strong entities linked by an M : N relationship?
3
1
2
4
Sign up free to see the answer and a step-by-step explanation.
What is a partial key (discriminator)?
A key of a strong entity
A key that may contain NULL
Half of a composite key
An attribute that identifies a weak entity only together with its owner's key
Sign up free to see the answer and a step-by-step explanation.
What does a ternary relationship capture that three binary relationships may not?
Nothing extra
Only one-to-one facts
A fact that involves all three entities at once, such as which supplier supplies which part to which project
Derived attributes
Sign up free to see the answer and a step-by-step explanation.
In ER notation, what do the cardinality limits (1, N) on Employee's line to a Works_In relationship mean?
There are exactly N employees
Each employee takes part in at least 1 and at most N instances of the relationship
The relationship has degree N
Each employee has N attributes
Sign up free to see the answer and a step-by-step explanation.