Unit 4 - Practice Quiz

INT306 59 Questions
0 Correct 0 Wrong 59 Left
0/59

1 Which data integrity rule ensures that every table has a primary key and that the primary key's value is not null?

data integrity rules Easy
A. User-defined Integrity
B. Domain Integrity
C. Entity Integrity
D. Referential Integrity

2 Which rule ensures that a foreign key value must match an existing primary key value in another table or be NULL?

data integrity rules Easy
A. Entity Integrity
B. Domain Integrity
C. Key Constraint
D. Referential Integrity

3 In relational database theory, if an attribute B is functionally dependent on attribute A, how is it typically represented?

functional dependency Easy
A.
B.
C.
D.

4 If we have a functional dependency StudentID StudentName, what does this mean?

functional dependency Easy
A. For a given StudentName, there is only one StudentID.
B. StudentID and StudentName are not related.
C. StudentID and StudentName are the same.
D. For a given StudentID, there is only one StudentName.

5 A functional dependency of the form is considered trivial if...

functional dependency Easy
A. Y is a subset of X
B. X and Y are disjoint
C. X is a subset of Y
D. X is a superkey

6 What is the primary goal of the database normalization process?

need of normalization Easy
A. To make the database schema more complex.
B. To increase data redundancy for faster queries.
C. To decrease the number of tables.
D. To reduce data redundancy and improve data integrity.

7 An anomaly where deleting a record unintentionally removes facts about another entity is called a(n)...

need of normalization Easy
A. Modification Anomaly
B. Update Anomaly
C. Insertion Anomaly
D. Deletion Anomaly

8 A relation is in First Normal Form (1NF) if...

first normal form Easy
A. It has no transitive dependencies.
B. It has no partial dependencies.
C. All its attributes have atomic (indivisible) values.
D. It has no multivalued dependencies.

9 Which of the following would violate the First Normal Form (1NF)?

first normal form Easy
A. A 'PhoneNumbers' column containing '555-1234, 555-5678'
B. A 'FirstName' column containing a single name
C. An 'Age' column containing a single number
D. A 'City' column containing 'New York'

10 For a relation to be in Second Normal Form (2NF), it must first be in 1NF and...

second normal form Easy
A. have a composite primary key.
B. have no partial dependencies.
C. have no transitive dependencies.
D. have no foreign keys.

11 A partial dependency, which is eliminated by 2NF, can only exist in a relation with a...

second normal form Easy
A. Simple Primary Key
B. Foreign Key
C. Composite Primary Key
D. Superkey

12 For a relation to be in Third Normal Form (3NF), it must be in 2NF and...

third normal form Easy
A. have a simple primary key.
B. have no partial dependencies.
C. have only atomic values.
D. have no transitive dependencies.

13 In a relation R(A, B, C) where A is the key, the dependencies and together form a...

third normal form Easy
A. Trivial dependency
B. Partial dependency
C. Transitive dependency
D. Multivalued dependency

14 Which statement correctly describes the relationship between 3NF and BCNF?

boyce codd normal form Easy
A. Every relation in 3NF is also in BCNF.
B. BCNF and 3NF are completely independent.
C. Every relation in BCNF is also in 3NF.
D. BCNF is a weaker version of 3NF.

15 A relation is in Boyce-Codd Normal Form (BCNF) if for every non-trivial functional dependency , ...

boyce codd normal form Easy
A. Y is a non-prime attribute.
B. Y is a prime attribute.
C. X is a superkey.
D. X is a foreign key.

16 How is a multivalued dependency of B on A typically represented?

multivalued dependencies Easy
A.
B.
C.
D.

17 A multivalued dependency implies that the values of Y associated with a given X value are...

multivalued dependencies Easy
A. Functionally determined by X.
B. Dependent on all other attributes in the table.
C. Always a single, unique value.
D. Independent of the values of other attributes in the table.

18 For a relation to be in Fourth Normal Form (4NF), it must be in BCNF and...

fourth normal form Easy
A. have no transitive dependencies.
B. have only one candidate key.
C. have no non-trivial multivalued dependencies.
D. have no partial dependencies.

19 The primary purpose of decomposing a relation into Fourth Normal Form (4NF) is to eliminate problems caused by...

fourth normal form Easy
A. Functional dependencies
B. Transitive dependencies
C. Partial dependencies
D. Multivalued dependencies

20 If a relation is in 4NF, it is guaranteed to also be in which of the following normal forms?

fourth normal form Easy
A. Only 3NF
B. BCNF, 3NF, 2NF, and 1NF
C. Only BCNF
D. 5NF

21 Given a relation R(A, B, C, D) and a set of functional dependencies F = {A -> B, BC -> D}. What is the closure of the attribute set {A, C}, denoted as ?

functional dependency Medium
A. {A, B, D}
B. {A, C}
C. {A, B, C}
D. {A, B, C, D}

22 Consider a relation R(A, B, C, D) with the primary key {A, B}. The functional dependencies are AB -> C, AB -> D, and A -> C. Why is this relation not in 2NF?

second normal form Medium
A. Because of the partial dependency A -> C.
B. Because C is a prime attribute.
C. Because the primary key has more than one attribute.
D. Because of the transitive dependency A -> C.

23 A relation R(StudentID, StudentName, Street, City, Zip) has the following functional dependencies:
StudentID -> StudentName, Street, City, Zip
Zip -> City

Given that StudentID is the primary key, which statement is true?

third normal form Medium
A. The relation is in 3NF but not in BCNF.
B. The relation is in 2NF but not in 3NF.
C. The relation is not in 2NF.
D. The relation is in BCNF.

24 Consider the relation R(A, B, C) with functional dependencies F = {AB -> C, C -> B}. What is the highest normal form this relation satisfies?

boyce codd normal form Medium
A. Boyce-Codd Normal Form (BCNF)
B. Second Normal Form (2NF)
C. Third Normal Form (3NF)
D. First Normal Form (1NF)

25 In a relational database schema for a university, there is a STUDENT table with StudentID as the primary key and an ENROLLMENT table with StudentID as a foreign key referencing the STUDENT table. Which integrity rule prevents a student record from being deleted from the STUDENT table if they are still enrolled in any courses listed in the ENROLLMENT table?

data integrity rules Medium
A. Domain Integrity
B. Referential Integrity
C. User-defined Integrity
D. Entity Integrity

26 In a relation R(EmployeeID, Project, Skill), an employee can work on multiple projects and have multiple skills, and the set of skills is independent of the project they work on. This situation leads to which type of dependency?

multivalued dependencies Medium
A. A transitive dependency
B. Multivalued dependencies EmployeeID ->> Project and EmployeeID ->> Skill
C. A partial dependency
D. A full functional dependency (EmployeeID, Project) -> Skill

27 A relation is in 4NF if it is in BCNF and it has no:

fourth normal form Medium
A. Functional dependencies at all
B. Non-trivial multivalued dependencies where the determinant is not a superkey
C. Partial dependencies
D. Transitive dependencies

28 Consider a single table PROJECT_ASSIGNMENT(EmpID, EmpName, ProjectID, ProjectName, Hours). If an employee's name changes, it must be updated in multiple rows for every project they are assigned to. This is an example of a(n):

need of normalization Medium
A. Selection Anomaly
B. Update Anomaly
C. Insertion Anomaly
D. Deletion Anomaly

29 Which of the following table designs violates the First Normal Form (1NF)?

first normal form Medium
A. An EMPLOYEE table with EmployeeID as a primary key and DeptID as a foreign key.
B. A SALES table where each row represents a single transaction with a unique TransactionID.
C. A STUDENT table with attributes StudentID, Name, and Major.
D. A COURSE table where the Prerequisites attribute can contain a list of course codes like 'CS101, MA203'.

30 Given the functional dependency (A, B) -> C, which of the following dependencies can be inferred by Armstrong's Augmentation Rule?

functional dependency Medium
A. B -> C
B. C -> (A, B)
C. A -> C
D. (A, B, D) -> C

31 A relation R(X, Y, Z) has functional dependencies XY -> Z and Z -> Y. If {X, Y} is the only candidate key, what is the highest normal form of this relation?

boyce codd normal form Medium
A. It is in BCNF.
B. It is in 3NF but not BCNF.
C. It is in 2NF but not 3NF.
D. It is not in 2NF.

32 A relation R(A, B, C, D) with key {A} has the FDs: A -> BCD, B -> C. Which step is necessary to decompose this relation into 3NF?

third normal form Medium
A. Create R1(A, B) and R2(A, C, D).
B. Create R1(A, B, D) and R2(B, C).
C. The relation is already in 3NF.
D. Create R1(A, C) and R2(A, B, D).

33 Which data integrity rule ensures that every row in a table has a unique identifier and that the identifier is not null?

data integrity rules Medium
A. Referential Integrity
B. Entity Integrity
C. Transactional Integrity
D. Domain Integrity

34 A table ORDERS(OrderID, CustomerID, CustomerName, OrderDate) has OrderID as the primary key. An additional functional dependency is CustomerID -> CustomerName. What is the highest normal form of this table?

