Data Modeling - entity-relationship diagrams, relational model, constraints, relational algebra, relational calculus, Codd rules - Question Bank

1. What is the primary advantage of using a declarative query language like SQL (which is based on relational calculus) over a procedural one like relational algebra?
A) Easier to write low-level data access code.
B) Better performance optimization by the DBMS.
C) More control over the execution plan.
D) Simpler syntax for complex operations.
2. Which of Codd's rules is often considered the most important for enforcing the relational model's integrity?
A) Rule 1: Information Rule
B) Rule 2: Guaranteed Access Rule
C) Rule 3: Systematic Treatment of Null Values
D) Rule 5: Comprehensive Data Sublanguage
3. In the context of ER diagrams, a 'cardinality ratio' defines:
A) The number of attributes in an entity.
B) The number of entities participating in a relationship.
C) The maximum and minimum number of instances of one entity that can be related to instances of another entity.
D) The type of data stored in an attribute.
4. Which of the following is NOT a standard operator in Relational Algebra?
A) Select
B) Project
C) Aggregate
D) Join
5. The concept of a 'relation' in the relational model is formally defined as:
A) A list of records.
B) A set of tuples.
C) A hierarchical structure.
D) A network of interconnected nodes.
6. What is the purpose of the 'non-subversion' rule (Rule 12) in Codd's 12 rules?
A) To ensure that the system can handle distributed data.
B) To ensure that the system cannot be used to bypass security.
C) To ensure that the system supports a high-level data manipulation language.
D) To ensure that the system handles NULL values correctly.
7. Which of Codd's rules implies that the database should not contain any 'foreign keys' in the traditional sense, but rather rely on relational algebra operations for relating tables?
A) Rule 1: Information Rule
B) Rule 2: Guaranteed Access Rule
C) Rule 11: Distribution Independence
D) Rule 12: Non-subversion
8. Codd's Rule 9, 'Logical Data Independence', ensures that:
A) Changes to the overall database schema do not affect applications.
B) Changes to the physical storage do not affect applications.
C) Users can access data without knowing the logical schema.
D) The logical structure of the database can be changed arbitrarily.
9. What does Codd's Rule 8, 'Physical Data Independence', ensure?
A) Users can query data without knowing the table structure.
B) Application programs remain unaffected by changes in physical storage structures.
C) Data integrity is maintained regardless of physical storage.
D) Data can be accessed at the physical record level.
10. Codd's Rule 6, the 'View Update Rule', states that:
A) All views must be updatable.
B) The system must support the modification of data through views.
C) Views are only for read operations.
D) Views can only be updated if they are based on a single table.
11. Which of Codd's rules is fundamental to the concept of relational algebra and calculus, stating that data manipulation must be supported by a high-level language?
A) Rule 5: Comprehensive Data Sublanguage
B) Rule 6: View Update Rule
C) Rule 7: High-level Insert, Update, and Delete
D) Rule 8: Physical Data Independence
12. Codd's Rule 4 emphasizes the importance of:
A) Physical data independence.
B) Logical data independence.
C) A dynamic and online data dictionary or catalog.
D) View definition capabilities.
13. According to Codd's rules, what must be supported for handling missing or inapplicable information?
A) A universal default value.
B) A systematic treatment of NULL values.
C) A separate table for missing data.
D) Data imputation techniques.
14. Codd's Rule 2, the 'Guaranteed Access Rule', states that:
A) Every distinct piece of data must be addressable using a primary key.
B) All data must be stored in tables.
C) Users must be able to access data without knowing its physical location.
D) NULL values must be handled consistently.
15. Which of Codd's rules states that the database must be logically representable and accessible through the relational model alone?
A) Rule 1: Information Rule
B) Rule 2: Guaranteed Access Rule
C) Rule 3: Systematic Treatment of Null Values
D) Rule 4: Dynamic online catalog
16. Codd's 12 Rules are a set of criteria for evaluating:
A) The efficiency of SQL queries.
B) The quality and functionality of relational database management systems (RDBMS).
C) The design of ER diagrams.
D) The security protocols of a database.
17. What is the relationship between Relational Algebra and Relational Calculus?
A) They are fundamentally different and cannot express the same queries.
B) They are equivalent in expressive power; any query expressible in one can be expressed in the other.
C) Relational Algebra is more powerful than Relational Calculus.
D) Relational Calculus is a subset of Relational Algebra.
18. In Tuple Relational Calculus, a query is expressed as:
A) A set of conditions on attributes.
B) A set of tuples satisfying certain conditions.
C) A procedure to traverse the database.
D) A graphical representation of data flow.
19. Which type of relational calculus focuses on specifying the domains (possible values) that attributes must take?
A) Tuple Relational Calculus
B) Domain Relational Calculus
C) Relational Algebra
D) Set Theory Calculus
20. Which type of relational calculus focuses on specifying the variables that tuples must range over?
A) Domain Relational Calculus
B) Tuple Relational Calculus
C) Relational Algebra
D) Procedural Calculus
21. What is Relational Calculus?
A) A procedural query language for the relational model.
B) A declarative query language for the relational model.
C) A graphical representation of database schema.
D) A set of rules for database normalization.
22. Which relational algebra operator is used to remove duplicate tuples from a relation?
A) Select (σ)
B) Project (π)
C) Difference (-)
D) Union (∪)
23. The Union operation (∪) in relational algebra requires that the two relations have:
A) Compatible schemas (same number of attributes and compatible types).
B) The same primary key.
C) The same number of tuples.
D) Disjoint attribute sets.
24. Which relational algebra operator corresponds to the SQL `WHERE` clause?
A) Select (σ)
B) Project (π)
C) Join (⋈)
D) Difference (-)
25. Which relational algebra operator corresponds to the SQL `SELECT` statement that specifies columns?
A) Select (σ)
B) Project (π)
C) Join (⋈)
D) Union (∪)
26. The Join operation (⋈) in relational algebra combines tuples from two relations based on:
A) A condition on attributes.
B) The union of their attributes.
C) The difference between their attributes.
D) The Cartesian product of their attributes.
27. What is the symbol for the Project operation in relational algebra?
A) σ
B) ⋈
C) π
D) ∪
28. What is the symbol for the Select operation in relational algebra?
A) π
B) σ
C) ⋈
D) ρ
29. Which relational algebra operator is used to select columns from a relation?
A) Select (σ)
B) Project (π)
C) Rename (ρ)
D) Cartesian Product (×)
30. Which relational algebra operator is used to select rows from a relation based on a condition?
A) Project (π)
B) Select (σ)
C) Join (⋈)
D) Union (∪)
31. What is Relational Algebra?
A) A procedural query language for the relational model.
B) A declarative query language for the relational model.
C) A graphical representation of database schema.
D) A set of rules for database normalization.
32. What is the fundamental difference between a PRIMARY KEY and a UNIQUE constraint?
A) A PRIMARY KEY can contain NULL values, while a UNIQUE constraint cannot.
B) A UNIQUE constraint can contain NULL values, while a PRIMARY KEY cannot.
C) A PRIMARY KEY can have multiple columns, while a UNIQUE constraint can only have one.
D) A PRIMARY KEY implicitly creates a clustered index, while a UNIQUE constraint does not.
33. A CHECK constraint is used to:
A) Ensure uniqueness of values.
B) Ensure that values in a column satisfy a specified condition.
C) Prevent NULL values.
D) Establish relationships between tables.
34. What does the 'NOT NULL' constraint enforce on a column?
A) All values in the column must be unique.
B) The column cannot contain NULL values.
C) The column must contain only numeric values.
D) The column must refer to a value in another table.
35. Which constraint ensures that the values in a specific column are unique across all rows?
A) NOT NULL constraint
B) PRIMARY KEY constraint
C) UNIQUE constraint
D) FOREIGN KEY constraint
36. What is a 'foreign key' in the relational model?
A) A key that uniquely identifies a tuple within its own relation.
B) A set of attributes in one relation that refers to the primary key of another relation.
C) A key that can be null.
D) A key composed of multiple attributes.
37. What is a 'primary key' in a relational table?
A) A set of attributes that can uniquely identify a tuple, but may be shared by other tables.
B) A set of attributes that uniquely identifies a tuple and cannot be null.
C) A set of attributes that links to the primary key of another table.
D) An attribute that stores descriptive information about a tuple.
38. What is the term for the number of tuples in a relation?
A) Cardinality
B) Degree
C) Arity
D) Modality
39. What is the term for the number of attributes in a relation?
A) Cardinality
B) Degree
C) Arity
D) Modality
40. What is an 'attribute' in the relational model?
A) A row in a relation.
B) A column in a relation.
C) A relationship between tables.
D) A unique identifier for a tuple.
41. In the relational model, what is a 'tuple'?
A) A column in a relation.
B) A row in a relation.
C) The name of a relation.
D) A constraint on data values.
42. What is the relational model?
A) A data model based on nested lists and pointers.
B) A data model based on tables (relations) consisting of rows and columns.
C) A hierarchical data model.
D) A network data model.
43. A 'participation constraint' in an ERD specifies:
A) The maximum number of instances an entity can participate in a relationship.
B) The minimum number of instances an entity must participate in a relationship.
C) The type of relationship (e.g., 1:1, 1:N).
D) The attributes of an entity.
44. Which type of relationship in an ERD indicates that each instance of an entity can be associated with at most one instance of another entity?
A) One-to-Many (1:N)
B) Many-to-One (N:1)
C) One-to-One (1:1)
D) Many-to-Many (M:N)
45. What is a 'weak entity' in the context of ER diagrams?
A) An entity that has no attributes.
B) An entity that cannot be uniquely identified by its own attributes and requires a foreign key from another entity.
C) An entity that is optional in a relationship.
D) An entity that represents a many-to-many relationship.
46. An oval shape connected to an entity or relationship in an ERD represents:
A) A primary key
B) A foreign key
C) An attribute
D) A composite entity
47. What does a diamond shape represent in an ERD?
A) An entity
B) An attribute
C) A relationship
D) A weak entity
48. In an ERD, what does a rectangle typically represent?
A) An attribute of an entity.
B) A relationship between entities.
C) An entity set.
D) A constraint.
49. What is the primary purpose of an Entity-Relationship Diagram (ERD)?
A) To define the physical storage structure of data.
B) To represent the logical structure of a database and the relationships between entities.
C) To write SQL queries for data retrieval.
D) To manage database security and user access.