Unit 2: E-R Modeling - Practice Quiz

CAP570 — Advanced Database Techniques 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What does ER modeling primarily represent?

Basics of ER Modelling Easy
A. Program execution steps
B. Operating system processes
C. Network connection speeds
D. Data and its relationships

2 What is the main purpose of an ER diagram?

Basics of ER Modelling Easy
A. To calculate query execution time
B. To define programming syntax
C. To show database structure
D. To display computer hardware

3 What is an entity in an ER model?

Entities, Attributes, and Relationships Easy
A. A database command
B. A type of query
C. A real-world object
D. A table constraint

4 Which of the following is an example of an entity?

Entities, Attributes, and Relationships Easy
A. Student
B. StudentName
C. Enrolls
D. Primary key

5 What is an attribute?

Entities, Attributes, and Relationships Easy
A. A rule for network access
B. A group of SQL statements
C. A connection between databases
D. A property of an entity

6 Which attribute can be divided into smaller components?

Entities, Attributes, and Relationships Easy
A. Derived attribute
B. Multivalued attribute
C. Simple attribute
D. Composite attribute

7 What does a relationship describe in an ER model?

Entities, Attributes, and Relationships Easy
A. An association between entities
B. A restriction on a column
C. A duplicate database record
D. A value stored in a field

8 Which shape commonly represents an entity in an ER diagram?

ER Diagrams and Notations Easy
A. Oval
B. Rectangle
C. Diamond
D. Triangle

9 Which shape commonly represents an attribute in an ER diagram?

ER Diagrams and Notations Easy
A. Rectangle
B. Oval
C. Hexagon
D. Diamond

10 Which shape commonly represents a relationship in Chen notation?

ER Diagrams and Notations Easy
A. Circle
B. Diamond
C. Oval
D. Rectangle

11 What does a double oval usually represent?

ER Diagrams and Notations Easy
A. A weak relationship
B. A primary key
C. A derived entity
D. A multivalued attribute

12 During ER-to-relational conversion, an entity is usually mapped to what?

Conversion of ER Models to Relational Schemas Easy
A. A relation
B. An index only
C. A transaction
D. A constraint

13 How is a one-to-many relationship commonly represented in relational schemas?

Conversion of ER Models to Relational Schemas Easy
A. Using a database view
B. Using a transaction log
C. Using a foreign key
D. Using a stored procedure

14 What is commonly created for a many-to-many relationship?

Conversion of ER Models to Relational Schemas Easy
A. A new database server
B. A duplicate primary key
C. A separate relation
D. A transaction schedule

15 What does the letter A in ACID stand for?

Introduction and implementation of ACID properties Easy
A. Authorization
B. Atomicity
C. Aggregation
D. Availability

16 Which ACID property ensures that committed data is not lost after a system failure?

Introduction and implementation of ACID properties Easy
A. Consistency
B. Durability
C. Isolation
D. Atomicity

17 What does isolation ensure in database transactions?

Introduction and implementation of ACID properties Easy
A. Queries always run instantly
B. All data is stored twice
C. Every table has one column
D. Transactions do not interfere improperly

18 Which constraint prevents a column from containing NULL values?

Constraints on relations Easy
A. UNIQUE
B. NOT NULL
C. DEFAULT
D. CHECK

19 Which constraint requires values in a column to be different?

Constraints on relations Easy
A. UNIQUE
B. DEFAULT
C. FOREIGN KEY
D. CHECK

20 What is a primary key used for?

Types of Keys Easy
A. Connecting to a network
B. Uniquely identifying rows
C. Formatting query results
D. Storing repeated values

21 A university system stores information about students, courses, and enrollments. Which ER modeling approach best represents the fact that one student can enroll in many courses and one course can have many students?

Basics of ER Modelling Medium
A. Create a one-to-one relationship between Student and Course
B. Store all courses as attributes of Student
C. Create a many-to-many relationship between Student and Course
D. Store all students as attributes of Course

22 In a hospital database, a patient has multiple phone numbers, and each phone number may be shared by members of the same household. How should phone number be modeled?

Entities, Attributes, and Relationships Medium
A. As a single-valued attribute of Patient
B. As a derived attribute of Patient
C. As a composite attribute of Patient
D. As a multivalued attribute of Patient

