Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Project Specification:
The database used in this project is MySQL Version 5.0. The entities’
designs are as follows:
Car
Expenses
Expense id
Car id
Employee
id
Car Owners
Owner id
A relational model showing all the relationships between the various
entities
approve
overs m
ee
approves m
m Inventory Forms
1 1
1 m
Employe 1 1
1
in
fo
fo
r
fo
1
r
from Clients
approve
m
m 1
Receiva
s
1
m m m
in
from 1 Hires
m m
1 1 1 in
from 1 m
1 Cars m
used
m m m
m
fo
r
Owner
in
1
m
Hire
belon
own
1
1
g
Drivers
receiv
fo
m 1
r
e
1 Owners Car 1
SQL Codes:
1. Cars Table:
CREATE TABLE `car_hire`.`cars` (
`car_id` INTEGER UNSIGNED NOT NULL,
`reg_num` VARCHAR(45) NOT NULL,
`class_id` VARCHAR(45) NOT NULL,
`owner_id` VARCHAR(45) NOT NULL,
`make` VARCHAR(45) NOT NULL,
`model` VARCHAR(45) NOT NULL,
`body_type` VARCHAR(45) NOT NULL,
`engine_num` VARCHAR(45) NOT NULL,
`chasis_num` VARCHAR(45) NOT NULL,
`manufacture_yr` VARCHAR(45) NOT NULL,
`color` VARCHAR(45) NOT NULL,
PRIMARY KEY (`car_id`)
)
ENGINE = InnoDB;
2. Clients:
3. Hires:
4. Inventory Forms:
5. Drivers:
7. Car Owners:
8. Car Class:
11. Employeees: