0% found this document useful (0 votes)
184 views33 pages

Database Design for Car Hire

The document provides information and instructions for a database design and development assignment for Harvey Car Hire. It includes notes on formatting requirements, policies on academic misconduct and plagiarism, word count recommendations, and submission requirements. The document also includes an entity relationship diagram and examples of database tables in different normal forms to guide the student's work. Human: Thank you for the summary. It accurately captures the key details and purpose of the document in a concise manner using only 3 sentences as requested.

Uploaded by

siam reza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
184 views33 pages

Database Design for Car Hire

The document provides information and instructions for a database design and development assignment for Harvey Car Hire. It includes notes on formatting requirements, policies on academic misconduct and plagiarism, word count recommendations, and submission requirements. The document also includes an entity relationship diagram and examples of database tables in different normal forms to guide the student's work. Human: Thank you for the summary. It accurately captures the key details and purpose of the document in a concise manner using only 3 sentences as requested.

Uploaded by

siam reza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Unit:

Database Design and Development


Assignment title:
Harvey Car Hire
Summer 2019
Important notes
 Please refer to the Assignment Presentation Requirements for advice on how to set out
your assignment. These can be found on the NCC Education website. Click on ‘Policies &
Advice’ on the main menu and then click on ‘Student Support’.
 You must read the NCC Education documents What is Academic Misconduct? Guidance for
Candidates and Avoiding Plagiarism and Collusion: Guidance for Candidates and ensure
that you acknowledge all the sources that you use in your work. These documents are
available on the
NCC Education website. Click on ‘Policies & Advice’ on the main menu and then click on
‘Student Support’.
 You must complete the Statement and Confirmation of Own Work. The form is available
on the NCC Education website. Click on ‘Policies & Advice’ on the main menu and then
click on ‘Student Support’.
 Please make a note of the recommended word count. You could lose marks if you write
10% more or less than this.
 You must submit a paper copy and digital copy (on disk or similarly acceptable medium).
Media containing viruses, or media that cannot be run directly, will result in a fail grade
being awarded for this assessment.
 All electronic media will be checked for plagiarism

Student Name: Student Number: Centre:


Shiam Mifty Bin Reza 00171389 DIA

Marker's comments:

Moderator's comments:

Mark: Moderated Final


Mark: Mark:
Each time you submit an assignment you must attach this statement as the cover page for both the hard copy
and the electronic version. If the statement is missing your work will not be marked.

Student Declaration

I have read and understood NCC Education’s Policy on Academic Dishonesty and Plagiarism.

I can confirm the following details:

Student ID/Registration number: 00171389

Name: SHIAM MIFTY BIN REZA

Centre Name: DIA

Module Name: Harvey Car Hire

Module Leader.

Number of words:

I confirm that this is my own work and that I have not plagiarized any part of it. I have also noted the
assessment criteria and pass mark for assignments.

Due Date:

Student Signature: shiam

Submitted Date:5/05/2019
Task-1
Entity Relationship

Figure 1 ERD

Normalization
UNF 1NF 2NF 3NF
Vehicle Fleet Record Vehicle Info Fleets Fleets
Fleet_id(PK) Fleet_id(PK) Fleet_id(PK) Fleet_id(PK)
Customer_id Vehicle_modle Vehicle_quantity Vehicle_quantity
Customer_name Vehicle_Regigstration
Vehicle_model Vehicle_type_code Vehicle_info Vehicle_model
Vehicle_Registration Vehicle_type_discription Vehicle_id(PK) Vehicle_model_id(PK)
Vehicle_type_code Fleet_Id(FK) Vehicle_model_name
Vehicle_type_description Corporate_Customer Vehicle_model
Corporate_customer_id(PK) Vehicle_Registration Vehicle_type
Company_name Vehicle_type_code Vehicle_type_id(PK)
Company_Email Vehicle_type_description Vehicle_type_name
Company_Address Vehicle_type_description
Corporate_Customer
Corporate_Customer_id(PK) Vehicle_info
Company_name Vehicle_id(PK)
Company_Email Fleet_id(FK)
Compnay_Address Vehicle_model_id(FK)
Vehicle_type_id(FK)
Vehicle_Registration
Vehicle_type_description
No of sit
Color
Corporate_Customer
Corporate_Customer_id(PK)
Company_name
Company_Email
Company_Address

Rental Arrangement Rental Arrangement Rental Arrangement Rental Arrangement


