wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Database ERD and Attributes Quiz

Total questions: 96

Worksheet time: 48mins

Name
Class
Date
1.

In a university ERD, Student is represented as a rectangle with attributes such as StudentID, Name, and BirthDate. What does the rectangle represent?

a)

Attribute

b)

Entity

c)

Relationship

d)

Table

2.

In an ERD, an oval connected to an entity represents:

a)

Attribute

b)

Relationship

c)

Key

d)

Cardinality

3.

Employee has an attribute FullName which is split into FirstName and LastName. FullName is considered what type of attribute?

a)

Composite

b)

Simple

c)

Derived

d)

Multivalued

4.

An attribute like Age that is calculated from BirthDate is called:

a)

Composite

b)

Simple

c)

Derived

d)

Multivalued

5.

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?

a)

Composite

b)

Multivalued

c)

Simple

d)

Derived

6.

A diamond shape in an ERD represents:

a)

Entity

b)

Attribute

c)

Relationship

d)

Key

7.

If Teacher and Subject are connected with a line labeled “teaches,” what is “teaches” in ERD terminology?

a)

Attribute

b)

Relationship

c)

Entity

d)

Cardinality

8.

In a school ERD, each student has one ID card, and each card belongs to only one student. This is what type of relationship?

a)

One-to-One

b)

One-to-Many

c)

Many-to-Many

d)

Recursive

9.

Each customer can place many orders, but each order belongs to only one customer. This is:

a)

One-to-One

b)

One-to-Many

c)

Many-to-Many

d)

Weak relationship

10.

Students can enroll in many courses, and each course can have many students. This is:

a)

One-to-One

b)

One-to-Many

c)

Many-to-Many

d)

Recursive

11.

A relationship where an entity is related to itself is called:

a)

Recursive

b)

Reflexive

c)

Self-Referencing

d)

Both A and C

12.

A weak entity:

a)

Can be uniquely identified without another entity

b)

Depends on a strong entity for identification

c)

Always has a composite key

d)

Cannot have attributes

13.

The attribute that uniquely identifies each entity instance is called:

a)

Foreign Key

b)

Primary Key

c)

Composite Key

d)

Candidate Key

14.

The ERD notation “(1,1)” next to an entity in a relationship indicates:

a)

Optional participation

b)

Mandatory participation, exactly one instance

c)

Zero or many instances

d)

Unknown participation

15.

Which is an example of optional participation?

a)

A customer may or may not have placed an order

b)

Every student must be enrolled in at least one subject

c)

Every employee must belong to a department

d)

Every order must have an order date

16.

The maximum number of times an entity instance can participate in a relationship is called:

a)

Cardinality

b)

Degree

c)

Participation

d)

Mapping

17.

The number of entities involved in a relationship is called:

a)

Degree of relationship

b)

Cardinality

c)

Participation constraint

d)

Mapping type

18.

In a bank ERD, the relationship “owns” between Customer and Account is binary because:

a)

It involves two entities

b)

It involves only one entity

c)

It involves three entities

d)

It involves multiple attributes

19.

A ternary relationship involves:

a)

Two entities

b)

Three entities

c)

Four entities

d)

Multiple attributes

20.

In ERD design, identifying relationships are used for:

a)

Strong entities

b)

Weak entities

c)

Derived attributes

d)

Composite attributes

21.

A strong entity:

a)

Does not depend on other entities for identification

b)

Has only derived attributes

c)

Is always part of a recursive relationship

d)

Cannot have a primary key

22.

In crow’s foot notation, a line with three “toes” at the end represents:

a)

One

b)

Many

c)

Exactly one

d)

Zero

23.

The “zero” symbol in crow’s foot notation indicates:

a)

Optional participation

b)

Many

c)

Recursive relationship

d)

Weak entity

24.

Which of the following is NOT a common step in ERD creation?

a)

Identify entities

b)

Determine relationships

c)

Assign attributes

d)

Write stored procedures

25.

The process of converting an ERD into tables is called:

a)

Normalization

