wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

N5CS: Database Design

Total questions: 100

Worksheet time: 51mins

Name
Class
Date
1.

Which is a type of simple database consisting of a single table?

a)

Hierarchical database

b)

Flat-file database

c)

Cloud database

d)

NoSQL database

2.

What type of relationship cardinality between entities do you need to be able to use for N5 Computing Science?

a)

One-to-one

b)

Many-to-many

c)

One-to-many

d)

Many-to-one

3.

What database design elements should you be able to create and describe for N5 Computing Science?

a)

Process flow diagrams using three entities

b)

Entity-relationship diagrams using two entities

c)

UML diagrams using four entities

d)

Gantt charts using five entities

4.

For N5 Computing science you should be able to design, create, and explain a query making use of which elements?

a)

Tables, fields, search criteria, and sort order

b)

Macros, modules, forms, and reports

c)

Classes, objects, functions, and variables

d)

Spreadsheets, cells, formulas, and charts

5.

What type of database model is used in National 5 Computing Science?

a)

Hierarchical database model

b)

Network database model

c)

Relational database model

d)

Object-oriented database model

6.

What is a flat-file database particularly useful for?

a)

Storing data about a single entity

b)

Storing data about multiple entities

c)

Storing data with a single attribute

d)

Storing data with a single record

7.

Which of the following is NOT one of the three main elements of a relational database mentioned in the text?

a)

Entities

b)

Attributes

c)

Relationships

d)

Indexes

8.

In a flat-file database, what is used to represent a record?

a)

A field

b)

A column

c)

A row

d)

A table

9.

What is used to represent a field in a flat-file database?

a)

A record

b)

A column

c)

A row

d)

A table

10.

What is meant by an entity in the context of databases?

a)

A collection of attributes

b)

A naming convention

c)

A person, object or thing that we want to store information about

d)

A type of database system

11.

What is an entity set?

a)

A database system

b)

A single entity

c)

A collection of entities

d)

A naming convention for entities

12.

Which of the following is NOT an example of a suitable attribute for a student entity?

a)

First name

b)

Date of birth

c)

Color of eyes

d)

Postcode

13.

What naming convention is normally used for attribute and entity names?

a)

Uppercase letters with spaces (FIRST NAME)

b)

Lowercase letters with no spaces or punctuation (firstname)

c)

CamelCase notation (firstName)

d)

Randomly mixed case with special characters (fIrSt*NaMe)

14.

What would be the correct name for a Customer ID attribute in a database?

a)

CustomerID

b)

customerid

c)

customerID

d)

CustomerId

15.

Which of these attributes would most likely be associated with a 'car' entity?

a)

breed

b)

buildheight

c)

numberofseats

d)

visibledistance

16.

What is the correct name for a 'Date of Birth' attribute following the naming convention?

a)

DateOfBirth

b)

dateofbirth

c)

dateOfBirth

d)

Dateofbirth

17.

Which of these attributes would most likely be associated with a 'horse' entity?

a)

enginecapacity

b)

gallopspeed

c)

location

d)

tailength

18.

Which of these attributes would most likely be associated with a 'lighthouse' entity?

a)

steeringtype

b)

make

c)

visibledistance

d)

numberofseats

19.

Why is it useful to hold data in two entities rather than having it all in one?

a)

To avoid any repetition or duplication of data

b)

To make the data more complex

c)

To reduce the amount of data stored

d)

To avoid creating any relationships between data

20.

What attribute is shared between the hairdresser entity and the client entity to establish a relationship?

a)

salon

b)

contactnumber

c)

hairdresserid

d)

clientlastname

21.

Why are table names usually titled as singular (e.g., client) rather than plural (e.g., clients)?

a)

Beacuse it reflects that the table is a collection of single instances of entities

b)

Because it reflects the number of entities stored in the database

c)

Because singular titles are shorter than plural titles

d)

Because it is a requirement of the database software

22.

How many clients does the hairdresser with the firstname "Sharon" have according to the table?

a)

1

b)

2

c)

3

d)

4

23.

Which salon does the hairdresser with the hairdresserid "2210" work at?

a)

West Style

b)

On The Corner

c)

Cuts & Co

d)

Not listed

24.

What is the correct phone number for the client with clientid "10290"?

a)

