Showing posts with label RDBMS quiz questions. Show all posts
Showing posts with label RDBMS quiz questions. Show all posts

Sunday, November 30, 2025

Top 50 Normalization in RDBMS MCQs with answers (2025 Update) - SET03

✔ Scroll down and test yourself — answers are hidden under the “View Answer” button.

21. When does a table reach 5NF?

A. No transitive dependencies remain
B. No join dependency remains
C. No multivalued dependency remains
D. All FDs have prime attributes

Answer: B
Explanation:

5NF (Projection-Join NF) addresses join dependencies — a relation is in 5NF when it cannot be non-trivially decomposed into smaller relations without loss.

22. Normalization to BCNF may cause:

A. Lossless join always
B. Loss of dependency preservation sometimes
C. Removal of multi-valued dependencies
D. Need for denormalization

Answer: B
Explanation:

BCNF ensures lossless decomposition, but it may break dependency preservation — some FDs might not be enforceable without joins.

23. If all attributes depend on the whole key and no non-key attributes determine others, table is at least:

A. 2NF
B. 3NF
C. BCNF
D. 4NF

Answer: B
Explanation:

If there are no partial dependencies (attributes depend on whole key) and no transitive dependencies (non-keys don't determine others), the relation is at least in 3NF.

24. Transitive dependency leads to:

A. Insertion anomaly
B. Deletion anomaly
C. Update anomaly
D. All of these

Answer: D
Explanation:

Transitive dependencies cause redundancy and can result in insertion, deletion and update anomalies — so all of these.

25. A table storing OrderID → CustomerID → CustomerPhone violates:

A. 1NF only
B. 2NF only
C. 3NF
D. BCNF

Answer: C
Explanation:

OrderID → CustomerID and CustomerID → CustomerPhone creates a transitive dependency OrderID → CustomerPhone via CustomerID. This violates 3NF.

26. A relation R(A,B,C,D) has FD: A → B, C → D. There is no relationship between {A,B} and {C,D}. What is the likely problem?

A. Partial dependency
B. Multivalued dependency
C. Transitive dependency
D. Join dependency

Answer: B
Explanation:

Two independent sets of attributes cause multivalued dependency. A non-trivial MVD suggests need for 4NF decomposition.

________________________________________
27. A relation is in BCNF but still shows redundancy. The reason may be:

A. Presence of MVDs
B. Presence of transitive dependencies
C. FD LHS not superkey
D. Repeating groups exist

Answer: A
Explanation:

BCNF handles functional dependencies. MVDs are a different redundancy source, handled only in 4NF.

________________________________________
28. For a table to be in 2NF, it must be:

A. Free from partial dependency
B. Free from transitive dependency
C. Free from MVDs
D. Free from join dependency

Answer: A
Explanation:

A table in 2NF must first be in 1NF and then remove partial dependencies on composite keys.

________________________________________
29. Which normal form ensures no non-key attribute determines another non-key attribute?

A. 1NF
B. 2NF
C. 3NF
D. 4NF

Answer: C
Explanation:

3NF eliminates transitive dependencies where non-key determines non-key.

________________________________________
30. A → BC, D → A. Which can be a key of R(A,B,C,D)?

A. A
B. D
C. AD
D. B

Answer: B
Explanation:

D → A and A → BC implies D → ABC. With D itself present, it determines all — so D is a key.

Top 50 Normalization in RDBMS MCQs with answers (2025 Update) - SET02

✔ Scroll down and test yourself — answers are hidden under the “View Answer” button.

11. Which normal form deals with removing multi-valued dependencies (MVDs)?

A. BCNF
B. 4NF
C. 3NF
D. 2NF

Answer: B
Explanation:

4NF is specifically concerned with eliminating non-trivial multi-valued dependencies that cause redundancy.

What is multivalued dependency?

Multivalued dependency (MVD) is a type of functional dependency that happens when two attributes in a table are independent of each other but both depend on a third attribute in that table. In other words, for a single value of one attribute, multiple independent values of another attribute can exist.

12. If instructor → course holds and also instructor → office, storing both in same table leads to:

A. Update anomaly
B. Lossless join
C. No anomaly
D. Query anomaly only

Answer: A
Explanation:

Redundancy where instructor appears multiple times (for multiple courses) can cause update anomalies when office is updated in some rows but not others.

13. Which of the following pairs must hold true for a good decomposition?

A. Lossless join & redundancy retention
B. Lossless join & dependency preservation
C. Only dependency preservation
D. Neither required

Answer: B
Explanation:

A desirable decomposition is lossless (to avoid information loss) and dependency preserving (to allow enforcement of FDs without expensive joins).

14. If R is in 3NF and all dependencies have the LHS as superkeys, then R is also in:

A. BCNF
B. 4NF
C. 1NF only
D. DKNF

Answer: A
Explanation:

BCNF requires every FD to have a superkey on the LHS. If all FDs already have LHS as superkeys, R meets BCNF.

15. Which FD pattern often indicates a transitive dependency? A → B, B → C

A. C is prime attribute
B. A → C too
C. B is non-key attribute
D. C depends on A indirectly

Answer: C
Explanation:

A → B and B → C indicate a transitive chain; if B is a non-key attribute, then C transitively depends on A through B — a classic transitive dependency.

16. Design where the key attribute determines a non-key attribute directly is:

A. Fully dependent
B. Partially dependent
C. Transitively dependent
D. Multivalued dependent

Answer: A
Explanation:

When a non-key attribute depends on the whole key (not on a part), it is called fully dependent — the desirable situation for 2NF.

17. The primary aim of normalization is:

A. Minimize tables
B. Reduce redundancy + avoid anomalies
C. Increase number of attributes
D. Improve indexing

Answer: B
Explanation:

Normalization's goal is to reduce data redundancy and avoid insertion/update/delete anomalies — improving data integrity.

18. A table with attributes (Student, Project, Mentor) where a student can have multiple projects independently of mentors shows:

A. BCNF violation
B. 4NF violation
C. 5NF violation
D. 2NF violation

Answer: B
Explanation:

Independent multi-valued facts (Student →> Project and Student →> Mentor) cause redundancy that 4NF targets. So this indicates a 4NF violation.

19. FD A,B → C but C → A also exists. What is true?

A. {A,B} is only key
B. C is also a key
C. No key exists
D. A determines BC

Answer: A
Explanation:

From AB→C and C→A, AB+ = {A,B,C}, so AB is a key. C+ = {C,A} but not B, so C alone isn't a key. Thus {A,B} is the key.

20. Which decomposition type can break some functional dependencies, though lossless?

A. 2NF decomposition
B. 3NF decomposition
C. BCNF decomposition
D. Join dependency decomposition

Answer: C
Explanation:

Decomposing to BCNF can guarantee lossless joins but may not preserve all original FDs, i.e., dependency preservation can be lost.

Friday, November 28, 2025

Top 50 Normalization in RDBMS MCQs with answers (2025 Update) - SET01

✔ Scroll down and test yourself — answers are hidden under the “View Answer” button.

1. A relation R(A,B,C,D) has the dependencies A → B, B → C, C → D. The highest normal form of R is:

A. 1NF
B. 2NF
C. 3NF
D. BCNF

Answer: B
Explanation:

A is a candidate key (A → B → C → D). There is a transitive dependency (A → B and B → C), so 3NF is violated. Since the key is single-attribute, 2NF holds. Hence highest NF = 2NF.

2. If a table contains a composite primary key (A, B) and a functional dependency A → C holds, what can be concluded?

A. Likely violates 1NF
B. Likely violates 2NF
C. Likely satisfies BCNF
D. Must be in 5NF

Answer: B
Explanation:

A partial dependency exists because A (a part of the composite key) determines a non-key attribute C. Partial dependencies violate 2NF.

3. A student table has repeating groups of phone numbers for each student. Which normal form is surely violated?

A. 1NF
B. 2NF
C. 3NF
D. BCNF

Answer: A
Explanation:

Repeating groups mean attributes are not atomic. That violates 1NF, which requires atomic (non-repeating) attribute values.

What is meant by repeating groups?


Following relation is not in First Normal Form (1NF).

StudentID StudentName Courses
101 Arun Kumar DBMS, AI, Networks
102 Meera Devi DBMS, ML

Why this violates 1NF?

  • The column Courses contains multiple values in a single cell.
  • In 1NF, every attribute must hold atomic (indivisible) values only.
  • A repeating or multi-valued attribute breaks the rule of atomicity.
4. Which among the following ensures removal of partial dependency?

A. 1NF
B. 2NF
C. 3NF
D. BCNF

Answer: B
Explanation:

Second Normal Form (2NF) is specifically defined to remove partial dependencies that arise when a non-prime attribute depends on part of a composite key.

Refer here to know more about Partial Key Dependency
5. A relation R(A,B,C) has FDs: AB → C, C → A. Which of the following is true?

A. R is in BCNF
B. Only AB is a key
C. C is also a key
D. No candidate keys exist

Answer: B
Explanation:

From AB → C and C → A, AB+ = {A,B,C} so AB is a key. C+ gives {C,A} but not B, so C alone is not a key. Therefore AB is the (only) key.

6. A relation contains transitive dependency X → Y and Y → Z. To remove it, we decompose into:

A. XY + YZ
B. XZ + YZ
C. XY + XZ
D. X + Y + Z

Answer: A
Explanation:

To eliminate the transitive dependency, split R(X,Y,Z) into R1(X,Y) and R2(Y,Z). This preserves the direct dependencies and removes transitivity. This is called dependency preserving decomposition.

7. Which normal form focuses mainly on transitive dependency removal?

A. 1NF
B. 2NF
C. 3NF
D. BCNF

Answer: C
Explanation:

3NF removes transitive dependencies (non-key attribute depending on another non-key attribute).

What is transitive dependency?

A transitive dependency in a relation exists when a non-prime attribute depends on another non-prime attribute, which in turn depends on a key attribute. In simple words: If A → B and B → C and A is a key attribute, C is not part of any key, then C is transitively dependent on A through B.
8. If a relation is in BCNF, it must also be in:

A. 2NF and 3NF
B. Only in 1NF
C. Only in 2NF
D. 4NF

Answer: A
Explanation:

BCNF is stricter than 3NF and 2NF, so a BCNF relation is necessarily in 2NF and 3NF (and 1NF as well).

9. Consider relation R(P,Q,R,S) with FDs: P → Q, Q → R. Which is a key?

A. P
B. Q
C. PQ
D. PR

Correct (precise) answer: PSPS is a candidate key (not listed in the original choices).


Reasoning (closures)

  • P+: start with {P}
    P → Q → add Q → now {P,Q}
    Q → R → add R → finally P+ = {P, Q, R}
    S is not included.
  • Q+: {Q,R} (since Q → R) — not a key.
  • P S (PS)+: start with {P,S}
    using the two FDs we get Q (from P → Q) and then R (from Q → R)
    so (PS)+ = {P, S, Q, R} — all attributes of the relation.

Minimality check:

  • P+ = {P,Q,R} (missing S) → P alone is not a key.
  • S+ = {S} (missing P,Q,R) → S alone is not a key.

Therefore PS is a candidate key (it determines all attributes and is minimal). The original options A–D are all not keys unless the question implicitly stated some FD for S (which it did not).

10. A BCNF decomposition is always:

A. Lossless only
B. Dependency preserving only
C. Both lossless and dependency preserving
D. Lossless but may fail to preserve dependencies

Answer: D
Explanation:

BCNF decomposition algorithms guarantee a lossless join, but they can sometimes break dependency preservation (some FDs may not hold on individual decomposed relations).

Top 50 ER Modeling MCQs with Answers & Detailed Explanations (2025 Update) - SET 04

✔ Scroll down and test yourself — answers are hidden under the “View Answer” button.

31. In a university, each course may have prerequisites. How should prerequisites be represented?

A. One-to-many relationship
B. Recursive relationship
C. Multivalued attribute
D. Derived attribute

Answer: B
Explanation:

Prerequisites are modeled as a recursive relationship within the Course entity, linking courses to other courses.

32. In a hospital, a doctor can specialize in multiple departments, and each department can have multiple doctors. How should this relationship be modeled?

A. One-to-one
B. One-to-many
C. Many-to-many
D. Weak entity

Answer: C
Explanation:

This is a many-to-many relationship between Doctor and Department, which may require an associative entity to store additional attributes like years of experience.

33. In a banking system, a loan may be co-owned by multiple customers, and a customer may have multiple loans. How should this be represented?

A. One-to-one
B. One-to-many
C. Many-to-many
D. Derived attribute

Answer: C
Explanation:

This is a many-to-many relationship between Customer and Loan. An associative entity can capture relationship attributes like loan percentage owned by each customer.

34. In a hospital, “Medication Schedule” depends on the patient and prescription. How should it be modeled?

A. Simple attribute
B. Derived attribute
C. Weak entity
D. Associative entity

Answer: D
Explanation:

The schedule is a relationship-specific entity, so an associative entity linking Patient and Prescription is appropriate.

35. In a university, a student may be enrolled in multiple clubs, and each club may have multiple students. How is this relationship represented?

A. One-to-one
B. One-to-many
C. Many-to-many
D. Recursive

Answer: C
Explanation:

This is a many-to-many relationship between Student and Club, usually implemented with an associative entity to capture membership details.

36. In a travel agency, a booking may include multiple passengers, and each passenger may have multiple bookings. How should this be modeled?

A. One-to-one
B. One-to-many
C. Many-to-many
D. Derived relationship

Answer: C
Explanation:

This is a many-to-many relationship between Booking and Passenger, typically implemented via an associative entity.

37. In a hospital, the “BMI” of a patient is computed from weight and height. How should BMI be represented?

A. Simple attribute
B. Derived attribute
C. Multivalued attribute
D. Weak entity

Answer: B
Explanation:

BMI is a derived attribute because it can be calculated from other stored attributes like weight and height.

38. In a university, “Student Address” is composed of Street, City, and ZIP. How should this be modeled?

A. Simple attribute
B. Derived attribute
C. Composite attribute
D. Weak entity

Answer: C
Explanation:

Address is a composite attribute because it consists of multiple subparts (Street, City, ZIP).

39. In an e-commerce system, a review is associated with a customer and a product. How should Review be represented?

A. Simple attribute
B. Weak entity
C. Derived attribute
D. Recursive relationship

Answer: B
Explanation:

Review is a weak entity because it depends on both Customer and Product for identification.

40. In a university, a student may take multiple exams, and each exam may include multiple students. How should this be modeled?

A. One-to-one
B. One-to-many
C. Many-to-many
D. Derived relationship

Answer: C
Explanation:

This is a many-to-many relationship between Student and Exam, best implemented with an associative entity to store grades.

Top 50 ER Modeling MCQs with Answers & Detailed Explanations (2025 Update) - SET 05

✔ Scroll down and test yourself — answers are hidden under the “View Answer” button.

41. In a hospital, each patient may have multiple appointments, and each appointment belongs to exactly one patient. How should this relationship be represented?

A. One-to-one
B. One-to-many
C. Many-to-many
D. Recursive

Answer: B
Explanation:

Each patient can have multiple appointments, making this a one-to-many relationship from Patient to Appointment.

42. In a university, a professor may supervise multiple students, and each student may have only one supervisor. How should this be modeled?

A. One-to-one
B. One-to-many
C. Many-to-many
D. Recursive relationship

Answer: B
Explanation:

This is a one-to-many relationship from Professor to Student because each professor can supervise many students, but a student has only one supervisor.

43. In an e-commerce system, a shopping cart contains multiple products, each with quantity. How should the cart be modeled?

A. Multivalued attribute
B. Weak entity
C. Associative entity
D. Derived attribute

Answer: C
Explanation:

Cart contents involve a relationship-specific attribute (quantity), so an associative entity linking Cart and Product is required.

44. In a library, a book may belong to multiple genres. How should “genre” be represented?

A. Simple attribute
B. Multivalued attribute
C. Weak entity
D. Derived attribute

Answer: B
Explanation:

Since a book can belong to multiple genres, “genre” is a multivalued attribute or can be represented as a separate entity.

45. In a hospital, “Total Bill” is computed from individual treatment charges. How should it be represented?

A. Simple attribute
B. Derived attribute
C. Weak entity
D. Multivalued attribute

Answer: B
Explanation:

Total Bill is a derived attribute because it can be calculated from the sum of individual treatment charges.

46. In a university, “Student Enrollment” links students and courses. It also stores grades. What type of entity is this?

A. Weak entity
B. Associative entity
C. Derived attribute
D. Simple attribute

Answer: B
Explanation:

Enrollment is an associative entity because it connects Student and Course and contains additional attributes like grades.

47. In a company, an employee can hold multiple positions over time. How should “position” be represented?

A. Multivalued attribute
B. Derived attribute
C. Weak entity
D. Simple attribute

Answer: A
Explanation:

Position is a multivalued attribute because an employee may hold multiple positions simultaneously or sequentially.

48. In a banking system, an account may have multiple transactions, and each transaction belongs to exactly one account. How is this relationship represented?

A. One-to-one
B. One-to-many
C. Many-to-many
D. Derived attribute

Answer: B
Explanation:

This is a one-to-many relationship where an account can have multiple transactions, but each transaction belongs to a single account.

49. In a university, a “Transcript” is computed from student grades in courses. How should Transcript be represented?

A. Simple attribute
B. Multivalued attribute
C. Derived attribute
D. Weak entity

Answer: C
Explanation:

Transcript is a derived attribute as it is computed from the grades of all courses taken by the student.

50. In an airline booking system, a flight may have multiple passengers, and each passenger may take multiple flights. How should this be represented?

A. One-to-one
B. One-to-many
C. Many-to-many
D. Derived relationship

Answer: C
Explanation:

This is a many-to-many relationship between Passenger and Flight, best implemented with an associative entity to store booking details.

Top 50 ER Modeling MCQs with Answers & Detailed Explanations (2025 Update) - SET 03

✔ Scroll down and test yourself — answers are hidden under the “View Answer” button.

21. In a university, a course can have multiple instructors, and each instructor can teach multiple courses. How should this be modeled?

A. One-to-one relationship
B. One-to-many relationship
C. Many-to-many relationship
D. Recursive relationship

Answer: C
Explanation:

This is a many-to-many relationship between Course and Instructor. An associative entity may be used to store additional attributes like teaching semester.

22. In a hospital ER model, “Room Number” is assigned based on patient type (ICU, General). How should Room Number be represented?

A. Simple attribute
B. Derived attribute
C. Multivalued attribute
D. Composite attribute

Answer: D
Explanation:

Room Number can be a composite attribute consisting of building, floor, and room sequence.

23. In an e-commerce system, a product may belong to multiple categories, and each category contains multiple products. How should this relationship be represented?

A. One-to-one
B. One-to-many
C. Many-to-many
D. Derived relationship

Answer: C
Explanation:

This is a many-to-many relationship between Product and Category, typically implemented with an associative entity.

24. In a company, a project can have multiple tasks, and each task is assigned to exactly one project. How should Task be represented?

A. Strong entity
B. Weak entity
C. Derived attribute
D. Multivalued attribute

Answer: B
Explanation:

Task depends on the existence of a Project, making it a weak entity identified by a partial key plus the project key.

25. In a university ER model, “Email” of a student can be computed from student ID and domain. How should it be represented?

A. Simple attribute
B. Multivalued attribute
C. Derived attribute
D. Weak entity

Answer: C
Explanation:

“Email” is a derived attribute because it can be calculated from other stored attributes like student ID and domain.

26. In a library, a “Borrowing” record links a student and a book with the borrow date. What type of entity should “Borrowing” be?

A. Strong entity
B. Associative entity
C. Weak entity
D. Multivalued attribute

Answer: B
Explanation:

“Borrowing” is an associative entity connecting Student and Book and storing relationship attributes like borrow date.

27. In a hospital, an “Insurance Policy” is linked to patients. A patient can have multiple policies. How should this be modeled?

A. Weak entity
B. Derived attribute
C. Multivalued attribute
D. Simple attribute

Answer: A
Explanation:

Insurance Policy is a weak entity because it depends on the existence of a patient for identification.

28. In a university, each department can have multiple professors, and each professor belongs to exactly one department. What is this relationship type?

A. One-to-one
B. One-to-many
C. Many-to-many
D. Recursive

Answer: B
Explanation:

This is a one-to-many relationship where one department has many professors, but each professor belongs to only one department.

29. A product has multiple reviews, and each review is associated with exactly one product. How should reviews be represented?

A. Derived attribute
B. Multivalued attribute
C. Weak entity
D. Strong entity

Answer: C
Explanation:

Reviews are weak entities because they depend on the Product for existence and identification.

30. In a company, an employee can belong to multiple teams, and each team can have multiple employees. How should this relationship be represented?

A. One-to-one
B. One-to-many
C. Many-to-many
D. Derived relationship

Answer: C
Explanation:

This is a many-to-many relationship, best implemented with an associative entity linking Employee and Team.

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents