Filters
Year Range
20212025
2021
2022
2024
2025
Difficulty
Session
Variant
Sub-topic
30 questions
CAIEAS Level9618-as · Paper 1

Databases

30 questions· page 1 of 3

Q52025 May/Jun·P115 partsMedium-Easy
(a)

Complete the entity-relationship (E-R) diagram for the database.

(b)

Identify one attribute in the table CUSTOMER_CARD_DATA that could be a candidate key.

(c)

Identify two tables in the database that contain one or more foreign keys.

Give one attribute that is a foreign key in each table.

TableForeign key
1
2
(d)

Explain the reasons why the data in the table ORDER_ITEM cannot be stored in the table ORDER.

(e)

Write an Structured Query Language (SQL) script to output the customer ID, the customer’s name and the total cost of the customer’s orders that have not been paid.

The output of the total cost must have an appropriate title.

Similar questions
Q52025 May/Jun·P126 partsMedium-Easy
(a)

Explain the purpose of the table CHARACTER_ITEM in the database.

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

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

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

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

(b)

Underline the attribute, or attributes, that form the primary key in each of the tables.

USER(Username, Password, DateOfBirth)

CHARACTER(CharacterName, CharacterID, Username, Level, Money)

ITEM(ItemName, MinimumLevel, Cost)

CHARACTER_ITEM(CharacterID, ItemName)

(c)(i)

Identify two methods the DBMS can use to protect the data in the table USER from unauthorised access.

Explain how each method protects the data.

Method 1 ...........................................................................................................................

Explanation .......................................................................................................................

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

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

Method 2 ...........................................................................................................................

Explanation .......................................................................................................................

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

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

(c)(ii)

The DBMS also supports data integrity.

Give two ways that a DBMS can support data integrity.

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

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

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

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

(d)(i)

Write a Structured Query Language (SQL) script to count the number of items purchased by the user with the username "KAT123".

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

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

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

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

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

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

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

(d)(ii)

The following changes need to be made to the character with the ID "0002":

• level changed to 3
• money changed to 10000.00

Write an SQL script to change the character’s data.

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

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

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

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

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

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

Similar questions
Q62025 May/Jun·P135 partsMedium
(a)

Complete the entity-relationship (E-R) diagram for the database.

(b)

A new product needs to be entered into the database. The product has the ID 002323, the product name ‘Blue ball point 2mm’, there are 50 in a box, the product costs $5.00 and the supplier has the ID SFX223.

Write a Structured Query Language (SQL) script to enter the new product into the table PRODUCT.

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

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

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

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

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

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

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

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

(c)

The attribute Collected in the table ORDER stores the Boolean value TRUE if the order has been collected and FALSE if the order has not been collected.

Write an SQL script to return the customer name for each customer that has orders they have not collected. Include the number of orders each customer has not collected with an appropriate title.

An example output might be:

CustomerNameNotCollected
Jack Wright2
Lin Cho1
Santaya Yui1

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

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

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

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

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

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

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

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

(d)(i)

One feature provided by a DBMS is a data dictionary.

The data dictionary stores the attribute names, table names, foreign keys and primary keys in the database.

Identify three other items stored in a data dictionary.

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

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

3 ........................................................................................................................................

(d)(ii)

The DBMS provides a developer interface.

Explain how a database designer can make use of the developer interface.

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

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

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

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

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

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

Similar questions
Q22025 Oct/Nov·P115 partsMedium-Easy
(a)

Complete the entity-relationship (E-R) diagram for the database WORKEXPERIENCE.

(b)

Explain why the database WORKEXPERIENCE is in Third Normal Form (3NF).

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

(c)(i)

Write a Structured Query Language (SQL) script to delete all placements that have been completed.

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

(c)(ii)

Write an SQL script to return the total number of placements completed by the student with ID LDEA01 at the company with ID NEAM. The total should be given an appropriate name.

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

(d)

The database tables are repeated here:

STUDENT(StudentID, FirstName, TelephoneNumber, UniversityName)

PLACEMENT(PlacementID, StudentID, CompanyID, StartDate, EndDate, Complete)

COMPANY(CompanyID, CompanyName, MaxStudentsPerPlacement)

Explain what is meant by referential integrity, and how it applies to this database.

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

Similar questions
Q42025 Oct/Nov·P124 partsMedium-Easy
(a)

Describe the relationship between the two tables. Refer to the primary and foreign keys in your answer.

(b)

The table CONTAINER needs an additional field to store the data for the last inspection date.

Write a Structured Query Language (SQL) script to add one field to the table CONTAINER to store the date of last inspection of the container, for example 08/07/2019.

(c)

Write an SQL script to return the number of containers stored in the database for the ship with the name Caledonia.

(d)

Describe the purpose of a developer interface in a Database Management System (DBMS).

Similar questions
Q52025 Oct/Nov·P134 partsMedium-Easy
(a)