0141 496 0536

b)

07700 900556

c)

07700 900569

d)

0151 496 0838

25.

Which hairdresser has the lastname "Christie"?

a)

Huda

b)

Sharon

c)

Phillip

d)

Michael

26.

What cardinality of relationship exists between the hairdresser and the client according to the example provided?

a)

Many-to-many relationship

b)

One-to-one relationship

c)

One-to-many relationship

d)

Many-to-one relationship

27.

How many clients does Phillip have based on the example given?

a)

2

b)

3

c)

4

d)

5

28.

According to the doctors and patients example, how many registered patients does Dr. James Brown have?

a)

1

b)

2

c)

3

d)

4

29.

Is it possible for a client to have more than one hairdresser according to the one-to-many relationship described?

a)

Yes, clients can have multiple hairdressers.

b)

No, each client can have just one hairdresser.

c)

Yes, but only if the hairdressers work at the same salon.

d)

No, clients cannot have a hairdresser at all.

30.

Which of the following patients are registered with Dr. James Brown?

a)

Mr. Rob Elliott

b)

Miss Louise Flower

c)

Mr. Henry Ford

d)

Miss Iona Jones

31.

What is a primary key in a relational database?

a)

A key that opens the main database

b)

A unique identifier for each occurrence of an entity

c)

A key that connects two tables together

d)

A duplicate identifier for entities

32.

How many posts has HappyHarry created according to the image?

a)

3

b)

4

c)

5

d)

6

33.

How many users posted post number 281792?

a)

1

b)

2

c)

3

d)

4

34.

At National 5 level, how many types of relationships will you encounter?

a)

one-to-one and one-to-many relationships

b)

Only one-to-many relationships

c)

Only one-to-one relationships

d)

All types of relationships

35.

What attribute is the primary key for the doctor entity in the Doctor/patient primary keys example?

a)

doctorname

b)

patientid

c)

doctorid

d)

patientname

36.

What attribute is the primary key for the patient entity in the Doctor/patient primary keys example?

a)

doctorname

b)

patientid

c)

doctorid

d)

patientname

37.

What attribute is the primary key for the user entity in the User/post example?

a)

accountname

b)

userid

c)

postid

d)

postcontent

38.

What attribute is the primary key for the post entity in the User/post primary keys example?

a)

accountname

b)

userid

c)

postid

d)

postcontent

39.

What is the purpose of a foreign key in a database?

a)

To uniquely identify a record in a table

b)

To establish a relationship between two entities

c)

To store data temporarily

d)

To increase the performance of database queries

40.

In the hairdresser/client example, which field in the 'client' entity acts as a foreign key?

a)

clientid

b)

clientfirstname

c)

hairdresserid

d)

phonenumber

41.

Which salon does the hairdresser with the hairdresserid '2019' work at?

a)

West Style

b)

On The Corner

c)

Cuts & Co

d)

Not listed

42.

How many clients are associated with the hairdresserid '2210' in the 'client' entity?

a)

One

b)

Two

c)

Three

d)

Four

43.

Which field is the foreign key in the Doctor/Patient relationship example?

a)

doctorname

b)

patientid

c)

doctorid

d)

patientname

44.

Which of the following is a correct Doctor/Patient relationship based on the foreign key?

a)

Dr Paul Johnson - Mr Henry Ford

b)

Dr Wendy Reid - Mr Gordon Buck

c)

Dr Vanessa Smith - Mrs Morag Proudfoot

d)

Dr James Brown - Miss Iona Jones

45.

Which field is the foreign key in the User/Post relationship example?

a)

accountname

b)

postid

c)

userid

d)

postcontent

46.

Which of the following is NOT a correct User/Post relationship based on the foreign key?

a)

NKSL - DAY #21 on...

b)

GameTag101 - Want to get back into ...

c)

WhoRYou - You know you've been...

d)

HappyHarry - Well done Stirling...

47.

Which symbol is typically used to indicate a primary key when listing the attributes of an entity?

a)

#

b)

_

c)

*

d)

$

48.

Which symbol is typically used to indicate a foreign key when listing the attributes of an entity?

a)

#

b)

_

c)

*

d)

$

49.

How many posts were added by the user "WhoRYou" according to the example?

a)

One

b)

Two

c)

Three

d)

