Nothing Special   »   [go: up one dir, main page]

1.1 Introduction To DBMS: Bus Reservation System 2020-2021

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 28

Bus Reservation System 2020-2021

CHAPTER 1

INTRODUCTION

1.1 Introduction to DBMS

A database is a collection of information that is organized so that it can be easily accessed,


managed and updated. Data is organized into rows, columns and tables, and it is indexed to make
it easier to find relevant information. Data gets updated, expanded and deleted as new
information is added. Databases process workloads to create and update themselves, querying the
data they contain and running applications against it.

A database-management system (DBMS) is a computer-software application that interacts


with end-users, other applications, and the database itself to capture and analyze data. A general-
purpose DBMS allows the definition, creation, querying, update, and administration of
databases. Well-known DBMSs include MySQL, PostgreSQL,

EnterpriseDB, MongoDB, MariaDB, Microsoft SQL Server,Oracle, Sybase, SAP HANA,


MemSQL, SQLite and IBM DB2. A database is not generally portable across different DBMSs,
but different DBMSs can interoperate by using standards such as SQL and ODBC or JDBC to
allow a single application to work with more than one DBMS.

1.2 Introduction to Database System Environment

A database environment is a collective system of components that comprises and regulates the
group of data, management and use of data which consist of software, hardware, people,
techniques of handling database and the data also. Here, the hardware in a database environment
means the computers and computer peripherals that are being used to manage a database and the
software means the whole thing right from the operating system (OS) to the application programs
that includes database management software like M.S. Access or SQL Server. Again the people
in a database environment include those people who administrate and use the system. The

Dept. of ISE, Atria IT Page 1


Bus Reservation System 2020-2021

techniques are the rules, concepts and instructions given to both the people and the software
along with the data with the group of facts and information positioned within the database

environment.

Figure 1.2 Database System Environment

1.3 Advantages of using DBMS approach

The database management system has a number of advantages as compared to traditional


computer file-based processing approach. The DBA must keep in mind these benefits or
capabilities during databases and monitoring the DBMS.

The Main advantages of DBMS are described below.

i. Controlling Data Redundancy

In non-database systems each application program has its own private files. In this case, the
duplicated copies of the same data is created in many places. In DBMS, all data of an
organization is integrated into a single database file. The data is recorded in only one place in the
database and it is not duplicated.
Dept. of ISE, Atria IT Page 2
Bus Reservation System 2020-2021

ii. Sharing of Data

In DBMS, data can be shared by authorized users of the organization. The database administrator
manages the data and gives rights to users to access the data. Many users can be authorized to
access the same piece of information simultaneously. The remote users can also share same data.
Similarly, the data of same database can be shared between different application programs.

iii. Data Consistency

By controlling the data redundancy, the data consistency is obtained. If a data item appears only
once, any update to its value has to be performed only once and the updated value is immediately
available to all users. If the DBMS has controlled redundancy, the database system enforces
consistency.

iv. Data Security

Form is very important object of DBMS. You can create forms very easily and quickly in
DBMS. Once a form is created, it can be used many times and it can be modified very easily.
The created forms are also saved along with database and behave like a software component. A
form provides very easy way (user-friendly) to enter data into database, edit data and display
data from database. The non-technical users can also perform various operations on database
through forms without going into technical details of a database.

v. Backup and Recovery Procedures

In a computer file-based system, the user creates the backup of data regularly to protect the
valuable data from damage due to failures to the computer system or application program. It is
very time consuming method, if amount of data is large. Most of the DBMSs provide the 'backup
and recovery' sub-systems that automatically create the backup of data and restore data if
required.

vi. Data Independence

The separation of data structure of database from the application program that uses the data is
called data independence. In DBMS, you can easily change the structure of database without
modifying the application program.

Dept. of ISE, Atria IT Page 3


Bus Reservation System 2020-2021

CHAPTER 2

LITERATURE SURVEY