Complete the entity-relationship (E-R) diagram for the database REVIEWS.

(b)

Some example data from the STAFF table is shown.

StaffIDStaffFirstNameStaffLastNameDepartmentRemoteWorker
1RalphJuraEYes
2LucaEmceeAYes
3DarwinAculaFNo

Write a Structured Query Language (SQL) script to define the table STAFF.

(c)

Products are given a rating between 1 and 10 inclusive.

Write an SQL script to return only the ProductID, ProductName and ComplaintDetails for all products with a rating of 5 or less. The results need to be displayed in descending order of rating.

(d)

A Database Management System (DBMS) is used to maintain and manage the database.

Describe two ways in which the DBMS can be used to ensure the security of the customer data.

Similar questions
Q62024 May/Jun·P114 partsMedium-Hard
(a)

Create a 3-table design for this database normalised to Third Normal Form (3NF).

Give your table design in the format:

TableName(PrimaryKey, Field1, Field2, …)

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

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

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

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

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

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

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

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

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

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

(b)

The company is using a Database Management System (DBMS) to set up the database.

Describe what is meant by the following DBMS features:

Data dictionary ..........................................................................................................................

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

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

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

Logical schema .........................................................................................................................

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

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

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

(c)(i)

The database FARMING has a second table created named PLAYER that has the primary key PlayerID.

The field PlayerID in EVENT needs to be set up as a foreign key to link to PlayerID in PLAYER.

Write a Structured Query Language (SQL) script to change the table definition for EVENT to link the foreign key to PLAYER.

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

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

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

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

(c)(ii)

Write an SQL script to return the number of events that each player has completed.

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

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

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

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

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

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

Similar questions
Q42024 May/Jun·P124 partsEasy
(a)

Identify the relationship between EXAM and EXAM_QUESTION.

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

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

(b)

Sample data for the table EXAM is shown:

ExamIDSubjectLevelTotalMarks
00956124Computer Science275
00956125Computer Science3120
00956126Mathematics2100
00956127Mathematics3150
00956128Physics270
00956129Physics380

Write a Structured Query Language (SQL) script to define the table EXAM.

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

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

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

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

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

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

(c)

The table EXAM_QUESTION has been created but the foreign key has not been linked.

Write an SQL script to update EXAM_QUESTION and link the foreign key to EXAM.

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

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

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

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

(d)

The database also needs to store data about the students, the exams the students have taken and the marks the students achieved in each question of each exam.

Describe the additional tables that will need to be included in the database and explain how all the tables in the database will be linked.

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

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

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

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

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

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

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

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

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

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

Similar questions
Q42024 May/Jun·P134 partsEasy
(a)

Identify the relationship between the tables PERFORMANCE and SHOW.

(b)

Sample data for the table PERFORMANCE is shown:

PerformanceIDShowIDShowDateStartTime
0001MK125/5/202513:00
0002MK125/5/202519:30
0003MK126/5/202519:00
0004OP37/5/202518:30
0005OP38/5/202518:30
0006OP39/5/202513:00

Write a Structured Query Language (SQL) script to define the table PERFORMANCE.

(c)

Write an SQL script to return the number of times each show is scheduled. For example, in the sample data in part (b), the show MK12 is scheduled three times.

The result needs to include the show name and a suitable field name for the number of times it is scheduled.

(d)

Customers give their first name, last name and email address when they are making a booking. One booking can include multiple seats.

Describe the additional tables that will need to be included in the database and explain how these tables will be linked within the database.

Similar questions
Q22024 Oct/Nov·P115 partsMedium-Easy
(a)

Give one limitation of using a file-based approach to store the data and explain how a relational database addresses this limitation.

(b)(i)

Complete the entity-relationship (E-R) diagram for the given tables.

(b)(ii)

The table shows sample data for the table REPAIR_PART.

PartIDRepairNumberQuantity
ACD128SA00223
PPOR543DWW00221
TR45300231
PPOR543DWW00232
WED500245

Write a Structured Query Language (SQL) script to define the table REPAIR_PART.

Include constraints (restrictions) on the data that can be entered into each field where appropriate.

(b)(iii)

Suppliers send invoices to the company for the parts that are used. A new table, INVOICE, stores the data about each invoice and whether it has been paid or not.

The design for the table INVOICE is shown:

INVOICE(InvoiceID, SupplierID, AmountDue, Paid, DatePaid)

The table shows sample data for the table INVOICE.

InvoiceIDSupplierIDAmountDuePaidDatePaid
000001JK67522.50TRUE01/01/2024
000002WR443358.99FALSE
000003JK67510.21FALSE

Write an SQL script to return the total amount due to the supplier with the ID of JK675 for all the invoices that have not currently been paid.

(c)

Complete the table by writing a definition for each of the database terms.

TermDefinition
Referential integrity
Candidate key
Tuple
Similar questions