Four

50.

Which of the following is NOT a correct representation of an entity and its attributes?

a)

hairdresser (hairdresserid, firstname, lastname, contactnumber, salon)

b)

client (hairdresserid, clientid, clientfirstname, clientlastname, phonenumber)

c)

doctor (doctorid, doctorname)

d)

post (userid*, postid, postcontent)

51.

Which field is the primary key for the employee table?

a)

firstname

b)

lastname

c)

employeeid

d)

telephone

52.

Which field is a foreign key in the workbase table?

a)

baseid

b)

workbase

c)

daysallocated

d)

employeeid

53.

On which day is the workbase 'Desk81' allocated for employee DD187?

a)

Tuesday

b)

Wednesday

c)

Monday

d)

Thursday

54.

Which employee is associated with the telephone number 07700 955555?

a)

Vanya Hargreaves

b)

Eudora Patch

c)

Rex Pennycrumb

d)

Chuck Beaman

55.

On which day is the workbase 'KL002' allocated for employee ED176?

a)

Monday

b)

Tuesday

c)

Thursday

d)

Friday

56.

What type of attribute would normally store the data for the attribute 'lastname'?

a)

Text

b)

Number

c)

Date

d)

Boolean

57.

How many characters could the attribute 'lastname' contain?

a)

16 characters

b)

256 characters

c)

20 characters

d)

Variable as depends on validation used

58.

Which data type is used to represent numeric values that can be integer or decimal?

a)

Text

b)

Number

c)

Date

d)

Boolean

59.

How many orders has customer Elizabeth Sherman made?

a)

3

b)

2

c)

1

d)

0

60.

Which item did Leopold Kurtz order in the largest quantity?

a)

Glass winter bowl

b)

KitchenWorld oil bottle

c)

Party 6oz glasses

d)

Bluetooth headphones

61.

Which customer ordered Bluetooth headphones?

a)

Elizabeth Sherman

b)

Abraham Sapien

c)

Leopold Kurtz

d)

No-one did

62.

What is the correct data type for a surname such as "Jones"?

a)

Text

b)

Number

c)

Date

d)

Boolean

63.

Which data type should be used for a postcode like "TD7 0EG"?

a)

Boolean

b)

Time

c)

Text

d)

Number

64.

What data type is appropriate for an enrollment fee of "£27.50"?

a)

Date

b)

Number

c)

Boolean

d)

Time

65.

If an attribute is "All documents received" with a value of "True", what is the data type?

a)

Text

b)

Date

c)

Number

d)

Boolean

66.

What is the correct data type for an enrollment date like "23/03/14"?

a)

Time

b)

Boolean

c)

Number

d)

Time/Date

67.

Which data type should be used for a time such as "19:30"?

a)

Boolean

b)

Date

c)

Text

d)

Time/Date

68.

What data type is used for a qualification credit value of 24?

a)

Text

b)

Boolean

c)

Number

d)

Date

69.

What is the purpose of validation in the context of data entry for an attribute?

a)

To ensure the data entered is random

b)

To check that the data entered for an attribute is sensible and expected

c)

To increase the amount of data stored

d)

To make data entry more complicated

70.

What value will be assigned to an attribute if it fails a presence check validation?

a)

0

b)

Null

c)

""

d)

It is deleted from the database

71.

Which type of validation rule would be appropriate for a 'size' attribute that can only take the values S, M, L, XL, XXL?

a)

Presence check

b)

Restricted choice

c)

Field length

d)

Range

72.

What does the field length validation rule ensure?

a)

The attribute has a value

b)

The attribute's value is within a certain range of numbers

c)

The attribute's text value is no longer than a specified number of characters

d)

The attribute's value is one of a set of predefined options

73.

What is the purpose of range validation?

a)

To limit text attributes to a specific set of characters

b)

To ensure an attribute's value is not Null

c)

To restrict an attribute's value to a selection of predefined options

d)

To limit an attribute's numeric value between a maximum and a minimum

74.

Select the correct type of validation for the attribute "shoesizes" with UK children's shoes available in sizes 1 to 11.

a)

Presence check

b)

Restricted choice

c)

Field length

d)

Range

75.

What type of validation ensures a password for a website is 10 or more characters long?

a)

Presence check

b)

Restricted choice