23 In standard Chen notation, which symbol represents a relationship set in an ER diagram?

ER Diagrams and Notations Medium
A. Double rectangle
B. Oval
C. Diamond
D. Rectangle

24 An ER model contains an entity Employee with key EmployeeID and a multivalued attribute Skill. Which relational mapping is appropriate?

Conversion of ER Models to Relational Schemas Medium
A. EmployeeSkill(EmployeeID, Skill)
B. Skill(EmployeeID, Skill)
C. Employee(EmployeeID, Skill)
D. Employee(EmployeeID), Skill(Skill)

25 A transaction transfers money from Account A to Account B. Which ACID property ensures that both the debit and credit occur together or neither occurs?

Introduction and implementation of ACID properties Medium
A. Consistency
B. Atomicity
C. Durability
D. Isolation

26 A relation Student(StudentID, Name, DepartmentID) contains a foreign key DepartmentID referencing Department(DepartmentID). Which operation may violate referential integrity?

Constraints on relations Medium
A. Inserting a student with an existing department
B. Selecting students from one department
C. Updating a student's name
D. Inserting a student with an unknown department

27 A relation Employee has attributes EmployeeID, Email, Name, and Department. Both EmployeeID and Email uniquely identify every employee, and EmployeeID is selected as the primary key. What is Email?

Types of Keys Medium
A. A candidate key
B. A foreign key
C. A partial key
D. A non-key attribute

28 A company wants to record the date on which each employee joins a project. Where should JoinDate be modeled when an employee can work on many projects and a project can have many employees?

Basics of ER Modelling Medium
A. As an attribute of Project
B. As an attribute of Employee
C. As an attribute of Department
D. As an attribute of the WorksOn relationship

29 A dependent cannot be uniquely identified without the Employee who supports the dependent. Which ER concept best represents Dependent?

Entities, Attributes, and Relationships Medium
A. Strong entity
B. Multivalued attribute
C. Weak entity
D. Recursive relationship

30 In an ER diagram, a double line connects the entity Employee to the relationship AssignedTo. What does this notation usually indicate?

ER Diagrams and Notations Medium
A. Total participation
B. A derived attribute
C. A multivalued attribute
D. Partial participation

31 For a one-to-many relationship between Department and Employee, where one department has many employees, where is the foreign key normally placed?

Conversion of ER Models to Relational Schemas Medium
A. In a separate relationship relation
B. In both relations as duplicate keys
C. In the Department relation
D. In the Employee relation

32 A transaction commits successfully, but the database server loses power immediately afterward. Which mechanism primarily supports recovery of the committed changes?

Introduction and implementation of ACID properties Medium
A. Domain constraint checking
B. Foreign-key validation
C. Write-ahead logging
D. Entity participation

33 Which constraint prevents two rows in a relation from having the same value for a declared primary key?

Constraints on relations Medium
A. Referential integrity constraint
B. Participation constraint
C. Domain constraint
D. Entity integrity constraint

34 A relation OrderLine(OrderID, ProductID, Quantity) uses the combination of OrderID and ProductID to identify each row. What type of key is this combination?

Types of Keys Medium
A. Partial primary attribute
B. Composite candidate key
C. Simple candidate key
D. Foreign superkey

35 A library records books and their authors. A book may have several authors, and an author may write several books. Which modeling decision is most appropriate?

Basics of ER Modelling Medium
A. Use a one-to-one Writes relationship
B. Use a many-to-many Writes relationship
C. Use a one-to-many Writes relationship
D. Make Author a multivalued attribute of Book

36 A customer address is stored as Street, City, State, and PostalCode, and users sometimes need the complete address and sometimes only the city. What type of attribute is Address?

Entities, Attributes, and Relationships Medium
A. Keyless attribute
B. Composite attribute
C. Simple attribute
D. Derived attribute

37 An ER diagram contains a relationship connecting the Employee entity to itself to represent supervision. What type of relationship is this?

ER Diagrams and Notations Medium
A. Recursive relationship
B. Binary relationship
C. Ternary relationship
D. Identifying relationship

38 A ternary relationship Supplies connects Supplier, Part, and Project. Which mapping preserves each specific supplier-part-project association?