b)

Mapping

c)

Denormalization

d)

Indexing

26.

If an ERD has Order and OrderItem entities, and OrderItem depends on Order, then OrderItem is:

a)

Strong entity

b)

Weak entity

c)

Attribute

d)

Relationship

27.

A relationship that connects more than two entities is called:

a)

Binary

b)

Unary

c)

Ternary

d)

Recursive

28.

An attribute that is not part of any key is called:

a)

Non-key attribute

b)

Primary attribute

c)

Composite attribute

d)

Candidate attribute

29.

In an ERD, underlined attributes usually mean:

a)

Foreign key

b)

Primary key

c)

Multivalued attribute

d)

Derived attribute

30.

Which of the following can be both a primary key in one table and a foreign key in another?

a)

StudentID

b)

FullName

c)

DateOfBirth

d)

Address

31.

In an ERD, a double oval represents:

a)

Derived attribute

b)

Multivalued attribute

c)

Composite attribute

d)

Foreign key

32.

The symbol for a weak entity in an ERD is:

a)

Rectangle

b)

Double rectangle

c)

Oval

d)

Diamond

33.

Which relationship type uses an associative entity for implementation?

a)

One-to-One

b)

One-to-Many

c)

Many-to-Many

d)

Recursive

34.

A surrogate key is:

a)

A system-generated unique identifier

b)

A foreign key from another table

c)

A natural key from real-world data

d)

A derived attribute

35.

When mapping a many-to-many relationship into a relational database, you:

a)

Merge the two tables into one

b)

Create a new table containing the primary keys of both entities

c)

Use only one table

d)

Ignore the relationship

36.

An attribute like PhoneNumbers storing multiple phone numbers for one employee is:

a)

Multivalued

b)

Composite

c)

Derived

d)

Simple

37.

The term “degree of relationship” refers to:

a)

Number of attributes in an entity

b)

Number of entities in a relationship

c)

Number of keys in a table

d)

Level of participation

38.

A recursive relationship always involves:

a)

Two different entities

b)

One entity related to itself

c)

Three entities

d)

Weak entities only

39.

Which of the following is true for a weak entity?

a)

It has its own primary key

b)

It must have a partial key and a foreign key from the strong entity

c)

It cannot have attributes

d)

It does not require relationships

40.

A partial key is used:

a)

In strong entities

b)

In weak entities to uniquely identify related records

c)

In composite attributes

d)

Only for recursive relationships

41.

In ERD creation, attributes that store calculated values are:

a)

Derived attributes

b)

Composite attributes

c)

Multivalued attributes

d)

Candidate keys

42.

Which of the following shows total participation?

a)

Every employee belongs to exactly one department

b)

Some customers have no orders

c)

Some books have no authors

d)

Some subjects have no students

43.

A relationship labeled “manages” between Manager and Department where each department has only one manager, and a manager can manage multiple departments is:

a)

One-to-One

b)

One-to-Many

c)

Many-to-Many

d)

Recursive

44.

In ERD notation, a weak relationship is represented by:

a)

Double diamond

b)

Double oval

c)

Dashed line

d)

Solid line

45.

Which is the best reason to use a surrogate key instead of a natural key?

a)

The natural key changes frequently

b)

The natural key is always numeric

c)

The natural key is too short

d)

The natural key is always unique

46.

Which relationship cardinality is MOST likely between Country and CapitalCity?

a)

One-to-One

b)

One-to-Many

c)

Many-to-Many

d)

Recursive

47.

Which statement is true about attributes in ERD?

a)

They can only be numeric

b)

They describe properties of entities or relationships

c)

They must be primary keys

d)

They cannot be derived

48.

Which type of attribute requires a separate table when implemented in a relational database?

a)

Derived

b)

Multivalued

c)

Composite

d)

Simple

49.

Which is a correct example of a composite attribute?

a)

Full address split into street, city, and zip code

b)

Age calculated from birthdate

c)

Phone number stored in a single field

d)

Product price

50.

