Vehicle Parking System

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

PROJECT

Database Management
System

ID No :- 113323
B.S.C.S (3rd Semester)

Table of Contents

1. Introduction
2. Scope
3. Objective

4. Vehicle Parking system


5. Data Flow Diagrams (DFD)
6. Entity Relationship Diagrams (E-RD)
7. Relational Database model
8. Queries
9. Select Statement (Views)
10.Interfacing in Visual Studio

ACKNOWLEDGEMENT

In the beginning, I would like to thank ALMIGHTY ALLAH, the most merciful
and beneficent, for giving me the strength to complete my project with full
determination.
I would like to thank my teacher Sir Usman Sattar who gave me this
opportunity and encouraged me by assigning this project; Without their
help and guidance I would have not completed this assignment. I believe
in future these efforts will pay off.

INTRODUCTION
This project is about Vehicle Parking system of any
plaza or mall, its a automatic recepit generated software with every
essential details.

SCOPE
As we all know that the world is advancing day by day new
technologies come and go, many new methods are been introduced
almost daily, therefore, the demand of the new systems have been
increased in every organization old systems have been replaced by new
systems, the question is why? Its because every organization demands
excellent quality work more profit to be earned in short span of time, to
gain as much market trust as they can, and not to forget as quick they can
so they can compete with other organizations. New systems should be
i.
ii.
iii.
iv.

User friendly
More efficient
They should provide security
Fast

As these four are mentioned, my idea will be based upon these.

OBJECTIVE + PROBLEM
As the world is facing many threads daily, robbries are done
easily with no track to trace, bomb blasts occur with the use of car, so if a
proper system is adopted each and every record can be saved and anyone
can be track easily therefore mainly is to make a better and fast software,
most important user-friendly.

Vehicle Parking System


Flow:A vehicle is entering the typist type vehicle_type,
registration_no, date, time_in (time of vehicle entered). And an auto
generated slip_no is given to the specific car; now vehicle is exiting after
some sum of amount for which we have different rates, the customer
returns us the slip from there we only type the slip_no on the system and
all the previous information will pop up with some more which are
following time_out (time of vehicle exiting), total_time (calculated from
time_in and time_out), total_amount (which is based upon total_time), this
is the whole process which is converted into computer language.
Data Flow Diagram (DFD):Following is the DFD of the system.

Rates

Vehicle_type

Vehicle
Type
1- Car
2- Bik

Hourly rates

Parking System
Processing

Finally after the


processing the record
is saved in
Vehicle_info

Vehicle_info

Entity Relationship Diagram (E-RD):Following is the E-RD diagram of the system

Vehicle_type

Rates

T_id
V_type

R_id
R_per_hour
R_s

Vehicle_info
Slip_no
V_type
Registration_no
Date
Time_in
Time_out
Amount

One vehicle will is either a car or bike, and its calculated amount can be only one
amount therefore, Its 1 to 1 relationship between tables.

Relational Datamodel:Look-up Tables:

Vehicle_type

T_id

V_type

Car

Bike

Rates

R_id

R_per_hour

R_s

0.00 - 1.10

10

0.00 - 2.00

20

0.00 - 3.00

30

0.00 - 4.00

40

0.00 - 5.00

50

Main Table:

Vehicle_info

Slip_no

T_id

Registration_
no

Date

Time_in

Time_ou
t

LEX 1313

From
sys

From
sys

From sys

LZY 1790

From
sys

From
sys

From sys

* and so on records will be saved a IF


statement will be required to calculate total
amount from time_in & time_out
I prefer the Denormalization concept for my project as i dont think an
normalization is needed for such a project.
Queries:Following are the queries from which these tables are created and random
data is inserted into it.
Query to create Database

CREATE DATABASE vehicle_parking_project


Query to create table (vehicle_type)

CREATE TABLE vehicle_type