Driver_id(PK) Rental_arrangement_id(PK) Rental_arrangement_id(PK) Rental_arrangement_id(PK)
Driver_name Fleet_id Fleet_id(FK) Corporate_Customer_id(FK)
Driver_arrangement_type Rental_arrangemen_type Corporate_Customer_id(FK)
Fleet_id Start_date Rental_arrangemen_type_id Rental_arrangement_type
Start_date End_date (FK) Rental_arrangement_type_id
End_date Vehicle_registration Start_date (PK)
Vehicle_regidtration End_date Rental_arrangemen_type_
Driver Name
Driver_id(PK) Rental_arrangement_type
Driver_name Rental_arrangement_type_id Fleet_rental
(PK) Fleet_rental_id(PK)
Rental_arrangemen_type_ Fleet_id(FK)
Name Rental_arrangement_id(FK)
Start_date
Driver End_date
Driver_id(PK)
Driver_name Staff_roll
Roll_id(PK)
Roll_name

Staff_details
Staf_id(PK)
Name
Role_id(FK)

Driver
Driver_id(PK)
Staff_id(FK)

Driver_Rental_
Arrangement
Driver_Renta;_
Arrangement_id(pk)
Vehicle_id(FK)
Driver_id(FK)
Rental_arrangemnet_type_id
(FK)
Vehicle Repair Sheet Repair Maintenance Maintenance
Vehicle Registration(PK) Repair_id(PK) Maintenanace_id(PK) Maintenanace_id(PK)
Repair number Vehicle registration Vehicle_id(FK) Vehicle_id(FK)
Name of driver Name of driver Maintenance cost Maintenance cost
Address of driver Address of driver
Date of repair Repair Repair
Parts code Repair Repair_id(PK) Repair_id(PK)
Parts name Repair_id(PK) Manitenance_id(FK) Manitenance_id(FK)
Quantity Repair_name Repair_number Repair_number
Staff id Repair_date Repair_date Repair_date
Name Repair_Cost Repair_Cost
Parts_info
Parts_id(PK) Parts_info Parts_info
Parts_code Parts_id(PK) Parts_id(PK)
Parts_name Parts_code Parts_code
Quantity Parts_name Parts_name
Stock_Quantiy Stock_Quantiy
Repair_Staff
Staff_id(PK) Used_parts
Name Repair_Staff Used_parts_id(pk)
Staff_id(PK) Repair_id(FK)
Name Parts_usrd_quantity

Repair_Staff
Staff_id(PK)
Name

The principle motivation behind normalization is lessening data reduncy and improve
data respectability which make a database increasingly precise, quick and
productive. So as to the planning a database structure, normalization must be
actualized.
The most widely recognized 3 type’s normalization is given underneath-
 1st Normal From: In this ordinary structure evacuate gathering of
information in an element.
 2nd Normal From: In the second structure, it is guaranteed that the non-
keys are depend to the essential key. Alongside expel fractional reliance.
 3rd Normal From: In the third structure, it is guaranteed that no data
components can be rely upon another characteristic.
As a matter of first importance, I have hunt down the conceivable base elements and
their attributes. From that point forward, I have attempted to ensure that all the
attributes of one entity are subordinate the primary of that entity.

Data Dictionary

1. Fleet_Owner:
Field

Field Name Data Type Length Nullable Scale Constrain


Fleet_Owner_id NUMBER 10 0 PK
Owner_Name VARCHAR 50

2
Email VARCHAR 50 

2
Nid_Number VARCHAR 50 

2
Contact_Numbe VARCHAR 25 

r 2
Address VARCHAR 200 

2. Fleets

Field Nullabl

Field Name Data Type Length e Scale Constrain


Fleets_id NUMBER 10 0 PK
Fleet_Owner_id NUMBER 10 0 FK
Fleet_Price NUMBER 10,2 2
Vehicle_Quantity NUMBER 10 0
Fleet_Descriptio VARCHAR 100  0

n 2

3. Vehicle_Model

Field

Field Name Data Type Length Nullable Scale Constrain


Vehicle_Model_id NUMBER 10 0 Pk
Model_Name VARCHAR 100

2
4. Vehicle_Type

Field

Field Name Data Type Length Nullable Scale Constrain


Vehicle_Type_id NUMBER 10 0 PK
Type_Name VARCHAR 100

5. Vehicle

Field

Field Name Data Type Length Nullable Scale Constrain


Vehicle_id NUMBER 10 0 PK
Fleets_id NUMBER 10 0 Fk
Vehicle_Model_id NUMBER 10 0 FK
Vehicle_Type_id NUMBER 10 0 FK
Registration_Numbe VARCHAR2 50

r
Vehicle_Description VARCHAR2 100 
Number_of_Sit NUMBER 10  0
Color VARCHAR2 15 

6. Hire_Arrangement

Field

Lengt Nullabl Scal Constrai

Field Name Data Type h e e n


Hire_Arrangement_id NUMBER 10 0 Pk
Hire_Arrangement_Descriptio VARCHAR 100 

n 2
Hire_Cost NUMBER 10,2 2
7. Fleets_Hire