2.1. Problem Definition

Bus Reservation System is a Web based application that works within a centralized network.
This project presents a review on the software program “ Bus Reservation System” as should be
used in a bus transportation system, Bus Reservation System is software which is helpful for the
bus agencies to maintain the details about the customers, drivers, types of routes, bus departure
time.

2.2. Purpose & Scope

The main purpose of this module is provide all the functionality realted to bus. It tracks all the information of the

bus. I have developed all type of CRUD (Create, Read, Update and Delete) operations of the bus. This Bus
module is the main module in this project Bus Ticket Booking System which has been developed on Java, JSP
and MySQL.
Advantages:
i. User friendly interface
ii. Fast access to database
iii. Less error
iv. Look and Feel Environment
v. Easy to book tickets from anywhere.

2.3. Why This Application?


Currently, the type of system being used at the counter is an internal system which is manually
used in selling the bus tickets. The problems facing the company are that customers have to go
to the counter to buy bus ticket or ask for bus schedule, customers will also have to queue up

Dept. of ISE, Atria IT Page 4


Bus Reservation System 2020-2021

for a long time in order to secure a bus ticket and will also need to pay cash when they buy the
bus ticket.

Dept. of ISE, Atria IT Page 5


Bus Reservation System 2020-2021

Chapter 3
DESIGN
3.1. ER Diagram
An entity–relationship model describes inter-related things of interest in a specific domain of
knowledge. An ER model is composed of entity types and specifies relationships that can exist
between instances of those entity types.

Figure 3.1 E R Diagram

This ER Diagram gives a brief idea about the relations existing between the tables and tells about
the primary and the foreign keys being used in this Database. I are having five tables in total for
our bus reservation system mini project they are admin, customer, driver, reserve and routes
respectively.

Dept. of ISE, Atria IT Page 6


Bus Reservation System 2020-2021

3.2. Schema Diagram

A database schema is the skeleton structure that represents the logical view of the entire
database. It defines how the data is organized and how the relations among them are associated.
ADMIN

ADMIN_ID ADMIN_USERNAME ADMIN_PSWD

CUSTOMER

ID FNAME LNAME CONTACT ADDRESS TRANSACTION PAYABLE STATUS SETNUMBER

DRIVER

NAME ROUTE ROUTE_ID

RESERVE

ID DATE BUS SEAT_NUMBER TRANSACTION SEAT

ROUTE

ROUTE_ID ROUTE PRICE NUMSEATS TYPE TIME

Figure 3.2 Schema Diagram

This is the schema diagram for the working of our project, which tells about the interaction of the
tables with each other and the Primary and the Foreign Keys being used and referenced here by
different tables or the entities.

3.3 TABLE DESCRIPTION


Dept. of ISE, Atria IT Page 7
Bus Reservation System 2020-2021

It describes attributes of the table and their types. It also describes the primary and foreign keys
of a particular table.

3.3.1. Admin
Admin table consists of three attributes that are AdminId, Admin_username, Admin_pswd . In
which AdminId is the primary key.
Table 3.3.1 - Description of Admin table
FIELD NAME TYPE OF KEY NULL? DATA TYPE
ADMINID PRIMARY NOT NULL INTEGER(11)
ADMIN_USERNAME NOT NULL VARCHAR(30)
ADMIN_PSWD NOT NULL VARCHAR(30)

3.3.2. Customers
Customers table consists of ten attributes that are Id, FName, LName, Contact, Address, Bus,
Transaction, Payable, Status, and Setnumber. In which Id is the primary key.
Table 3.3.2 - Description of Customer table
FIELD NAME TYPE OF KEY NULL? DATA TYPE
ID PRIMARY NOT NULL INTEGER(5)
FNAME NOT NULL VARCHAR(30)
LNAME NOT NULL VARCHAR(30)
CONTACT NOT NULL VARCHAR(20)
ADDRESS NOT NULL VARCHAR(300)
BUS NOT NULL VARCHAR(30)
TRANSACTION NOT NULL VARCHAR(10)
PAYABLE NOT NULL VARCHAR(11)
STATUS NOT NULL VARCHAR(100)
SETNUMBER NOT NULL VARCHAR(100)