c)

Field length

d)

Range

76.

Which type of validation is used to ensure that users accept the terms and conditions?

a)

Presence check

b)

Restricted choice

c)

Field length

d)

Range

77.

What type of validation is appropriate for a voting response that allows users to return "Yes", "No" or "Don't Know"?

a)

Presence check

b)

Restricted choice

c)

Field length

d)

Range

78.

What is a data dictionary?

a)

A dictionary of technical terms.

b)

A detailed design for one or more entities in a database system.

c)

A collection of data samples.

d)

A programming language.

79.

What type of data is the 'contactnumber' attribute in the 'hairdresser' entity?

a)

Text

b)

Number

c)

Date

d)

Boolean

80.

Which attribute in the 'client' entity is a foreign key?

a)

clientid

b)

clientfirstname

c)

clientlastname

d)

hairdresserid

81.

What is the primary key of the 'hairdresser' entity?

a)

salon

b)

lastname

c)

hairdresserid

d)

contactnumber

82.

Is the 'clientid' attribute in the 'client' entity a primary key or a foreign key?

a)

Primary key

b)

Foreign key

c)

Both primary and foreign key

d)

Neither primary nor foreign key

83.

What kind of validation is required for the 'salon' attribute in the 'hairdresser' entity?

a)

Length check

b)

Lookup from client

c)

Presence check

d)

Range check

84.

What does referential integrity ensure in a database system?

a)

That a foreign key value entered in a table must be unique.

b)

That a foreign key value entered in a table must exist as a primary key in the related table.

c)

That a primary key value can be left blank.

d)

That a table can exist without any primary or foreign keys.

85.

In the context of the provided data dictionary, which customer has a booking for a child party on 27/07/2018?

a)

Raymond Boyce

b)

Edgar Codd

c)

Larry Ellison

d)

Safra Catz

86.

What is the booking time for Larry Ellison's event?

a)

12:00

b)

11:00

c)

12:30

d)

14:00

87.

Which customers are NOT having a children's party??

a)

Raymond Boyce

b)

Edgar Codd

c)

Larry Ellison

d)

Safra Catz

88.

What does an Entity-relationship diagram (ERD) illustrate?

a)

The programming code used in databases

b)

The physical components of a computer system

c)

The structure of any database

d)

The user interface design of a database

89.

How is an entity set represented in an ERD?

a)

With a circle

b)

With a triangle

c)

With a rectangle

d)

With an arrow

90.

What must the name of an entity set always be?

a)

A plural name

b)

A singular name

c)

An acronym

d)

A verb

91.

What does the "crows feet" symbol in an ERD represent?

a)

The primary key attribute

b)

The 'many' side of the relationship

c)

The single entity in the relationship

d)

The 'one' side of the relationship

92.

How are attributes represented in an ERD?

a)

As rectangles

b)

As ovals

c)

As arrows

d)

As diamonds

93.

How is a key attribute indicated in an ERD?

a)

By writing it in bold

b)

By underlining it

c)

By italicizing it

d)

By enclosing it in a double oval

94.

What is the purpose of an entity relationship diagram?

a)

To outline the logical structure of databases

b)

To provide a step-by-step guide for database construction

c)

To serve as a user interface for database interaction

d)

To document the physical storage of data on a server

95.

What does an answer table represent in the context of a query?

a)

A collection of data that matches the requirements of the query

b)

The initial set of data before the query is executed

c)

A list of all possible queries within a database

d)

The programming code used to create the query

96.

Which of the following is NOT a component that the design of a query requires?

a)

Tables

b)

Fields

c)

Search criteria

d)

Programming languages

97.

What is the cardinality of the relationship between 'hairdresser' and 'client' in the provided entity relationship diagram?

a)

One-to-one

b)

One-to-many

c)

Many-to-one

d)

Many-to-many

98.

What are the fields in the 'artist' table as shown in the example database tables?

a)

albumid, title, artistid

b)

artistid, firstname, lastname

c)

title, firstname, lastname

d)

artistid, albumid, title

99.

Which wildcard character is used to replace any number of characters in a search query?

a)

#

b)

%

c)

*

d)

?

100.

What attribute in the 'post' entity typically serves as a primary key?

a)

postid

b)

userid

c)

postcontent

d)

timestamp