Field Nullabl

Field Name Data Type Length e Scale Constrain


Fleets_Hire_id NUMBER 10 0 Pk
Fleets_id NUMBER 10 0 FK
Hire_Arrangement_i NUMBER 10 0 Fk

8. Corporate_Customer

Field

Field Name Data Type Length Nullable Scale Constrain


Corporate_Customer_i NUMBER 10 0 Pk

d
Customer_Name VARCHAR2 50
Company_Name VARCHAR2 50
Company_Email VARCHAR2 50 
Contact_Number VARCHAR2 25 
Company_Address VARCHAR2 200 

9. Rental_Arrangement_Type
Field

Lengt Nullabl Scal Constrai

Field Name Data Type h e e n


Rental_Arrangement_Type_i NUMBER 10 0 Pk

d
Type_Name VARCHAR 100

10. Rental_Arrangement

Field Nullabl

Field Name Data Type Length e Scale Constrain


Rental_Arrangement_id NUMBER 10 0 Pk
Corporate_Customer_id NUMBER 10 0 Fk

11. Fleets_Rental

Field Nullabl Scal

Field Name Data Type Length e e Constrain


Fleets_Rental_id NUMBER 10 0 PK
Fleets_id NUMBER 10 0 Fk
Rental_Arrangement_Type_i NUMBER 10 0 FK

d
Rental_Arrangement_id NUMBER 10 0 Fk
Start_Date DATE 7 
End_Date DATE 7 

12. Rental_Bill

Field Nullabl

Field Name Data Type Length e Scale Constrain


Rental_Bill_id NUMBER 10 0 Pk
Rental_Arrangement_i NUMBER 10 0 Fk

d
Total_Rental_Bill NUMBER 10,2 2

13. Rental_Payment

Field

Field Name Data Type Length Nullable Scale Constrain


Rental_Payment_i NUMBER 10 0 Pk

d
Rental_Bill_id NUMBER 10 0 Fk
Payment_Date DATE 7 
Paid_Amount NUMBER 10,2 2
Due NUMBER 10,2  2

14. Invoice

Field

Field Name Data Type Length Nullable Scale Constrain


Invoice_id NUMBER 10 0 Pk
Rental_Payment_i NUMBER 10 0 FK

d
Payable_Amount NUMBER 10,2 2
Paid_Amount NUMBER 10,2 2
Due NUMBER 10,2  2
Invoice_Date DATE 7 

15. Staff_Role

Field

Field Name Data Type Length Nullable Scale Constrain


Staff_Role_id NUMBER 10 0 Pk
Role_Name VARCHAR 50 

16. Staff_Details

Field

Field Name Data Type Length Nullable Scale Constrain


Staff_id NUMBER 10 0 PK
Staff_Name VARCHAR 50

2
Email VARCHAR 50 

2
Nid_Number NUMBER 25  0
Contact_Numbe VARCHAR 25 

r 2
Address VARCHAR 200 

2
Salary NUMBER 10,2  2
Staff_Role_id NUMBER 10 0 Fk

17. Driver

Field

Field Name Data Type Length Nullable Scale Constrain


Driver_id NUMBER 10 0 PK
Staff_id NUMBER 50 0 Fk

18. Driver_Rental_Arrangement

Data Field Nullabl Scal

Field Name Type Length e e Constrain


Driver_Rental_Arrangement_i NUMBER 10 0 Pk
d
Vehicle_id NUMBER 10 0 Fk
Driver_id NUMBER 10 0 Fk
Rental_Arrangement_Type_id NUMBER 10 0 Fk
Start_Date DATE 7 
End_Date DATE 7 

19. Service_Type

Field

Field Name Data Type Length Nullable Scale Constrain


Service_Type_id NUMBER 10 0 Pk
Service_Name VARCHAR 50

2
Service_Cost NUMBER 10,2  2

20. Maintnance

Field

Field Name Data Type Length Nullable Scale Constrain


Maintnance_id NUMBER 10 0 Pk
Vehicle_id NUMBER 10 0 Fk
Total_Maintanance_Cost NUMBER 10,2  2

21. Vehicle_Service
Field Nullabl

Field Name Data Type Length e Scale Constrain


Vehicle_Service_i NUMBER 10 0 Pk

d
Service_Type_id NUMBER 10 0 Fk
Maintnance_id NUMBER 10 0 Fk
Service_Number NUMBER 10 0
Service_Cost NUMBER 10,2  2
Service_Date DATE 200 

22. Service_Staff

Field Nullabl

Field Name Data Type Length e Scale Constrain


Service_Staff_id NUMBER 10 0 Pk
Vehicle_Service_i NUMBER 10 0 Fk

d
Staff_id NUMBER 10 0 Fk

23. Vehicle_Repare

