0% found this document useful (0 votes)
19 views

Computer AS TEST 5

The document is a unit test focused on databases, covering topics such as the advantages of relational databases over file-based systems, relationships within a database, and definitions of database terms. It includes questions on creating a database, identifying relationships, and writing Data Definition Language (DDL) and Data Manipulation Language (DML) statements. Additionally, it assesses knowledge of logic gates and the structure of a rental database.

Uploaded by

sumanbasnet80123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Computer AS TEST 5

The document is a unit test focused on databases, covering topics such as the advantages of relational databases over file-based systems, relationships within a database, and definitions of database terms. It includes questions on creating a database, identifying relationships, and writing Data Definition Language (DDL) and Data Manipulation Language (DML) statements. Additionally, it assesses knowledge of logic gates and the structure of a rental database.

Uploaded by

sumanbasnet80123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Name: UNIT TEST

15

1 Bobby and Kim are discussing databases.

(a) Bobby tells Kim that a file-based approach is usually better than a relational database.

Explain why Bobby is incorrect.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(b) Bobby has a shop that sells products to customers. His database will store data about his
customers, their payment details, orders and the products he sells. Customers will have login
details to access their accounts. The database will update customers’ payment and login
details without keeping any historical records.

(i) Give one example of each of the following relationships from Bobby’s database.

one-to-one

...........................................................................................................................................

...........................................................................................................................................

one-to-many

...........................................................................................................................................

...........................................................................................................................................

many-to-many

...........................................................................................................................................

...........................................................................................................................................
[3]

(ii) Tick (3) one box to identify the relationship that cannot be directly implemented in a
normalised relational database.

Relationship Tick (3)

one-to-one

one-to-many

many-to-many
[1]
© UCLES 2021 9618/13/M/J/21 [Turn over
16

(iii) Bobby wants to name his database SHOPORDERS.

Write a Data Definition Language (DDL) statement to define a new database with the
name SHOPORDERS.

...........................................................................................................................................

..................................................................................................................................... [1]

(c) A database has a data dictionary.

Give three items that are stored in a data dictionary.

1 ................................................................................................................................................

2 ................................................................................................................................................

3 ................................................................................................................................................
[3]

8 Tick (3) one box in each row to identify the logic gate that each statement describes.

Statement AND NAND NOR XOR OR

The output is 1 only when both inputs are 1

The output is 1 only when both inputs are different

The output is 1 only when both inputs are 0

[3]

Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.

Cambridge Assessment International Education is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of the University of
Cambridge Local Examinations Syndicate (UCLES), which itself is a department of the University of Cambridge.

© UCLES 2021 9618/13/M/J/21


2

2 Raj owns houses that other people rent from him. He has a database that stores details about
the people who rent houses, and the houses they rent. The database, HOUSE_RENTALS, has the
following structure:

CUSTOMER(CustomerID, FirstName, LastName, DateOfBirth, Email)


HOUSE(HouseID, HouseNumber, Road, Town, Bedrooms, Bathrooms)
RENTAL(RentalID, CustomerID, HouseID, MonthlyCost, DepositPaid)

(a) Give the definition of the following database terms, using an example from the database
HOUSE_RENTALS for each definition.

Term Definition and example

..............................................................................................................................
Field
..............................................................................................................................

..............................................................................................................................

..............................................................................................................................
Entity
..............................................................................................................................

..............................................................................................................................

..............................................................................................................................
Foreign key
..............................................................................................................................

..............................................................................................................................
[6]

(b) Tick (3) one box to identify whether the database HOUSE_RENTALS is in Third Normal Form
(3NF) or not in 3NF.
Justify your choice using one or more examples from the database HOUSE_RENTALS.

In 3NF

Not in 3NF

Justification ...............................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2021 9618/12/M/J/21


3

(c) Example data from the table RENTAL are given:

RentalID CustomerID HouseID MonthlyCost DepositPaid


1 22 15B5L 1000.00 Yes
2 13 3F 687.00 No
3 1 12AB 550.00 Yes
4 3 37 444.50 Yes

(i) Complete the following Data Definition Language (DDL) statement to define the table
RENTAL.

CREATE ...................................... ...................................... (

RentalID INTEGER NOT NULL,

CustomerID INTEGER NOT NULL,

HouseID ...................................... (5) NOT NULL,

MonthlyCost ...................................... NOT NULL,

DepositPaid BOOLEAN NOT NULL,

.......................................................... (RentalID)

);
[3]

(ii) Write a Data Manipulation Language (DML) script to return the first name and last name
of all customers who have not paid their deposit.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [3]

© UCLES 2021 9618/12/M/J/21 [Turn over

You might also like