(
t_id INT IDENTITY NOT NULL PRIMARY KEY,
v_type char(5)
)
Query to insert data into table (vehicle_type)

INSERT INTO vehicle_type


VALUES ('Car')
INSERT INTO vehicle_type
VALUES ('Bike')
Query to create table (rates)

CREATE TABLE rates


(

r_id INT IDENTITY NOT NULL PRIMARY KEY,


r_per_hour char(10),
r_s INT
)

Query to insert data into table (rates)

INSERT INTO rates


VALUES ('0.00-1.10',10)
INSERT INTO rates
VALUES ('0.00-2.00',20)
INSERT INTO rates
VALUES ('0.00-3.00',30)
INSERT INTO rates
VALUES ('0.00-4.00',40)
INSERT INTO rates
VALUES ('0.00-5.00',50)
Query to create main table (Vehicle_info)

CREATE TABLE vehicle_info


(
slip_no INT IDENTITY NOT NULL PRIMARY KEY,
v_type INT NOT NULL FOREIGN KEY REFERENCES
vehicle_type (t_id),
register_no CHAR(10),
date DATETIME NOT NULL DEFAULT GETDATE(),
time_in DATETIME NOT NULL DEFAULT GETDATE(),
time_out DATETIME DEFAULT GETDATE(),
total_amount INT FOREIGN KEY REFERENCES rates (r_id)
)

Query to insert values into table (Vehicle_info)

INSERT INTO vehicle_info


VALUES (1,'LEX 1313',GETDATE(),GETDATE(),NULL,1)
INSERT INTO vehicle_info
VALUES (2,'LEZ 1234',GETDATE(),GETDATE(),NULL,3)
INSERT INTO vehicle_info
VALUES (1,'FDL 4444',GETDATE(),GETDATE(),NULL,1)
INSERT INTO vehicle_info
VALUES (1,'LZ 2323',GETDATE(),GETDATE(),NULL,2)
INSERT INTO vehicle_info
VALUES (2,'LZY 7777',GETDATE(),GETDATE(),NULL,2)
INSERT INTO vehicle_info
VALUES (2,'LXL 1790',GETDATE(),GETDATE(),NULL,1)
INSERT INTO vehicle_info
VALUES (1,'LHM 6993',GETDATE(),GETDATE(),NULL,1)
SELECT:Following are the select statement queries which includes joins etc,
to show the info in desired format.

1. Standard view of table vehicle_type


SELECT *
FROM vehicle_type

2. Standard view of table rates


SELECT *
FROM rates
3. Standard view of table vehicle_type
SELECT *
FROM vehicle_info
4. Vehicle type car
SELECT *
FROM vehicle_info
WHERE v_type = 1

5. Vehicle type bike


SELECT *
FROM vehicle_info
WHERE v_type = 2
6. Rates of all vehicle
SELECT vehicle_info.register_no,rates.r_s
FROM vehicle_info
JOIN rates
ON vehicle_info.total_amount = rates.r_id
7. Rate of car LEX 1313
SELECT vehicle_info.register_no,r_s
FROM rates
JOIN
(vehicle_type JOIN vehicle_info
ON vehicle_info.v_type = vehicle_type.t_id)
ON rates.r_id = vehicle_info.total_amount
WHERE vehicle_info.register_no = 'LEX 1313'
8. Total amount calculated
SELECT SUM(r_s)AS Whole_total
FROM rates
JOIN vehicle_info
ON vehicle_info.total_amount = rates.r_id
INTERFACING:
Following are the images which of interfacing the project.
*This is optional as interfacing is not of this course.

First image shows the home page of the software which through
which our software will be operated, like if we want to enter the
vehicle we click on vehicle enter and another form will be open.

Second form opens and vehicle entering form is filled with some
mannual and some automatic enteries i.e date and time_in

This third form is for when vehicle is exiting we just enter the slip no and
all information is shown to us after receiving the money we only press
save.

You might also like