Question 61
HardEach Employee works in exactly one Department, and each Department must have at least one Employee. How are the participations drawn in an ER diagram?
- A.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
DBMS
Each Employee works in exactly one Department, and each Department must have at least one Employee. How are the participations drawn in an ER diagram?
Partial on both sides
Total participation on both sides
Total for Department only
Total for Employee only
Sign up free to see the answer and a step-by-step explanation.
A Manages relationship between Employee and Department is 1 : 1, and every Department must have a manager. How is it best mapped to tables?
Merge Employee and Department
Put the department ID in every Employee row
Put the manager's employee ID as a NOT NULL, UNIQUE foreign key in Department
Create a separate Manages table always
Sign up free to see the answer and a step-by-step explanation.
A ternary relationship Teaches(Teacher, Course, Semester) has no other constraints. What is the primary key of its table?
Teacher
(Teacher, Course)
(Teacher, Course, Semester)
Semester
Sign up free to see the answer and a step-by-step explanation.
In the ternary relationship Teaches(Teacher, Course, Semester), each course is taught by only one teacher in a given semester. What is the key?
(Course, Semester)
Course
(Teacher, Course, Semester)
(Teacher, Semester)
Sign up free to see the answer and a step-by-step explanation.
A Dependent entity has a partial key 'name' and depends on Employee (key emp_id). What is the primary key of the Dependent table?
emp_id
A new surrogate key only
(emp_id, name)
name
Sign up free to see the answer and a step-by-step explanation.
A specialisation of Vehicle into Car and Truck is total and disjoint. Which mapping avoids NULLs and repeats no attributes?
A Vehicle table only
One Vehicle table with every attribute
A Car table only
Separate Car and Truck tables, each holding all Vehicle attributes
Sign up free to see the answer and a step-by-step explanation.
How many tables does the standard mapping produce for two strong entities with a 1 : N relationship that has one attribute of its own?
2
4
1
3
Sign up free to see the answer and a step-by-step explanation.
How many tables does the standard mapping produce for two strong entities with an M : N relationship that has two attributes?
2
5
4
3
Sign up free to see the answer and a step-by-step explanation.
An Employee entity has a composite attribute Address (street, city, pin) and a multivalued attribute Phone. How many tables does the standard mapping produce?
4
1
3
2: Employee (with street, city, pin) and Employee_Phone
Sign up free to see the answer and a step-by-step explanation.
What does the cardinality constraint (1, 3) on Student in a Registers_For relationship mean?
Every student registers for at least 1 and at most 3 courses
Three students per course
A student registers once
Every course has 1 to 3 students
Sign up free to see the answer and a step-by-step explanation.