Exercise on Databases

1.  

What is a relational database? Provide an example.

2.  

A new computerised library system is being designed to replace the old paper-based system of a particular school library.

a)   Define the following terms:

i)    Database

ii)   Record

iii) Field

iv) Item

b)  Name two tables you would expect to find in this system.

c)   List three fields you would expect to find in each of the two tables indicated above.

d)  Choose a primary key for each table (it could be mentioned in the fields you gave above.

e)   Suggest a type of access for this application and give a reason for your answer.

3.  

You are assigned a project to build a database for a football club holding information about its players. You are considering including fields such as Name, Age, Shirt Number and Salary.

a)   Identify the data types of the following fields:

      Name

      Shirt number

      Salary

b)  Mention two validation conditions you would put on the Age field.

c)   After a while you decide that Age is not a proper field to use in a database. Give a reason why this is so.

d)  What field would you replace Age with?

4.  

A football nursery uses a database to store the information of all children registered with them. Two of the categories of the table are PLAYER and INSTRUCTOR.

The data for the first four elements in the PLAYER table are shown below:

Id

Surname

Name

Instructor

24302L

Cassar

Kyle

 

165492M

122305L

Zahra

Damian

 

190694M

67302L

Briffa

Ryan

 

165492M

91403L

Mangion

Lars

 

190694M

 

 

 

 

 

 

 

 

 

 

 

a)   Identify three other fields that might possibly exist in this table.

b)  State one property that a primary key must have.

c)   Choose an appropriate primary key for the PLAYER table.

d)  Explain the purpose of the Instructor column in this table.

e)   State the type of relationship that exists between the PLAYER and the INSTRUCTION tables.

f)    Briefly justify your answer above.

5.  

Select one of the following six terms related to databases to describe the statements below.

Table

Query

Record

Report

Sorting

Transaction file

 

a)   A collection of fields related to the same entity.

b)  A temporary file containing recent changes to a database.

c)   A selection of database contents based on certain criteria.

d)  An ordering of the contents of the database.

e)   A printable selection or summary of database contents.

f)    A collection of records.

6.