Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

DBC - CH03

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Your university stores each student’s ID, name, and course in a table. What key ensures no duplicate student IDs exist?

a)

Foreign Key

b)

Composite Key

c)

Primary Key

d)

Secondary Key

2.

In a ride-hailing app, a driver can complete many trips, but each trip is linked to only one driver. What kind of relationship is this?

a)

M:N

b)

1:1

c)

Recursive

d)

1:M

3.

Which key is used only for data retrieval and not for entity identification?

a)

Super Key

b)

Primary Key

c)

Composite Key

d)

Secondary Key

4.

You're designing a database for a smart fridge that tracks expiry dates of items. Which attribute would most likely allow NULL values?

a)

Item Name

b)

Expiry Date

c)

Storage Temperature

d)

Disposal Date

5.

Which key contains minimum required attributes to uniquely identify a row?

a)

Candidate Key

b)

Super Key

c)

Composite Key

d)

Foreign Key

6.

Why should NULLs be avoided in primary keys?

a)

They confuse programmers

b)

They slow down queries

c)

They violate uniqueness

d)

They make data visually messy

7.

A mobile wallet links user payments to bank accounts. Which key ensures each payment references the correct bank account?

a)

Composite Key

b)

Primary Key

c)

Foreign Key

d)

Candidate Key

8.

Which type of relationship cannot be directly implemented in the relational model?

a)

1:1

b)

1:M

c)

M:N

d)

Self-join

9.

What happens if a foreign key value doesn’t match any primary key in the referenced table?

a)

Nothing

b)

Referential integrity is violated

c)

Table is deleted

d)

Index is corrupted

10.

You are building a library system. Each book has one ISBN. Some books have two authors. What model would help represent this?

a)

Add ISBN to author table

b)

Use 1:1 relationship

c)

Implement M:N with a junction table

d)

Use NULLs for second author

11.

What is a composite key?

a)

Key used for indexing

b)

Key made of multiple attributes

c)

Key with NULL values

d)

Duplicate of a primary key

12.

A fitness app tracks users’ daily steps and calories. What key would link a user to their daily health logs?

a)

Secondary Key

b)

Foreign Key

c)

Unique Key

d)

Primary Key

13.

Which of the following is true about data redundancy?

a)

It is always bad

b)

It helps in referential integrity

c)

It can cause anomalies if uncontrolled

d)

It improves query speed

14.

What is the main function of an index in a table?

a)

Delete duplicate rows

b)

Restrict NULLs

c)

Speed up data retrieval

d)

Secure data entries

15.

If Shopee wanted to show buyers only items they've searched before, what concept would help link buyer behavior with product logs?

a)

Composite Key

b)

Candidate Key

c)

Foreign Key

d)

Index Key

16.

Which of the following would be stored in a data dictionary?

a)

Usernames and passwords

b)

Rows of data

c)

Table names and attribute types

d)

Shopping cart contents

17.

You’re building a COVID-19 vaccine database. Some patients skipped second dose. Which attribute can allow NULL?

a)

Patient ID

b)

First dose date

c)

Second dose date

d)

Vaccine name

18.

What is functional dependence?

a)

When an attribute is optional

b)

When a table depends on another

c)

When value of one attribute determines another

d)

When all keys are foreign

19.

A super key must:

a)

Be made of multiple attributes only

b)

Be a key used only for retrieval

c)

Uniquely identify each row

d)

Always include foreign keys

20.

In a multi-user music streaming app, users create playlists. Each playlist contains multiple songs, and songs appear in multiple playlists. What relationship is this?

a)

1:M

b)

M:N

c)

1:1

d)

Composite