Conversion of ER Models to Relational Schemas Medium
A. Create Supplies(SupplierID, PartID, ProjectID)
B. Add ProjectID only to Supplier
C. Merge all three entities into one table
D. Add only SupplierID to Part

39 Two concurrent transactions update the same inventory item. Which ACID property prevents one transaction from observing an inconsistent intermediate update by the other?

Introduction and implementation of ACID properties Medium
A. Consistency
B. Atomicity
C. Durability
D. Isolation

40 A column Age is defined to accept integer values from 18 through 65. Which constraint enforces this requirement?

Constraints on relations Medium
A. Domain constraint
B. Key constraint
C. Referential constraint
D. Cardinality constraint

41 A university system stores students, courses, and enrollments. A student may enroll in many courses, and a course may have many students. Each enrollment has a grade and a registration timestamp. What is the most semantically accurate ER modeling choice?

Basics of ER Modelling Hard
A. Model Enrollment as a multivalued attribute of Student
B. Model Enrollment as an associative entity for an M:N relationship
C. Model Enrollment as a weak entity owned by Course
D. Model Enrollment as a derived attribute of Course

42 A person can have several phone numbers, each phone number can belong to multiple people, and the same number may be labeled differently for each person. Which model best captures this requirement?

Entities, Attributes, and Relationships Hard
A. A composite Phone attribute containing Number and Label
B. A multivalued Phone attribute of Person
C. A Phone entity with a 1:N relationship to Person
D. A Phone entity with an M:N relationship and relationship attribute Label

43 In an ER diagram, every dependent must be associated with exactly one employee, while an employee may have zero or many dependents. Which cardinality and participation combination is correct?

ER Diagrams and Notations Hard
A. Employee 0..1, Dependent 1..N; both partial
B. Employee 1..N, Dependent 0..1; both total
C. Employee exactly 1, Dependent 0..N; Employee total
D. Employee 0..N, Dependent exactly 1; Dependent total

44 An identifying relationship connects strong entity Employee to weak entity Dependent. Dependent has partial key DependentName, and its owner key is EmployeeID. Which relational design is correct?

Conversion of ER Models to Relational Schemas Hard
A. Dependent(DependentName, EmployeeID) with both columns independently unique
B. Dependent(EmployeeID, DependentName) with a composite primary key
C. Dependent(DependentName) with EmployeeID stored only in Employee
D. Dependent(EmployeeID) with DependentName stored as a nullable attribute

45 A transaction transfers money by debiting one account and crediting another. The system must ensure that a crash cannot leave only one update committed. Which ACID property and implementation mechanism are most directly involved?

Introduction and implementation of ACID properties Hard
A. Atomicity enforced through write-ahead logging
B. Consistency enforced through denormalization
C. Durability enforced through dirty reads
D. Isolation enforced through index rebuilding

46 A relation Employee(EmployeeID, ManagerID) represents a management hierarchy. Every non-null ManagerID must reference an existing EmployeeID, but the top-level employee has no manager. Which constraint combination is required?

Constraints on relations Hard
A. ManagerID PRIMARY KEY and EmployeeID CHECK constraint
B. EmployeeID UNIQUE and ManagerID NOT NULL
C. EmployeeID PRIMARY KEY and ManagerID FOREIGN KEY permitting NULL
D. EmployeeID FOREIGN KEY and ManagerID UNIQUE NOT NULL

47 For relation Registration(StudentID, CourseID, Semester, Grade), assume a student can register for a course once per semester. Which statement correctly identifies a candidate key?

Types of Keys Hard
A. (StudentID, CourseID) is a candidate key
B. CourseID alone is a candidate key
C. StudentID alone is a candidate key
D. (StudentID, CourseID, Semester) is a candidate key

48 A hospital treats recurring episodes for patients. Each treatment episode has its own diagnosis and admission date, while a patient may have many episodes. Which modeling choice avoids incorrectly attaching episode-specific data to the patient?

Basics of ER Modelling Hard
A. Create TreatmentEpisode as an entity related to Patient
B. Represent each episode as a subtype of Patient
C. Store diagnosis as a multivalued Patient attribute
D. Store admission date as a derived Patient attribute