second normal form Medium
A. Because of the transitive dependency ItemID -> ItemPrice.
B. Because Quantity is not a prime attribute.
C. Because the primary key is composite.
D. Because ItemPrice depends only on ItemID, which is a part of the primary key.

35 In a denormalized table FACULTY(FacultyID, FacultyName, DeptID, DeptName, Office), you cannot add a new department until a faculty member is assigned to it. This problem is known as a(n):

need of normalization Medium
A. Redundancy Problem
B. Deletion Anomaly
C. Update Anomaly
D. Insertion Anomaly

36 Consider a relation R(A, B, C, D, E) with FDs F = {A -> BC, CD -> E, B -> D, E -> A}. Which of the following is a candidate key for R?

functional dependency Medium
A. A
B. D, E
C. C
D. A, B

37 A relation R(A, B, C) is in BCNF. A non-trivial multivalued dependency A ->> B holds. For R to also be in 4NF, what must be true about A?

fourth normal form Medium
A. A must be a prime attribute.
B. The relation must be decomposed into R1(A, B) and R2(A, C).
C. B must be functionally dependent on A.
D. A must be a superkey of R.

38 Every relation that is in BCNF is also in 3NF. However, a relation in 3NF is not necessarily in BCNF. This is because 3NF allows a non-trivial functional dependency where:

boyce codd normal form Medium
A. Both X and Y are non-prime attributes.
B. X is a superkey, but Y is not a prime attribute.
C. X is not a superkey, but Y is a prime attribute.
D. X is a proper subset of a candidate key.

39 Which of the following statements about Multivalued Dependencies (MVDs) is FALSE?

multivalued dependencies Medium
A. MVDs are a cause of redundancy that is not addressed by BCNF.
B. Every functional dependency is also a multivalued dependency.
C. If and hold, then must also hold (MVD Transitivity).
D. If holds in R, then also holds (MVD Complementation Rule).

40 Given a relation R(A, B, C, D) with candidate key A and functional dependencies A -> B, A -> C, B -> D. How would you decompose this into a collection of 3NF relations?

third normal form Medium
A. R1(A, B) and R2(B, C, D)
B. R1(A, C, D) and R2(A, B)
C. R1(A, B, C) and R2(B, D)
D. The relation is already in 3NF

41 Consider a relation schema with a set of functional dependencies . Which of the following is a candidate key for R?

functional dependency Hard
A. A
B. E
C. C
D. B

42 A relation has functional dependencies . The relation is decomposed into , , and . Which statement accurately describes this decomposition?

boyce codd normal form Hard
A. The decomposition is lossy but dependency preserving.
B. The decomposition is not in BCNF because violates BCNF.
C. The decomposition is lossless and in BCNF, but it is not dependency preserving.
D. The decomposition is lossless, dependency preserving, and in BCNF.

43 Consider a relation Enrollment(StudentID, CourseID, ClubID) where a student can enroll in multiple courses and join multiple clubs. There is no direct link between the courses a student takes and the clubs they join. Which of the following statements is the most precise conclusion?

fourth normal form Hard
A. The relation has a multivalued dependency and is not in 4NF.
B. The relation has no multivalued dependencies and is already in 4NF.
C. The relation has a functional dependency and is in BCNF.
D. The relation has a multivalued dependency and violates 2NF.

44 A relation has candidate key and the functional dependencies . Which statement is true?

third normal form Hard
A. R is already in 3NF because D is part of the candidate key.
B. R is in 1NF, but not in 2NF because is a partial dependency.
C. R is in 2NF, but not in 3NF due to the transitive dependency .
D. R is in 3NF because for the dependency , C is a prime attribute.

45 Consider three tables: Departments(DeptID PK, Name), Employees(EmpID PK, Name, DeptID FK), and Projects(ProjID PK, LeadEmpID FK). Employees.DeptID references Departments.DeptID with ON DELETE SET NULL. Projects.LeadEmpID references Employees.EmpID with ON DELETE CASCADE. What is the result of deleting a department from the Departments table that has 5 employees, one of whom is a lead for 2 projects?

data integrity rules Hard
A. The department is deleted, and the 5 employees are deleted, which in turn deletes the 2 projects.
B. The department is deleted, and the 5 employees' DeptID is set to NULL. The Projects table is unaffected.
C. The delete operation fails due to a referential integrity constraint violation in the Projects table.
D. The department is deleted, the 5 employees' DeptID is set to NULL, and the 2 projects led by one of those employees are also deleted.

46 A relation has functional dependencies . Which statement is correct?

second normal form Hard
A. The relation is not in 2NF because it contains partial dependencies.
B. The relation is in 3NF but not BCNF.
C. The relation is in 2NF but not 3NF.
D. The relation is in BCNF.