3.3.3. Driver
Driver table consists of three attributes that are Name, route, and route_Id. In which route_Id is
the primary key. which references the department table.
Table 3.3.3 - Description of Driver table
FIELD NAME TYPE OF KEY NULL? DATA TYPE
NAME YES VARCHAR(20)
ROUTE YES VARCHAR(300)

Dept. of ISE, Atria IT Page 8


Bus Reservation System 2020-2021

ROUTE_ID PRIMARY NOT NULL INTEGER(11)

3.3.4. Reserve
Reserve table consists of six attributes that are Id, date, bus, seat_reserve, transaction and seat.
In which Id is the primary key.
Table 3.3.4 - Description of Reserve table
FIELD NAME TYPE OF KEY NULL? DATA TYPE
ID PRIMARY NOT NULL INTEGER
DATE NOT NULL VARCHAR(11)
BUS NOT NULL VARCHAR(11)
SEAT_RESERVE NOT NULL VARCHAR(11)
TRANSACTION NOT NULL VARCHAR(10)
SEAT NOT NULL VARCHAR(100)

3.3.5. Routes
Routes table consists of six attributes that are Id, Routes, Price, Numseat, Type and Time. In
which Id is the primary key.
Table 3.3.5 - Description of Routes table
FIELD NAME TYPE OF KEY NULL? DATA TYPE
ROUTE_ID PRIMARY NOT NULL INTEGER(11)
ROUTES NOT NULL VARCHAR(300)
PRICE NOT NULL VARCHAR(30)
NUMSEATS NOT NULL INTEGER(30)
TYPE NOT NULL VARCHAR(300)

Dept. of ISE, Atria IT Page 9


Bus Reservation System 2020-2021

TIME NOT NULL TIME

Dept. of ISE, Atria IT Page 10


Bus Reservation System 2020-2021

Chapter 4

SYSTEM REQUIREMENTS SPECIFICATION

4.1. Definition, Acronyms and Abbreviations


1. DBMS – Data Base Management System
2. DB – Data Base
3. JRE – Java Runtime Environment
4. IDE – Integrated Development Environment

4.2 Interface Description


4.2.1 Front End
For our software, we’ve used the NETBEANS IDE for the development of the project front-end
and the language being used is HTML/PHP. For the display part, we are using CSS for making
web pages look attractive.

4.2.1.1 HTML
HTML stands for Hypertext Markup Language, and it is the most widely used language to write
Web Pages. Hypertext refers to the way in which Web pages (HTML documents) are linked
together. Thus, the link available on a webpage is called Hypertext. As its name suggests, HTML
is a Markup Language which means you use HTML to simply "mark-up" a text document with
tags that tell a Web browser how to structure it to display. Originally, HTML was developed
with the intent of defining the structure of documents like headings, paragraphs, lists, and so
forth to facilitate the sharing of scientific information between researchers. Now, HTML is being
widely used to format web pages with the help of different tags available in HTML language

Dept. of ISE, Atria IT Page 11


Bus Reservation System 2020-2021

CSS
CSS is an abbreviation for Cascading Style Sheets. CSS works with HTML and other Markup
Languages (such as XHTML and XML) to control the way the content is presented. Cascading
Style Sheets is a means to separate the appearance of a webpage from the content of a webpage.
CSS is a recommendation of the World Wide Web Consortium (the W3C). The presentation is
specified by styles, which are presented in a style sheet. The easier way to do is to create a
"rule", or style, for all the headlines in your document. Then all you have to do is to make one
rule, and keep on applying that to all your headers. CSS in its most basic form works exactly like
this. Instead of using <FONT> tags over and over again to control little sections of your page,
you can establish some rules to apply globally, to a single page or all the pages on your site. CSS
is a great time saver.