Which relationship requires breaking into two one-to-many relationships during implementation?

a)

Many-to-Many

b)

One-to-Many

c)

One-to-One

d)

Recursive

51.

What type of key is CustomerID in the Sales table?

a)

Primary Key

b)

Foreign Key

c)

Candidate Key

d)

Composite Key

52.

A Books table includes BookID, Title, and AuthorID. The AuthorID links to the Authors table. This relationship is an example of:

a)

One-to-One

b)

One-to-Many

c)

Many-to-Many

d)

Recursive

53.

Which of the following best describes a composite key?

a)

A key made up of two or more columns

b)

A key that stores combined data values

c)

A key used only for foreign key purposes

d)

A key that changes values automatically

54.

In an Orders table, the OrderDate column uses the DATE data type. Why is this important?

a)

Ensures only numeric values can be stored

b)

Prevents invalid formats like “32-13-2023”

c)

Stores images of the order

d)

Allows NULL values only

55.

You are designing a table for storing employee email addresses. Which data type is most appropriate?

a)

INTEGER

b)

DATE

c)

VARCHAR

d)

BOOLEAN

56.

The database rule that ensures no two students have the same StudentID is known as:

a)

Entity Integrity

b)

Referential Integrity

c)

Domain Constraint

d)

Null Constraint

57.

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?

a)

Entity Integrity

b)

Referential Integrity

c)

Key Constraint

d)

Normalization

58.

Which of the following best represents a one-to-one relationship?

a)

Each employee has one assigned ID card, and each card belongs to only one employee.

b)

A student can enroll in many courses, and each course can have many students.

c)

A customer can place multiple orders, but an order belongs to only one customer.

d)

Authors can write multiple books, and each book can have multiple authors.

59.

Which is an example of a many-to-many relationship?

a)

Students and courses

b)

Employees and ID cards

c)

Customers and addresses (one per customer)

d)

Products and barcodes (one barcode per product)

60.

Which term describes a property or characteristic of an entity in a database?

a)

Attribute

b)

Relation

c)

Tuple

d)

Key

61.

A table named Invoices has no repeating groups and each column contains atomic values. This table is in:

a)

First Normal Form

b)

Second Normal Form

c)

Third Normal Form

d)

Boyce-Codd Normal Form

62.

Which statement about primary keys is TRUE?

a)

They can contain duplicate values.

b)

They must be unique and not NULL.

c)

They must be numeric only.

d)

They are optional in a table.

63.

If a foreign key in one table does not match any primary key in the referenced table, what is violated?

a)

Entity Integrity

b)

Referential Integrity

c)

Domain Constraint

d)

Primary Rule

64.

You are storing age values in a column. Which data type would be most efficient?

a)

VARCHAR(255)

b)

INTEGER

c)

DATE

d)

BOOLEAN

65.

Which of the following is a candidate key?

a)

Any attribute that can uniquely identify a record

b)

A combination of two attributes only

c)

A foreign key used for linking

d)

Any attribute that is always numeric

66.

If a table has two columns that can uniquely identify a record, each is considered a:

a)

Composite Key

b)

Foreign Key

c)

Candidate Key

d)

Null Key

67.

A database designer avoids storing a customer’s city name in multiple tables. This is an example of:

a)

Redundancy elimination

b)

Data duplication

c)

Data denormalization

d)

Data violation

68.

In a library system, BorrowedBooks contains both BookID and MemberID. The combination of these two uniquely identifies each borrowing record. This is a:

a)

Composite Key

b)

Foreign Key

c)

Candidate Key

d)

Alternate Key

69.

The term “tuple” in database refers to:

a)

A column

b)

A row

c)

A relationship

d)

A key

70.

If a column accepts only values from a predefined set, this is enforced by a:

a)

Domain Constraint

b)

Referential Integrity Rule

c)

Primary Key

d)

Foreign Key

71.

Which is an example of an alternate key?

a)

A unique email address in a Users table, when the primary key is UserID

b)

A combination of first name and last name

c)

A generated number used for indexing