49 A customer address consists of street, city, state, and postal code, but customers may have multiple addresses, each classified as billing or shipping. Which decomposition is most appropriate?

Entities, Attributes, and Relationships Hard
A. Separate atomic attributes Street, City, and PostalCode only
B. A composite multivalued Address attribute with an address type
C. A derived address value computed from customer transactions
D. A single atomic Address attribute of Customer

50 A relationship has cardinality 1:N from Department to Employee, and every employee must belong to exactly one department. In standard ER notation, which interpretation is correct?

ER Diagrams and Notations Hard
A. Both sides have total participation
B. Department participation is partial and Employee participation is total
C. Department participation is total and Employee participation is partial
D. Both sides have partial participation

51 An M:N relationship WorksOn between Employee and Project has attributes Hours and AssignmentDate. Which mapping is correct?

Conversion of ER Models to Relational Schemas Hard
A. WorksOn(Hours, AssignmentDate) with no entity identifiers
B. Project(ProjectID, EmployeeID, Hours, AssignmentDate)
C. Employee(EmployeeID, ProjectID, Hours, AssignmentDate)
D. WorksOn(EmployeeID, ProjectID, Hours, AssignmentDate)

52 Transaction T1 reads a balance, transaction T2 updates and commits that balance, and T1 later reads it again during the same transaction. Which isolation phenomenon occurs if the two values differ?

Introduction and implementation of ACID properties Hard
A. Lost update
B. Non-repeatable read
C. Dirty read
D. Phantom insertion

53 A database requires every order item to reference an existing order, prohibits negative quantities, and prevents duplicate products within one order. Which constraint set enforces all three rules?

Constraints on relations Hard
A. CHECK constraint, trigger, and nullable foreign key
B. PRIMARY KEY, NULL constraint, and single-column index
C. Composite key, default value, and view definition
D. Foreign key, CHECK constraint, and composite UNIQUE constraint

54 Relation Flight(FlightNo, FlightDate, Origin, Destination) permits the same flight number on different dates. Which key choice is most appropriate if a flight instance is uniquely identified by its number and date?

Types of Keys Hard
A. FlightNo as the sole primary key
B. FlightDate as the sole primary key
C. (Origin, Destination) as a composite primary key
D. (FlightNo, FlightDate) as a composite primary key

55 A 1:1 relationship between Person and Passport is mandatory for Passport but optional for Person. Passport is best stored with a foreign key to Person. Where should the relationship's attribute IssueDate be stored?

Conversion of ER Models to Relational Schemas Hard
A. Only in Passport
B. Only in Person
C. Duplicated in both relations
D. In a separate relation without foreign keys

56 After a transaction commits, the database server loses power before dirty pages reach disk. Which mechanism primarily ensures the committed changes can be recovered?

Introduction and implementation of ACID properties Hard
A. Read-committed isolation
B. Foreign-key validation
C. Strict two-phase locking
D. Write-ahead logging with redo

57 A company employs people who may serve as engineers, managers, or both. Every employee must belong to at least one of these categories, and category-specific attributes differ. Which specialization constraint is appropriate?

Basics of ER Modelling Hard
A. Disjoint and total
B. Overlapping and total
C. Disjoint and partial
D. Overlapping and partial

58 A project has multiple phases, and phase numbers are unique only within a project. A phase cannot exist independently of its project. How should Phase be modeled?

Entities, Attributes, and Relationships Hard
A. As a subtype of Project identified by ProjectID
B. As a strong entity identified by PhaseNumber
C. As a multivalued attribute of Project
D. As a weak entity with Project as owner and PhaseNumber as partial key

59 In a ternary relationship Supplies(Supplier, Part, Project), the constraint says that for a given Supplier and Project, at most one Part is supplied. Which key constraint does this imply?

ER Diagrams and Notations Hard
A. (Supplier, Part) determines Project
B. (Supplier, Project) determines Part
C. Project determines Part
D. Supplier determines Project

60 A table stores nullable values in a column covered by a UNIQUE constraint. Under standard SQL semantics, which statement is generally correct?

Constraints on relations Hard
A. Only one NULL is permitted
B. Every NULL must match a referenced key
C. Multiple NULLs may be permitted because NULL is not equal to NULL
D. NULL values automatically violate uniqueness