Data modeling: ER diagrams, relational model, relational algebra and calculus, constraints and Codd rules. - Question Bank

1. Codd's Rule 11 (Integrity Rule) ensures that integrity constraints must be stored in the relational catalog and enforced by the DBMS.
A) True
B) False
C) Only primary key constraints
D) Only foreign key constraints
2. Which Codd rule is related to the ability to update views?
A) Rule 6: View updating rule
B) Rule 11: Integrity rule
C) Rule 12: Distribution independence
D) Rule 5: Data manipulation
3. Codd's Rule 10 (Logical Data Independence) ensures that:
A) Changes in the logical structure (e.g., adding columns) do not affect applications
B) The entire database schema must remain static
C) Only physical storage can be changed independently
D) Users can bypass logical constraints
4. What does Codd's Rule 9 (Physical Data Independence) guarantee?
A) That the database structure cannot be changed
B) That changes in physical storage (e.g., file organization) do not affect application programs
C) That all data is stored in a single file
D) That data is always stored in a normalized form
5. Codd's Rule 7 (High-level Insert, Update and Delete) states that the system must support:
A) Only single-row operations
B) Insert, update, and delete operations that can be applied to one or more rows
C) Operations only through stored procedures
D) Only read operations
6. Which Codd rule ensures that users can perform all data manipulation and definition operations through the relational model's high-level language?
A) Rule 5: The data sublanguage must be able to describe data manipulation and definition
B) Rule 6: View updating rule
C) Rule 7: High-level insert, update and delete
D) Rule 8: Physical data independence
7. Codd's Rule 4 requires that the database description (catalog) must be stored:
A) In a separate, non-relational system
B) In the same relational system, allowing relational operations on it
C) In a proprietary format for security
D) Only in memory for quick access
8. According to Codd's Rule 3, null values should be supported to represent:
A) Missing information or inapplicable information
B) Errors in data entry
C) Default values
D) Temporary data
9. Codd's Rule 2 (Guaranteed Access Rule) states that every scalar value in the database must be addressable:
A) By its data type
B) By a table name, column name, and primary key value
C) By its physical location
D) By a system-defined identifier
10. Which Codd rule states that the database must be logically representable using only the relational model, not as a network or hierarchy?
A) Rule 1: Information Rule
B) Rule 2: Guaranteed Access Rule
C) Rule 3: Systematic treatment of null values
D) Rule 4: Dynamic and extensible catalog based on the relational model
11. A CHECK constraint allows you to specify:
A) A condition that must be true for each row's values
B) A set of allowed values for a column
C) That a column cannot be NULL
D) A relationship with another table
12. The PRIMARY KEY constraint enforces which two constraints by default?
A) NOT NULL and FOREIGN KEY
B) UNIQUE and NOT NULL
C) UNIQUE and FOREIGN KEY
D) NOT NULL and CHECK
13. A UNIQUE constraint ensures that:
A) A column cannot have duplicate values (excluding NULLs)
B) A column cannot have NULL values
C) A column must be the primary key
D) A column must reference a value in another table
14. A NOT NULL constraint ensures that:
A) A column can only contain unique values
B) A column cannot have a NULL value
C) A column must match a value in another table
D) A column must contain a value from a predefined list
15. What is the purpose of constraints in a relational database?
A) To define the user interface
B) To enforce data integrity rules
C) To optimize query performance
D) To specify physical storage details
16. The fundamental difference between relational algebra and relational calculus is that algebra is __________ while calculus is _________.
A) declarative, procedural
B) procedural, declarative
C) visual, textual
D) simpler, complex
17. In domain relational calculus, a query is expressed as:
A) { T | P(T) } where T is a tuple and P(T) is a condition
B) { <x1, x2, ..., xn> | P(x1, x2, ..., xn) } where xi are domain variables and P is a condition
C) A set of relational algebra operations
D) A graphical representation of data
18. Which type of relational calculus uses domain variables?
A) Tuple relational calculus
B) Domain relational calculus
C) Relational algebra
D) Procedural calculus
19. In tuple relational calculus, a query is expressed as:
A) { T | P(T) } where T is a tuple and P(T) is a condition
B) { D | P(D) } where D is a domain value and P(D) is a condition
C) A sequence of relational algebra operations
D) A declarative statement of what data is needed
20. Which type of relational calculus uses tuple variables?
A) Domain relational calculus
B) Tuple relational calculus
C) Relational algebra
D) SQL
21. Relational calculus is a procedural query language.
A) True
B) False
C) Depends on the type of calculus
D) Partially true
22. The difference operation (A − B) in relational algebra returns tuples that are:
A) In relation A and also in relation B
B) In relation A but not in relation B
C) In relation B but not in relation A
D) In either relation A or relation B
23. Which relational algebra operation combines tuples from two relations that have the same attribute names and compatible domains, and where the tuples are identical in the common attributes?
A) Intersection (∩)
B) Difference (−)
C) Union (∪)
D) Join (⋈)
24. The Join operation (⋈) in relational algebra typically combines tuples from two relations based on:
A) Attribute names
B) Matching values in specified attributes
C) The union of their attributes
D) The intersection of their tuples
25. The Cartesian Product operation (A × B) between two relations A and B results in:
A) A relation containing tuples from A or B
B) A relation containing tuples that are in both A and B
C) A relation containing all possible combinations of tuples from A and B
D) A relation containing only the common attributes of A and B
26. Which relational algebra operation selects columns from a relation?
A) Selection (σ)
B) Projection (π)
C) Cartesian Product (×)
D) Rename (ρ)
27. Which relational algebra operation selects rows from a relation based on a condition?
A) Projection
B) Selection (σ)
C) Union (∪)
D) Join (⋈)
28. A foreign key is an attribute or set of attributes in one relation that refers to:
A) The primary key of the same relation
B) A candidate key of the same relation
C) The primary key of another relation
D) Any attribute of another relation
29. The primary key is:
A) Any candidate key
B) A chosen candidate key to uniquely identify tuples
C) A composite of all candidate keys
D) A key used for indexing only
30. A candidate key is a superkey that:
A) Contains all attributes of the relation
B) Has no proper subset that is also a superkey
C) Is chosen as the primary key
D) Is used for foreign key constraints
31. A superkey is a set of attributes that:
A) Uniquely identifies a tuple
B) Uniquely identifies a relation
C) Defines the domain of an attribute
D) Specifies the cardinality of a relationship
32. The number of tuples in a relation is known as its:
A) Cardinality
B) Degree
C) Attribute
D) Schema
33. The number of attributes in a relation is known as its:
A) Cardinality
B) Degree
C) Tuple
D) Schema
34. The set of permissible values for an attribute is called its:
A) Cardinality
B) Degree
C) Domain
D) Key
35. What is a column in a relation called in the relational model?
A) Tuple
B) Attribute
C) Cardinality
D) Relation
36. In the relational model, a row in a relation is called a:
A) Attribute
B) Tuple
C) Domain
D) Degree
37. Which of the following best describes the relational model?
A) A hierarchical structure of data
B) A network structure of data
C) Data organized into tables (relations)
D) Data stored as linked lists
38. The relationship between a weak entity type and its owner strong entity type is called:
A) Identifying relationship
B) Non-identifying relationship
C) Recursive relationship
D) Disjoint relationship
39. In an ER diagram, a weak entity type is typically represented by a:
A) Single rectangle
B) Double rectangle
C) Single diamond
D) Double diamond
40. A weak entity type is an entity type that:
A) Has no attributes
B) Cannot be uniquely identified by its own attributes
C) Is always associated with a strong entity
D) Has a many-to-many relationship
41. What does a double oval represent in an ER diagram?
A) A composite attribute
B) A multi-valued attribute
C) A derived attribute
D) A key attribute
42. An attribute whose value can be computed from other attributes is known as:
A) Multi-valued attribute
B) Composite attribute
C) Derived attribute
D) Key attribute
43. Which of the following is a type of attribute that can be broken down into smaller sub-parts?
A) Simple attribute
B) Composite attribute
C) Derived attribute
D) Key attribute
44. What is the primary purpose of an ER diagram?
A) To define the physical storage of data
B) To describe the logical structure of a database
C) To write complex SQL queries
D) To implement database security measures
45. In the context of ER diagrams, what does an oval shape usually represent?
A) An entity type
B) A relationship type
C) An attribute
D) A weak entity
46. What does a line connecting an entity type and a relationship type signify in an ER diagram?
A) A participation constraint
B) An attribute of the relationship
C) A cardinality ratio
D) A link between the entity and the relationship
47. Which symbol in an ER diagram is used to represent a relationship between entity types?
A) A diamond
B) An oval
C) A rectangle
D) A circle
48. In an Entity-Relationship (ER) diagram, what does a rectangle typically represent?
A) An attribute
B) A relationship
C) An entity type
D) A constraint