47 Given a set of functional dependencies on a relation . Which of the following sets of FDs, , is NOT equivalent to (i.e., and do not generate the same closure)?

functional dependency Hard
A.
B.
C.
D.

48 A relation has functional dependencies . Which of the following statements is the most accurate?

boyce codd normal form Hard
A. R is in 3NF but not in BCNF.
B. R is in BCNF.
C. R is not in 2NF.
D. R is in 2NF but not in 3NF.

49 Given a relation with the multivalued dependency and the functional dependency . Which of the following dependencies must also hold in R according to the inference rules?

multivalued dependencies Hard
A.
B.
C.
D. No other non-trivial dependency must hold.

50 A table PROJECT_ASSIGNMENTS has columns (ProjID, ProjName, EmpID, EmpName, HourlyRate). The FDs are ProjID -> ProjName and EmpID -> {EmpName, HourlyRate}. The primary key is (ProjID, EmpID). This design primarily aims to solve which problem, but fails most critically at preventing what anomaly?

need of normalization Hard
A. Aims to solve insertion anomalies; fails to prevent deletion anomalies.
B. Aims to solve data redundancy; fails to prevent update anomalies.
C. Aims to prevent referencing invalid employees; fails to prevent data redundancy.
D. Aims to solve update anomalies; fails to prevent insertion anomalies.

51 Consider a relation with FDs . A decomposition of R into , , and is:

third normal form Hard
A. Lossy and not dependency preserving.
B. Lossless but not dependency preserving.
C. Dependency preserving but lossy.
D. Lossless and dependency preserving.

52 A Users table contains a column Preferences of type JSON, which stores a structure like {"theme": "dark", "notifications": ["email", "sms"]}. According to Codd's original definition of 1NF, which requires all attributes to be atomic, how is this table best classified?

first normal form Hard
A. It is not a valid relational model table and normalization rules do not apply.
B. It is in 1NF because the database system treats the JSON object as an atomic string or blob.
C. It is in 2NF because there are no partial dependencies, but it is not in 1NF.
D. It violates 1NF because the Preferences column contains a non-atomic, structured value.

53 A relation is in BCNF. Under which condition could this relation NOT be in 4NF?

fourth normal form Hard
A. It is impossible; every relation in BCNF is also in 4NF.
B. If it contains a non-trivial multivalued dependency where X is not a superkey.
C. If it contains a trivial multivalued dependency .
D. If it contains a functional dependency where X is a proper subset of a candidate key.

54 Using Armstrong's axioms (Reflexivity, Augmentation, Transitivity), which of the following inference rules requires the use of BOTH augmentation and transitivity in its proof?

functional dependency Hard
A. Union Rule ( and implies )
B. Composition Rule ( and implies )
C. Decomposition Rule ( implies and )
D. Pseudotransitivity Rule ( and implies )

55 A table Tasks has a composite primary key (ProjectID, TaskNumber). It also has a foreign key DependsOnTask which references TaskNumber from the same table. The business rule is that a task's dependency must be within the same project. Why is this design flawed from a data integrity perspective?

data integrity rules Hard
A. The foreign key should reference the entire composite primary key (ProjectID, TaskNumber), not just TaskNumber.
B. A foreign key cannot reference the same table (a self-reference).
C. The ON DELETE cascade rule cannot be defined on a self-referencing foreign key.
D. The TaskNumber must be unique across all projects for this to work.

56 A relation R(A, B, C, D) has two candidate keys, AB and BC. It has the functional dependency . Which normal form is R in?

second normal form Hard
A. 1NF, but not 2NF.
B. 2NF, but not 3NF.
C. 3NF, but not BCNF.
D. BCNF.

57 Which of the following statements correctly distinguishes a trivial multivalued dependency (MVD) from a non-trivial MVD in a relation R with attribute set U?

multivalued dependencies Hard
A. An MVD is trivial if .
B. An MVD is trivial if Y contains only a single attribute.
C. An MVD is trivial only if it is also a functional dependency.
D. An MVD is trivial if or .

58 A relation has candidate key A and FDs . What is the most appropriate decomposition into a set of 3NF relations?

third normal form Hard
A.
B.
C.
D.

59 Consider a relation with FDs . What is the primary reason this relation might not be in BCNF, and what is its highest normal form?

boyce codd normal form Hard
A. The dependency violates 3NF because B is a non-prime attribute; the highest normal form is 2NF.
B. The dependency violates BCNF because it is a partial dependency; the highest normal form is 1NF.
C. All dependencies have a determinant that is a superkey; the relation is in BCNF.
D. The dependency violates BCNF if C is not a superkey; the highest normal form is 3NF.