Question 71
HardWhen should something be modelled as an entity rather than an attribute?
- A.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
DBMS
When should something be modelled as an entity rather than an attribute?
When it is unique
When it has its own attributes or takes part in relationships
Whenever it is a number
Never
Sign up free to see the answer and a step-by-step explanation.
A recursive relationship Prerequisite links Course to Course. How is it mapped?
A new Course2 table
A table with two foreign keys to Course: course_id and prereq_id
A single column in Course always
It cannot be mapped
Sign up free to see the answer and a step-by-step explanation.
Which situation calls for aggregation in an EER diagram?
A weak entity
A recursive relationship
A multivalued attribute
A relationship between an entity and another relationship, such as a manager monitoring an employee's work on a project
Sign up free to see the answer and a step-by-step explanation.
What is the difference between an identifying and a non-identifying relationship?
They are the same
An identifying relationship supplies part of the child entity's key; a non-identifying one doesn't
Identifying relationships are always M : N
Non-identifying relationships are recursive
Sign up free to see the answer and a step-by-step explanation.
In crow's-foot notation, what does a line ending with a circle and a crow's foot mean?
Exactly one
Zero or one
Zero or many
One or many
Sign up free to see the answer and a step-by-step explanation.
A university allows a student to have at most one advisor, and each advisor guides many students. A student without an advisor is allowed. How is this mapped?
Put advisor_id as a nullable foreign key in Student
Put student_id in Advisor
Create an M : N table
A NOT NULL advisor_id in Student
Sign up free to see the answer and a step-by-step explanation.
Which is a derived attribute that should usually NOT be stored?
Roll number
Name
Age, when date of birth is stored
Date of birth
Sign up free to see the answer and a step-by-step explanation.
Generalisation of Saving_Account and Current_Account into Account is overlapping. What does that mean?
An account can be both a saving and a current account at once
There are no accounts
No account can be both
Every account must be one of them
Sign up free to see the answer and a step-by-step explanation.
What is a surrogate key?
A key that can be NULL
A foreign key
A system-generated key with no business meaning, such as an auto-increment ID
A key made of all columns
Sign up free to see the answer and a step-by-step explanation.
Two entities have a 1 : 1 relationship and both participate totally. What is a common mapping?
Use a many-to-many table
Use two tables with no keys
Create three tables
Merge them into a single table
Sign up free to see the answer and a step-by-step explanation.