Question 41
MediumAn Orders table stores customer_phone in every order row. A customer changes their number and only some rows are updated. What is this?
- A.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
DBMS
An Orders table stores customer_phone in every order row. A customer changes their number and only some rows are updated. What is this?
A deletion anomaly
An update anomaly
An insertion anomaly
A lossless join
Sign up free to see the answer and a step-by-step explanation.
In Course(course_id, title, instructor, instructor_office), deleting the last course taught by an instructor also loses their office. What is this?
An update anomaly
A deletion anomaly
A partial dependency
An insertion anomaly
Sign up free to see the answer and a step-by-step explanation.
Which attribute values break 1NF?
A phone column holding one number
A NULL phone
A numeric age column
A phone column holding '98450, 99001' in one cell
Sign up free to see the answer and a step-by-step explanation.
R(A, B, C) with FDs AB → C and C → A. The candidate keys are AB and BC. Is R in BCNF?
Yes, every FD has a key on the left
Yes, because all attributes are prime
No, because it is not in 2NF
No, because C is not a super key but C → A holds
Sign up free to see the answer and a step-by-step explanation.
Which FD set is a minimal (canonical) cover of {A → BC, B → C, A → B}?
{A → BC, B → C}
{A → C}
{A → B, A → C, B → C}
{A → B, B → C}
Sign up free to see the answer and a step-by-step explanation.
R(A, B, C, D) has FDs AB → C and C → D. It is decomposed into R1(A, B, C) and R2(C, D). Is this lossless?
No, because they share no attribute
Only if D → C
Yes, because the common attribute C is a key of R2
No, because AB is lost
Sign up free to see the answer and a step-by-step explanation.
R(A, B, C) has FDs A → B and B → C. It is decomposed into R1(A, B) and R2(A, C). Is it dependency-preserving?
Yes, all FDs are preserved
No, B → C cannot be checked within either part
No, because A → B is lost
Yes, because it is lossless
Sign up free to see the answer and a step-by-step explanation.
Which decomposition of Emp(emp_id, dept_id, dept_name) with emp_id → dept_id and dept_id → dept_name gives 3NF?
Emp(emp_id) and Dept(dept_id, dept_name)
Emp(emp_id, dept_name) and Dept(dept_id)
No decomposition is needed
Emp(emp_id, dept_id) and Dept(dept_id, dept_name)
Sign up free to see the answer and a step-by-step explanation.
What is a prime attribute?
An attribute with a numeric type
The first column of a table
An attribute that has no NULLs
An attribute that is part of some candidate key
Sign up free to see the answer and a step-by-step explanation.
R(A, B, C, D) has candidate key AB and FDs AB → C, B → D. Which FD causes a 2NF violation?
AB → D
B → D
AB → C
None
Sign up free to see the answer and a step-by-step explanation.