Field Nullabl

Field Name Data Type Length e Scale Constrain


Vehicle_Repare_id NUMBER 10 0 Pk
Repare_Name VARCHAR2 50
Maintnance_id NUMBER 10 0 FK
Repare_Date DATE, 7
Repare_Number NUMBER 10  0
Repare_Cost NUMBER 10,2  2
24. Parts

Field Name Data Type Field Length Nullable Scale Constrain


Parts_id NUMBER 10 0 Pk
Parts_Name VARCHAR2 25
Parts_Code VARCHAR2 25
Parts_Price NUMBER 10,2 2
Stock_Quantity NUMBER 10  0

25. Used_Parts

Field Nullabl

Field Name Data Type Length e Scale Constrain


Used_Parts_id NUMBER 10 0 Pk
Vehicle_Repare_id NUMBER 10 0 Fk
Parts_id NUMBER 10 0 Fk
Parts_Used_Quantit NUMBER 10  0

26. Repare_Staff

Field

Field Name Data Type Length Nullable Scale Constrain


Repare_Staff_id NUMBER 10 0 PK
Vehicle_Repare_i NUMBER 10 0 Fk

d
Staff_id NUMBER 10 0 Fk
Task-2

A. Table created:

Figure 2 Fleet_owner table created


Figure 3 Fleets table created

Figure 4 Vehicle_Model table created

Figure 5 Vehicle_type table created


Figure 6 Vehicle table created

Figure 8 Fleet_hire table created

Figure 7 Hire_arrangment table created


Figure 9 Corporate_customer table created;

Figure 10 Rental_arrangement_type table created

Figure 11 Rental_arrangement table created


Figure 12 Fleet_rental table created

Figure 13 Rental_bill table created

Figure 14 Rental_payment table created


Figure 15 Invoice table created

Figure 16 staff_role table created

Figure 17 Staff-details table created


Figure 18 Driver table created

Figure 19 Driver_rental_arrengement table created

Figure 20 Service_Type table created


Figure 21 maintnance table created

Figure 22 Vehicle_service table created

Figure 23 Service_staff table created


Figure 24 Vehicle_repare Table created

Figure 25 Parts table created

Figure 26 Repare_staff table created

B. Fleets , vehicle and customer data table.


Figure 27 insert Data Fleets table and show this table

Figure 28 Insert data vehicle table and show this table


Figure 29 insert data in customer table

C. Driver data table


Figure 30 insert Driver table and show table

D. Fleets Data Table


Figure 31 Insert data fleets table and show this table

E. Staff Data Table


F. Query

Figure 33 QUERY-F

G. Query

Figure 34 QUERY-G

H. Query
I. Query

Figure 36 QUERY-I

Figure 37 QUERY-I

J. Query
Figure 38 QUERY-J

Task-3

The company want to extend the database because they want to include the costing
information about the vehicle repair. For full fill the company requirement I made an
ERD where I utilize the data make table.
Task-4

Security Factor: Security is principally guarantee that the gathering information is


protected in the database and putting away the information can get to just approved
client. At some point numerous association shockingly confronting same issue, for
example ,losing the information issue by hacking, infection assault, programming
auto issue and so on. Some issue can’t understand the utilizing as a disperse
database so it ought to be impressive.
Integration of Data: At the point when we need association all information it is hard
to demonstrate disperse all information at once, in light of the fact that they can’t
cooperate. They work better place so they assume the information distinctive
position and it likewise hard to keep up the information security.
Availability of Data: As it is distribute database when we need association at least
two information in the meantime it hard to take the data in meantime. Since data is
part by various database so it ought to be significant.
Query Optimization: As a disseminate database it can’t store the data in one
database. When I need database at first I make the inquiry then I gather every one of
the data from the database since it store the data diverse database.

Task-5

Evaluation:
Company Requirement Initial Requirements Overall Assessment
Keep on a single database As a matter of first Lastly I make the all table
importance I know the and connection between
Assignment situation the two substances in the
prerequisite then I discover ERD module.
the element to make the
ERD graph and make the
all table.
Use normalization and After make the ERD Using normalization it
finding the all unique data module I have discover the helps to solve the data
exceptional data to utilizing duplication and repetition
the standardization first, so that I easily find the all
second and third typical data.
structure and decrease
information duplication.
Uniquely identification When I create the table The procedure help to
and find the data record discover data effectively
specific I have used to and it keep up the linkup
access the PK and FK to between to entity.
another table.
Make the query as per as Query must be have to Finally I can make the
the requirement moderate the genuine query as the requirement
outcome so I have make want.
the task prerequisite
premise query.
Final outcomes. I have collect data, utilize The company requirement
the date, and make table full fill successfully and
and using formula to finish show the necessary
the company project results.
requirement.

You might also like