Font size
WorksheetsDatabase ERD and Attributes Quiz
Total questions: 96
Worksheet time: 48mins
In a university ERD, Student is represented as a rectangle with attributes such as StudentID, Name, and BirthDate. What does the rectangle represent?
Attribute
Entity
Relationship
Table
In an ERD, an oval connected to an entity represents:
Attribute
Relationship
Key
Cardinality
Employee has an attribute FullName which is split into FirstName and LastName. FullName is considered what type of attribute?
Composite
Simple
Derived
Multivalued
An attribute like Age that is calculated from BirthDate is called:
Composite
Simple
Derived
Multivalued
In an ERD for a library system, Book has an attribute Genre that can have multiple values for one book. What type of attribute is Genre?
Composite
Multivalued
Simple
Derived
A diamond shape in an ERD represents:
Entity
Attribute
Relationship
Key
If Teacher and Subject are connected with a line labeled “teaches,” what is “teaches” in ERD terminology?
Attribute
Relationship
Entity
Cardinality
In a school ERD, each student has one ID card, and each card belongs to only one student. This is what type of relationship?
One-to-One
One-to-Many
Many-to-Many
Recursive
Each customer can place many orders, but each order belongs to only one customer. This is:
One-to-One
One-to-Many
Many-to-Many
Weak relationship
Students can enroll in many courses, and each course can have many students. This is:
One-to-One
One-to-Many
Many-to-Many
Recursive
A relationship where an entity is related to itself is called:
Recursive
Reflexive
Self-Referencing
Both A and C
A weak entity:
Can be uniquely identified without another entity
Depends on a strong entity for identification
Always has a composite key
Cannot have attributes
The attribute that uniquely identifies each entity instance is called:
Foreign Key
Primary Key
Composite Key
Candidate Key
The ERD notation “(1,1)” next to an entity in a relationship indicates:
Optional participation
Mandatory participation, exactly one instance
Zero or many instances
Unknown participation
Which is an example of optional participation?
A customer may or may not have placed an order
Every student must be enrolled in at least one subject
Every employee must belong to a department
Every order must have an order date
The maximum number of times an entity instance can participate in a relationship is called:
Cardinality
Degree
Participation
Mapping
The number of entities involved in a relationship is called:
Degree of relationship
Cardinality
Participation constraint
Mapping type
In a bank ERD, the relationship “owns” between Customer and Account is binary because:
It involves two entities
It involves only one entity
It involves three entities
It involves multiple attributes
A ternary relationship involves:
Two entities
Three entities
Four entities
Multiple attributes
In ERD design, identifying relationships are used for:
Strong entities
Weak entities
Derived attributes
Composite attributes
A strong entity:
Does not depend on other entities for identification
Has only derived attributes
Is always part of a recursive relationship
Cannot have a primary key
In crow’s foot notation, a line with three “toes” at the end represents:
One
Many
Exactly one
Zero
The “zero” symbol in crow’s foot notation indicates:
Optional participation
Many
Recursive relationship
Weak entity
Which of the following is NOT a common step in ERD creation?
Identify entities
Determine relationships
Assign attributes
Write stored procedures
The process of converting an ERD into tables is called:
Normalization
Mapping
Denormalization
Indexing
If an ERD has Order and OrderItem entities, and OrderItem depends on Order, then OrderItem is:
Strong entity
Weak entity
Attribute
Relationship
A relationship that connects more than two entities is called:
Binary
Unary
Ternary
Recursive
An attribute that is not part of any key is called:
Non-key attribute
Primary attribute
Composite attribute
Candidate attribute
In an ERD, underlined attributes usually mean:
Foreign key
Primary key
Multivalued attribute
Derived attribute
Which of the following can be both a primary key in one table and a foreign key in another?
StudentID
FullName
DateOfBirth
Address
In an ERD, a double oval represents:
Derived attribute
Multivalued attribute
Composite attribute
Foreign key
The symbol for a weak entity in an ERD is:
Rectangle
Double rectangle
Oval
Diamond
Which relationship type uses an associative entity for implementation?
One-to-One
One-to-Many
Many-to-Many
Recursive
A surrogate key is:
A system-generated unique identifier
A foreign key from another table
A natural key from real-world data
A derived attribute
When mapping a many-to-many relationship into a relational database, you:
Merge the two tables into one
Create a new table containing the primary keys of both entities
Use only one table
Ignore the relationship
An attribute like PhoneNumbers storing multiple phone numbers for one employee is:
Multivalued
Composite
Derived
Simple
The term “degree of relationship” refers to:
Number of attributes in an entity
Number of entities in a relationship
Number of keys in a table
Level of participation
A recursive relationship always involves:
Two different entities
One entity related to itself
Three entities
Weak entities only
Which of the following is true for a weak entity?
It has its own primary key
It must have a partial key and a foreign key from the strong entity
It cannot have attributes
It does not require relationships
A partial key is used:
In strong entities
In weak entities to uniquely identify related records
In composite attributes
Only for recursive relationships
In ERD creation, attributes that store calculated values are:
Derived attributes
Composite attributes
Multivalued attributes
Candidate keys
Which of the following shows total participation?
Every employee belongs to exactly one department
Some customers have no orders
Some books have no authors
Some subjects have no students
A relationship labeled “manages” between Manager and Department where each department has only one manager, and a manager can manage multiple departments is:
One-to-One
One-to-Many
Many-to-Many
Recursive
In ERD notation, a weak relationship is represented by:
Double diamond
Double oval
Dashed line
Solid line
Which is the best reason to use a surrogate key instead of a natural key?
The natural key changes frequently
The natural key is always numeric
The natural key is too short
The natural key is always unique
Which relationship cardinality is MOST likely between Country and CapitalCity?
One-to-One
One-to-Many
Many-to-Many
Recursive
Which statement is true about attributes in ERD?
They can only be numeric
They describe properties of entities or relationships
They must be primary keys
They cannot be derived
Which type of attribute requires a separate table when implemented in a relational database?
Derived
Multivalued
Composite
Simple
Which is a correct example of a composite attribute?
Full address split into street, city, and zip code
Age calculated from birthdate
Phone number stored in a single field
Product price
Which relationship requires breaking into two one-to-many relationships during implementation?
Many-to-Many
One-to-Many
One-to-One
Recursive
What type of key is CustomerID in the Sales table?
Primary Key
Foreign Key
Candidate Key
Composite Key
A Books table includes BookID, Title, and AuthorID. The AuthorID links to the Authors table. This relationship is an example of:
One-to-One
One-to-Many
Many-to-Many
Recursive
Which of the following best describes a composite key?
A key made up of two or more columns
A key that stores combined data values
A key used only for foreign key purposes
A key that changes values automatically
In an Orders table, the OrderDate column uses the DATE data type. Why is this important?
Ensures only numeric values can be stored
Prevents invalid formats like “32-13-2023”
Stores images of the order
Allows NULL values only
You are designing a table for storing employee email addresses. Which data type is most appropriate?
INTEGER
DATE
VARCHAR
BOOLEAN
The database rule that ensures no two students have the same StudentID is known as:
Entity Integrity
Referential Integrity
Domain Constraint
Null Constraint
In a Payments table, the PaymentID is the primary key, and OrderID is a foreign key. Which ensures that every OrderID entered in Payments exists in the Orders table?
Entity Integrity
Referential Integrity
Key Constraint
Normalization
Which of the following best represents a one-to-one relationship?
Each employee has one assigned ID card, and each card belongs to only one employee.
A student can enroll in many courses, and each course can have many students.
A customer can place multiple orders, but an order belongs to only one customer.
Authors can write multiple books, and each book can have multiple authors.
Which is an example of a many-to-many relationship?
Students and courses
Employees and ID cards
Customers and addresses (one per customer)
Products and barcodes (one barcode per product)
Which term describes a property or characteristic of an entity in a database?
Attribute
Relation
Tuple
Key
A table named Invoices has no repeating groups and each column contains atomic values. This table is in:
First Normal Form
Second Normal Form
Third Normal Form
Boyce-Codd Normal Form
Which statement about primary keys is TRUE?
They can contain duplicate values.
They must be unique and not NULL.
They must be numeric only.
They are optional in a table.
If a foreign key in one table does not match any primary key in the referenced table, what is violated?
Entity Integrity
Referential Integrity
Domain Constraint
Primary Rule
You are storing age values in a column. Which data type would be most efficient?
VARCHAR(255)
INTEGER
DATE
BOOLEAN
Which of the following is a candidate key?
Any attribute that can uniquely identify a record
A combination of two attributes only
A foreign key used for linking
Any attribute that is always numeric
If a table has two columns that can uniquely identify a record, each is considered a:
Composite Key
Foreign Key
Candidate Key
Null Key
A database designer avoids storing a customer’s city name in multiple tables. This is an example of:
Redundancy elimination
Data duplication
Data denormalization
Data violation
In a library system, BorrowedBooks contains both BookID and MemberID. The combination of these two uniquely identifies each borrowing record. This is a:
Composite Key
Foreign Key
Candidate Key
Alternate Key
The term “tuple” in database refers to:
A column
A row
A relationship
A key
If a column accepts only values from a predefined set, this is enforced by a:
Domain Constraint
Referential Integrity Rule
Primary Key
Foreign Key
Which is an example of an alternate key?
A unique email address in a Users table, when the primary key is UserID
A combination of first name and last name
A generated number used for indexing
A column that stores Boolean values
Which relationship type usually requires a junction table to implement?
One-to-One
One-to-Many
Many-to-Many
Self-referencing
Which constraint prevents a column from having no value?
UNIQUE
CHECK
NOT NULL
PRIMARY
A designer wants to ensure that Salary in the Employees table is greater than zero. Which constraint is appropriate?
CHECK
UNIQUE
PRIMARY KEY
FOREIGN KEY
Which is NOT a benefit of normalization?
Reducing redundancy
Improving data integrity
Speeding up every type of query
Organizing data logically
If a table’s non-key attributes depend on only part of a composite key, it violates:
First Normal Form
Second Normal Form
Third Normal Form
Boyce-Codd Normal Form
Which component in a database stores actual data in rows and columns?
Table
Index
View
Schema
You have a column Price storing values like $45.50. Which data type should be used?
DECIMAL
INTEGER
VARCHAR
DATE
Which object is used to speed up retrieval of rows in a database table?
Index
View
Constraint
Schema
The diagram showing how tables are related in a database is called:
Flowchart
ER Diagram
UML Diagram
Data Flow Diagram
Which is the smallest unit of data in a database table?
Record
Field value
Tuple
Table
If a database designer enforces that Gender must be either “M” or “F”, which constraint is used?
NOT NULL
CHECK
UNIQUE
PRIMARY
A relationship between a table and itself is called:
Self-referencing relationship
Reflexive key
Recursive relationship
Both A and C
Which is an example of denormalization?
Storing customer address in both Orders and Customers table for faster queries
Creating a separate table for addresses
Removing duplicate data
Adding constraints
A table that has a primary key but allows some NULL values in other columns violates:
First Normal Form
Second Normal Form
No rules
Referential Integrity
Which data type is most appropriate for a column storing “True” or “False” values?
BOOLEAN
INTEGER
CHAR
VARCHAR
Which term refers to the logical structure that defines how data is stored in a database?
Schema
Index
Field
View
Which is an example of a weak entity?
An OrderDetail table that depends on Orders
A Products table with a unique ProductID
A Customer table
An Employees table
The relationship where each student has only one adviser, and each adviser advises multiple students is:
One-to-One
One-to-Many
Many-to-Many
Recursive
Which is an advantage of using a foreign key?
It speeds up query performance
It ensures referential integrity
It reduces the number of columns
It creates composite keys
Which database object provides a virtual table based on a query result?
View
Index
Table
Schema
Which is an example of a derived attribute?
FullName created by combining FirstName and LastName
StudentID
BirthDate
A unique constraint is similar to a primary key, except:
It allows NULL values
It cannot be composite
It must be numeric
It is automatically indexed
Which term refers to the process of converting a conceptual model into a logical model?
Normalization
Mapping
Denormalization
Indexing
Which is NOT a characteristic of a good primary key?
Stability over time
Minimal storage space
Frequent changes
Uniqueness
Which constraint ensures that each row in a table is uniquely identifiable?
Primary Key
Foreign Key
Unique
Check
