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. Operating system processes
B. Network connection speeds
C. Program execution steps
D. Data and its relationships

2 What is the main purpose of an ER diagram?

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

3 What is an entity in an ER model?

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

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

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

5 What is an attribute?

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

6 Which attribute can be divided into smaller components?

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

7 What does a relationship describe in an ER model?

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

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

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

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

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

10 Which shape commonly represents a relationship in Chen notation?

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

11 What does a double oval usually represent?

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

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

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

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 stored procedure
C. Using a foreign key
D. Using a transaction log

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 separate relation
C. A duplicate primary key
D. A transaction schedule

15 What does the letter A in ACID stand for?

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

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. Isolation
C. Durability
D. Atomicity

17 What does isolation ensure in database transactions?

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

18 Which constraint prevents a column from containing NULL values?

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

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

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

20 What is a primary key used for?

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

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 many-to-many relationship between Student and Course
B. Create a one-to-one relationship between Student and Course
C. Store all students as attributes of Course
D. Store all courses as attributes of Student

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 composite attribute of Patient
B. As a single-valued attribute of Patient
C. As a multivalued attribute of Patient
D. As a derived attribute of Patient

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

ER Diagrams and Notations Medium
A. Diamond
B. Double rectangle
C. Oval
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. Employee(EmployeeID, Skill)
C. Skill(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. Durability
B. Consistency
C. Isolation
D. Atomicity

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 unknown department
B. Updating a student's name
C. Inserting a student with an existing department
D. Selecting students from one 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 partial key
B. A foreign key
C. A non-key attribute
D. A candidate key

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 Employee
B. As an attribute of Department
C. As an attribute of Project
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. Weak entity
B. Recursive relationship
C. Multivalued attribute
D. Strong entity

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. Partial participation
B. Total participation
C. A derived attribute
D. A multivalued attribute

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 the Department relation
B. In a separate relationship relation
C. In the Employee relation
D. In both relations as duplicate keys

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. Entity participation
B. Foreign-key validation
C. Domain constraint checking
D. Write-ahead logging

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. Foreign superkey
B. Partial primary attribute
C. Simple candidate key
D. Composite candidate key

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 one-to-many Writes relationship
C. Use a many-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. Derived attribute
B. Keyless attribute
C. Composite attribute
D. Simple 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. Binary relationship
B. Recursive 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. Merge all three entities into one table
B. Add only SupplierID to Part
C. Create Supplies(SupplierID, PartID, ProjectID)
D. Add ProjectID only to Supplier

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. Durability
C. Atomicity
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. Key constraint
B. Referential constraint
C. Cardinality constraint
D. Domain 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 weak entity owned by Course
B. Model Enrollment as an associative entity for an M:N relationship
C. Model Enrollment as a multivalued attribute of Student
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 Phone entity with a 1:N relationship to Person
C. A Phone entity with an M:N relationship and relationship attribute Label
D. A multivalued Phone attribute of Person

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..N, Dependent exactly 1; Dependent total
B. Employee exactly 1, Dependent 0..N; Employee total
C. Employee 1..N, Dependent 0..1; both total
D. Employee 0..1, Dependent 1..N; both partial

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) with EmployeeID stored only in Employee
B. Dependent(EmployeeID, DependentName) with a composite primary key
C. Dependent(DependentName, EmployeeID) with both columns independently unique
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. Durability enforced through dirty reads
C. Isolation enforced through index rebuilding
D. Consistency enforced through denormalization

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 FOREIGN KEY and ManagerID UNIQUE NOT NULL
D. EmployeeID PRIMARY KEY and ManagerID FOREIGN KEY permitting 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. CourseID alone is a candidate key
B. (StudentID, CourseID) 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. Store diagnosis as a multivalued Patient attribute
C. Represent each episode as a subtype of Patient
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. A composite multivalued Address attribute with an address type
B. Separate atomic attributes Street, City, and PostalCode only
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. Department participation is partial and Employee participation is total
B. Both sides have total participation
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. Project(ProjectID, EmployeeID, Hours, AssignmentDate)
B. WorksOn(EmployeeID, ProjectID, Hours, AssignmentDate)
C. WorksOn(Hours, AssignmentDate) with no entity identifiers
D. Employee(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. Phantom insertion
B. Lost update
C. Dirty read
D. Non-repeatable read

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. PRIMARY KEY, NULL constraint, and single-column index
B. Composite key, default value, and view definition
C. CHECK constraint, trigger, and nullable foreign key
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. (Origin, Destination) as a composite primary key
C. FlightDate as the sole 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 Person
B. Only in Passport
C. In a separate relation without foreign keys
D. Duplicated in both relations

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. Write-ahead logging with redo
C. Strict two-phase locking
D. Foreign-key validation

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. Overlapping and partial
B. Disjoint and partial
C. Disjoint and total
D. Overlapping and total

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 weak entity with Project as owner and PhaseNumber as partial key
D. As a multivalued attribute of Project

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. Project determines Part
B. (Supplier, Project) determines Part
C. Supplier determines Project
D. (Supplier, Part) 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. Multiple NULLs may be permitted because NULL is not equal to NULL
B. NULL values automatically violate uniqueness
C. Only one NULL is permitted
D. Every NULL must match a referenced key