4.2.1.3 PHP
Hypertext Preprocessor (or simply PHP) is a server-side scripting language designed for Web
development, and also used as a general-purpose programming language. It was originally
created by Rasmus Lerdorf in 1994; the PHP reference implementation is now produced by The
PHP Group. PHP originally stood for Personal Home Page, but it now stands for the recursive
initialism PHP: Hypertext Preprocessor. PHP code may be embedded into HTML code, or it can
be used in combination with various web template systems, web content management systems,
and web frameworks. PHP code is usually processed by a PHP interpreter implemented as a
module in the web server or as a Common Gateway Interface (CGI) executable. The web server
combines the results of the interpreted and executed PHP code, which may be any type of data,
including images, with the generated web page

Dept. of ISE, Atria IT Page 12


Bus Reservation System 2020-2021

4.2.1.4 NetBeans IDE


NetBeans is a software development platform written in Java. The NetBeans Platform allows
applications to be developed from a set of modular software components called modules.
Applications based on the NetBeans Platform, including the NetBeans integrated development
environment (IDE), can be extended by third party developers. The editor supports many
languages from Java, C/C++, XML and HTML, to PHP, Groovy, Javadoc, JavaScript and JSP.
Because the editor is extensible, you can plug in support for many other languages.

4.2.2 XAMPP
Xampp is a free and open source cross-platform web server solution stack package developed by
Apache Friends, consisting mainly of the Apache HTTP Server, MariaDB database,
and interpreters for scripts written in the PHP and Perl programming languages. XAMPP stands
for Cross-Platform (X), Apache (A), MariaDB (M), PHP (P) and Perl (P). It is a simple,
lightweight Apache distribution that makes it extremely easy for developers to create a local web
server for testing and deployment purposes. Everything needed to set up a web server – server
application (Apache), database (MariaDB), and scripting language (PHP) – is included in an
extractable file. XAMPP is also cross-platform, which means it works equally well on Linux,
Mac and Windows. Since most actual web server deployments use the same components as
XAMPP, it makes transitioning from a local test server to a live server extremely easy as well.

4.2.3 Back End


For the storage and construction of database we are using MySQL in our back-end. MySQL is
used for arranged storage and easy modification of tables in a stored DB.

4.2.3.1 MySQL
Structured Query Language is a domain-specific language used in programming and designed
for managing data held in a relational database management system (RDBMS), or for stream
processing in a relational data stream management system ( RDSMS). Originally based upon
relational algebra and tuple relational calculus, SQL consists of a data definition language, data

Dept. of ISE, Atria IT Page 13


Bus Reservation System 2020-2021

manipulation language, and data control language. The scope of SQL includes “data insert,
query, update and delete, schema creation and modification, and data access control”.

4.3 Specific Requirements


4.3.1 Software Requirements

i. MySQL
ii. XAMPP
iii. Windows 10 Operating System
iv. NetBeans IDE 8.2

4.3.2 Hardware Requirements

i. 15” Monitor Display


ii. 1.8512 GHz Mb RAMProcessor
iii. 20Mb of HDD
iv. 512 Mb RAM
v. Keyboard 104 keys and Mouse

Dept. of ISE, Atria IT Page 14


Bus Reservation System 2020-2021

Chapter 5
IMPLEMENTATION
1. CODE SCREENSHOT FOR INSERTION CODE

Figure 5.1.1 code screenshot for insertion table

Dept. of ISE, Atria IT Page 15


Bus Reservation System 2020-2021

2. CODE SCREENTSHOT FOR DELETION CODE

Figure 5.1.2 code screenshot for deletion table

Dept. of ISE, Atria IT Page 16


Bus Reservation System 2020-2021

3. CODE SCREENSHOT FOR DISPLAY CODE OF ROUTE TABLE

