You are on page 1of 6

Database elements

Tables

Figure 1 Database Table

Records

ht
aq

A database table is composed of records and fields that hold data. Tables are also called
datasheets. Each table in a database holds data about a different, but related, subject.

.M

us

Data is stored in records. A record is composed of fields and contains all the data about one
particular person, company, or item in a database. In this database, a record contains the data
for one customer support incident report. Records appear as rows in the database table. A
record for Log ID 1201242 is highlighted in Figure 2.

Figure 2 Records appear as rows in a database table.

iteach.pk

03215275281

Fields
A field is part of a record and contains a single piece of data for the subject of the record. In the
database table illustrated in Figure 3, each record contains four fields:
Log ID
Operator
Resolved
Duration

A number assigned to this customer support incident for


identification purposes
The code for the customer support operator who handled this
incident
A check box to indicate whether the incident was resolved
The time in seconds the operator spent on this incident

us

ht
aq

Fields appear as columns in a database table. Data from the Log ID field for five records is
highlighted in the Figure 3.

Figure 3 Fields appear as columns in a database table.

Primary key is a field which uniquely identifies a record e.g. in above figure 3 Log ID is a primary key

.M

because it contains different log ID for each customer support incident.

iteach.pk

03215275281

1 A database was set up showing statistics for some states in the USA. Part of the database is
shown below.

Population
(millions)

Number
of houses
(millions)

Area
(sq miles)

Density

Travel
time
to work
(min)

OR
CO
NJ
TX
CA
FL
AK
NV
NY

Oregon
Colorado
New Jersey
Texas
California
Florida
Alaska
Nevada
New York

3.8
4.9
8.7
24.3
36.8
18.3
0.7
2.6
19.5

1.6
2.1
3.5
9.4
13.3
8.7
0.3
1.1
7.9

96 000
104 000
7 400
262 000
156 000
53 900
572 000
110 000
47 000

39.6
47.1
1175.7
92.7
235.9
339.5
1.2
23.6
414.9

22.3
24.3
30.0
25.4
27.7
26.2
19.6
23.3
31.7

aq

Ref

Name of
state

ht

(a) (i) How many records are in this section of the database?

[1]

(ii) How many fields are in each record?

us

[1]

(b) The following search condition was entered:

(Population (millions) < 4.0) OR (Number of houses (millions) < 4.0)

.M

Using Ref only, write down which records will be found.

[2]

iteach.pk

03215275281

(c) Write down the search condition to find out which states have an area over 100 000 square
miles and where it takes less than 25 minutes to get to work.

[2]

(d) (i) What should be the key field in this database?


[1]

.M

us

ht

aq

(ii) Give a reason for your choice.

iteach.pk

03215275281

[1]

A car sales company uses a database.

For
Examiner's
Use

Here are three tables from the database:

New Car Sales


Customer
Reference
151319
162154
171216

Car Ordered

Specification

Delivery Date

Cancelled order
VW Golf
BMW 320i

None
21215168
07981624

Not applicable
December 2008
February 2009

Customer Name

Customer Address

Trade In?

J Smith
M Kyle
D Khan
S Gogic
D Marques

7 Toll Road
14 Coast Road
19 Main Street
555 Trabant Road
21 Lakki Harbour

No
No
Yes
No
Yes

Car Manufacturer

List of Extras
CNORVZ
ABCETU
BDEFJL
APRSW

us

Car Description
BMW 320i
VW Golf
VW Golf
Ford Focus

Cost Price ($)


48 500
16 200
21 000
17 000

.M

Specification
07981624
21151198
21215168
31311115

ht

Customer
Reference
141516
151319
162154
165196
171216

aq

Customer Details

(a) How many records are shown in the Customer Details table?
[1]

(b) (i) Which field connects the New Car Sales table with the Customer Details table?
[1]

(ii) Which field connects the New Car Sales table with the Car Manufacturer table?
[1]

iteach.pk

03215275281

.
9

(c) Give two reasons why List of Extras in the Car Manufacturer table is stored in code
form.
1

2
[2]

[2]

ht

aq

(d) A customer goes into the showroom and the salesperson keys in 162154. What fields
and information would be shown on the output screen?

[1]

.M

us

(e) Give one advantage to the car sales company of holding customer information on a
database.

iteach.pk

03215275281

For
Examiner's
Use

You might also like