Databases and SQL – A Level Computer Science (9618)
31 questions · page 3 of 3
Question text
1
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]
(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)
);
[4]
(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.
…
…
…
…
…