Figure 5.1.3 code screenshot for route table

Dept. of ISE, Atria IT Page 17


Bus Reservation System 2020-2021

4. CODE SCREENSHOT FOR DISPLAY CODE OF LOGIN VALIDATION

Figure 5.1.3 code screenshot for login validation

Dept. of ISE, Atria IT Page 18


Bus Reservation System 2020-2021

Chapter 6

CONCLUSION AND FUTURE ENHANCEMENTS

Henceforth to conclude, I’ve developed a software application based on java using DBMS to
manage bus reservation details. And for the efficient working of the ongoing system I’ve this
application to computerize the transaction records.

Future Enhancements :-

1) Providing a web-based bus ticket reservation function where a customer can buy bus
ticket through the online system without a need to queue up at the counter to purchase a
bus ticket.
2) Enabling customers to check the availability and types of busses online. Customer can
check the time departure for every ITC bus through the system.
3) Easing bus ticket payment by obtaining a bank pin after payments is made to the various
designated banks.
4) Ability of customers to cancel their reservation.
5) Admin user privileges in updating and canceling payment, route and vehicle records.

Dept. of ISE, Atria IT Page 19


Bus Reservation System 2020-2021

REFERENCES

i. IEEE Standard 830-1998: IEEE Recommended Practice for Software Requirements


specifications.
ii. www.google.co.in
iii. www.oracle.com
iv. Various videos from www.youtube.com

v. https://www.oracle.com/java/index.html

vi. https://en.wikipedia.org/wiki/Java_virtual_machine

Dept. of ISE, Atria IT Page 20


Bus Reservation System 2020-2021

Appendix ‘A’
Screenshots

Dept. of ISE, Atria IT Page 21


Bus Reservation System 2020-2021

SCREEN SHOTS

1. Insertion page for Admin table

This is the screenshot of my mini-project’s index page.

Figure A.1. Insertion page for Admin table

Dept. of ISE, Atria IT Page 22


Bus Reservation System 2020-2021

2.Inserion page of Customer Table

This is the screenshot of my mini-project’s insertion page for Customer Table.

Figure A.2. Insertion page for Customer table

Dept. of ISE, Atria IT Page 23


Bus Reservation System 2020-2021

3.Contents displaying Page of contact Table

This is the screenshot of my mini-project’s insertion page for Contact Table.

Figure A.3. Displaying contents of Contact table

Dept. of ISE, Atria IT Page 24


Bus Reservation System 2020-2021

4.Contents displaying Page of Route Table


This is the screenshot of my mini-project’s insertion page for Route Table.

Figure A.4. Displaying contents of Route table

Dept. of ISE, Atria IT Page 25


Bus Reservation System 2020-2021

5. Contents displaying Page of Reserve Table

This is the screenshot of my mini-project’s insertion page for Reserve Table.

Figure A.5. Displaying contents of Reserve table

Dept. of ISE, Atria IT Page 26


Bus Reservation System 2020-2021

6.Triggers

This is the screenshot of my mini-project’s trigger page.

Figure A.6. Displaying contents of trigger

Triggers are stored programs (Stored procedures is a set of SQL statements with assigned name,
stored in relational database management system as a group, so it can be reused & shared by
multiple programs), which are automatically executed or fired when some event
occurs. Triggers are written to be executed in response to any of the following events. A
database manipulation (DML) statement (DELETE, INSERT, or UPDATE). A database
definition (DDL) statement (CREATE, ALTER, or DROP).
DELIMITER $$

CREATE TRIGGER newcustomer

BEFORE INSERT ON customer FOR EACH ROW

BEGIN

IF NEW.setnumber>50 THEN

SET NEW.setnumber=50;

END IF;

Dept. of ISE, Atria IT Page 27


Bus Reservation System 2020-2021

END $$

DELIMITER ;

Dept. of ISE, Atria IT Page 28

You might also like