d)

A column that stores Boolean values

72.

Which relationship type usually requires a junction table to implement?

a)

One-to-One

b)

One-to-Many

c)

Many-to-Many

d)

Self-referencing

73.

Which constraint prevents a column from having no value?

a)

UNIQUE

b)

CHECK

c)

NOT NULL

d)

PRIMARY

74.

A designer wants to ensure that Salary in the Employees table is greater than zero. Which constraint is appropriate?

a)

CHECK

b)

UNIQUE

c)

PRIMARY KEY

d)

FOREIGN KEY

75.

Which is NOT a benefit of normalization?

a)

Reducing redundancy

b)

Improving data integrity

c)

Speeding up every type of query

d)

Organizing data logically

76.

If a table’s non-key attributes depend on only part of a composite key, it violates:

a)

First Normal Form

b)

Second Normal Form

c)

Third Normal Form

d)

Boyce-Codd Normal Form

77.

Which component in a database stores actual data in rows and columns?

a)

Table

b)

Index

c)

View

d)

Schema

78.

You have a column Price storing values like $45.50. Which data type should be used?

a)

DECIMAL

b)

INTEGER

c)

VARCHAR

d)

DATE

79.

Which object is used to speed up retrieval of rows in a database table?

a)

Index

b)

View

c)

Constraint

d)

Schema

80.

The diagram showing how tables are related in a database is called:

a)

Flowchart

b)

ER Diagram

c)

UML Diagram

d)

Data Flow Diagram

81.

Which is the smallest unit of data in a database table?

a)

Record

b)

Field value

c)

Tuple

d)

Table

82.

If a database designer enforces that Gender must be either “M” or “F”, which constraint is used?

a)

NOT NULL

b)

CHECK

c)

UNIQUE

d)

PRIMARY

83.

A relationship between a table and itself is called:

a)

Self-referencing relationship

b)

Reflexive key

c)

Recursive relationship

d)

Both A and C

84.

Which is an example of denormalization?

a)

Storing customer address in both Orders and Customers table for faster queries

b)

Creating a separate table for addresses

c)

Removing duplicate data

d)

Adding constraints

85.

A table that has a primary key but allows some NULL values in other columns violates:

a)

First Normal Form

b)

Second Normal Form

c)

No rules

d)

Referential Integrity

86.

Which data type is most appropriate for a column storing “True” or “False” values?

a)

BOOLEAN

b)

INTEGER

c)

CHAR

d)

VARCHAR

87.

Which term refers to the logical structure that defines how data is stored in a database?

a)

Schema

b)

Index

c)

Field

d)

View

88.

Which is an example of a weak entity?

a)

An OrderDetail table that depends on Orders

b)

A Products table with a unique ProductID

c)

A Customer table

d)

An Employees table

89.

The relationship where each student has only one adviser, and each adviser advises multiple students is:

a)

One-to-One

b)

One-to-Many

c)

Many-to-Many

d)

Recursive

90.

Which is an advantage of using a foreign key?

a)

It speeds up query performance

b)

It ensures referential integrity

c)

It reduces the number of columns

d)

It creates composite keys

91.

Which database object provides a virtual table based on a query result?

a)

View

b)

Index

c)

Table

d)

Schema

92.

Which is an example of a derived attribute?

a)

FullName created by combining FirstName and LastName

b)

StudentID

c)

BirthDate

d)

Email

93.

A unique constraint is similar to a primary key, except:

a)

It allows NULL values

b)

It cannot be composite

c)

It must be numeric

d)

It is automatically indexed

94.

Which term refers to the process of converting a conceptual model into a logical model?

a)

Normalization

b)

Mapping

c)

Denormalization

d)

Indexing

95.

Which is NOT a characteristic of a good primary key?

a)

Stability over time

b)

Minimal storage space

c)

Frequent changes

d)

Uniqueness

96.

Which constraint ensures that each row in a table is uniquely identifiable?

a)

Primary Key

b)

Foreign Key

c)

Unique

d)

Check