Anda di halaman 1dari 4

Client

Key Name Type Size Null Description


PK clientNo Char 6 No Client
reference
number
fName Varchar 15 No First name
lName varchar 15 No Last name
Address1stlin varchar 20 No First line of
e address
City varchar 15 No Name of
city
postalCode varchar 7 No Postal code
telNo Char 11 No Contact
telephone
number
Dob Date 6 Yes Date of
birth
Email Varchar 20 Yes Contact
email
AK licenceNo Char 10 No Provisional
licence
number

Car
Key Name Type Size Null Description
PK carNo Char 7 No Vehicle
registration
number
Make Varchar 15 No Make of
Vehicle
model varchar 15 No Model of
Vehicle
mileage Num 99,999 No Total
mileage

Test
Key Name Type Size Null Description
PK testNo Char 6 No Test
reference
number
FK clientNo Char 6 No Client
reference
number
Date Date 6 No Date of test
Time Time 4 No Time of
test
Result Char 1 No Result P or
F
reasonForFail Nvarchar 20 No Reasons for
fail
FK instructorNo Char 4 No Instructor
reference
number
Type Char 1 No Type of
test T
(theory) or
P
(practical)

Staff
Key Name Type Size Null Description
PK staffNo Char 6 No Staff ID
number
fName nChar 15 No First name
lName Nvarchar 15 No Last name
Address1stLin Nvarchar 20 No First line of
e address
City Nvarchar 15 No City
postalCode Char 7 No Post Code
Email Nvarchar 20 Yes Company
email
address
telNo Char 11 No Landline or
mobile
number
DOB Date 6 No Date of birth
NIN Char 9 No National
insurance
number
sex Char 1 No Gender M or
F
FK branchNo Char 6 No Branch
number
where staff
located
position Varchar 10 No Position in
company
bankDetails Char 14 No Sort code
and account
number
startDate Date 6 No Date started
in company
endDate Date 6 Yes Date
employment
terminated

Branch
Key Name Type Size Null Description
PK branchNo Char 6 No Branch ID
number
Address1stLin Varchar 20 No 1ST Line of
e address
City varchar 15 No City
postalCode Char 7 No Post code
telNo Char 11 No Telephone
number

Lesson
Key Name Type Size Null Description
PK instructorNo Char 10 No Driving
FK instructor
reference
number
PK clientNo Char 6 No Client
FK reference
number
PK Date Date 6 No Date of
lesson
mileage Num 99,999 No Mileage
used
Progress Nvarchar 20 No Progress of
client
Time Time 4 No Between
8am-8pm

Driving Instructor
Key Name Type Size Null Description
AK licenceNo Char 10 No Licence
reference
number
FK staffNo Char 6 No Staff
reference
number
PK instructorNo Char 4 No Instructor
reference
number
Inspection
Key Name Type Size Null Description
PK carNo Char 7 No Vehicle
FK registration
number
PK instructorNo Char 4 No Instructor
FK number
PK Date Date 6 No Date of
inspection
Fault Nvarchar 20 No Faults
found

Administration
Key Name Type Size Null Description
PK adminLogin Char 7 No Login for
administration
staff
FK staffNo Char 6 No Staff ID
reference

Allocated
Key Name Type Size Null Description
PK carNo Char 10 No Car licence
FK number
PK instructorNo Char 4 No Instructor
FK reference
number
dateFrom Date 6 No Date the car
was allocated
to a particular
instructor
dateTo Date 6 Yes Date which
the car was
handed back
to pool or
another
instructor

Anda mungkin juga menyukai