Dbms Course Report
Dbms Course Report
Dbms Course Report
Submitted by
NAME USN
1)Pratyush Prakash 2GI19IS038
Associative Professor
1|Page
Karnataka Law Society’s
GOGTE INSTITUTE OF TECHNOLOGY
Udyambag Belagavi -590008 Karnataka,
India.
Certificate
This is to certify that the Course Project work titled “Travel And Hotel Booking System”carried
out by Pratyush Prakash, Prashant Badiger, Prajwal Jainkeri bearing USNs:
2GI19IS038, 2GI19IS035,2GI19IS033 is submitted in partial fulfilment of the requirements
for 4th semester B.E. in INFORMATION SCIENCE AND ENGINEERING, Visvesvaraya
Technological University, Belagavi. It is certified that all corrections/ suggestions indicated
have been incorporated in the report. The course project report has been approved as it
satisfies the academic requirements prescribed for the said degree.
Associate Professor
1.___________________ 1.____________________
2.____________________ 2.____________________
Marks allocation:
2|Page
Batch No.: 14
Seminar Title: Marks USN
Travel and hotel Range 2GI19IS038 2GI19IS035 2GI19IS033
Booking System
Table of Contents:
1. Introduction:........................................................................................................2
2. Literature survey:.................................................................................................5
3. Database design:..................................................................................................6
4. Database design:..................................................................................................8
ER-MODEL:.........................................................................................................9
Relational model.................................................................................................11
ER-Relational Mapping......................................................................................13
5. Schema Diagram:...............................................................................................16
3|Page
4. Normalization:...................................................................................................17
6. Table Creations..................................................................................................22
7. Populating Tables...............................................Error! Bookmark not defined.
8. User Interface Designs.......................................Error! Bookmark not defined.
9. SQL Queries.......................................................Error! Bookmark not defined.
10. Conclusions......................................................................................................35
11. References........................................................................................................35
• It doesn’t matter if it is a large or small DBMS; with the help of it, we can store and
retrieve data and make changes whenever we want.
• Some commands are predefined in DBMS and these commands can be used to
manipulate the database. Also, these commands are the interface between the database
and the end-users to establish communication.
4|Page
Characteristics of DBMS;
2. Literature survey:
The project, Hotel Management System is a web-based application that allows the
hotel manager to handle all hotel activities online. Interactive GUI and the ability to
manage various hotel bookings and rooms make this system very flexible and
convenient. The hotel manager is a very busy person and does not have the time to
sit and manage the entire activities manually on paper. This application gives him
the power and flexibility to manage the entire system from a single online system.
Hotel management project provides room booking, staff management and other
necessary hotel management features. The system allows the manager to post
available rooms in the system. Customers can view and book room online. Admin
has the power of either approving or disapproving the customer’s booking request.
Other hotel services can also be viewed by the customers and can book them too.
The system is hence useful for both customers and managers to portable manage the
hotel activities.
Advantages
Sometime it happens that the rooms get booked soon when one visits the place
therefore user can make advance booking using this system.
It saves user time in searching a room.
The system is useful as it calculates an exact cost of rooms for requested number
of days.
It saves organization resources and expenses.
This system is effective and saves time and cost of users.
Disadvantages
5|Page
The booking process usually requires a customer identity, which the system
cannot detect.
It requires a reliable internet connection.
Travel Reservation Software is online Travel Booking Software that configures travel data for hotels,
flights, package, tour, and car-rental services in Travel Reservation System to provide flights, hotels,
tour booking for customers.
Travel Reservation Software provides inventory and rate in real-time data to customer. Also it allow to
book hotels in different geographical locations.
Technoheaven design, create and deliver the customized Travel Reservation Software for travel agent
which give adaptable reservation and inventory management for flights, hotels, cars in real time.
Travel Reservation Software also offer quick supplier connectivity to integrate global hotel, flight,
tour, package and transfer inventory in travel booking engine/travel portal of travel agent with
advanced functionality of GDS API Integration and Travel API Integration using Flight API, Hotel
API, Travel API, Transfer API to build successful Online Travel Reservation Software System for
travel website.
3. Database design:
The Data Model is defined as an abstract model that organizes data description, data
semantics, and consistency constraints of data. The data model emphasizes on what data is
needed and how it should be organized instead of what operations will be performed on data.
Data Model is like an architect's building plan, which helps to build conceptual models and
set a relationship between data items.
Types of Data Models: There are mainly three different types of data models: conceptual
data models, logical data models, and physical data models, and each one has a specific
6|Page
purpose. The data models are used to represent the data and how it is stored in the database
and to set the relationship between data items.
1. Conceptual Data Model: This Data Model defines WHAT the system contains. This
model is typically created by Business stakeholders and Data Architects. The purpose
is to organize, scope and define business concepts and rules.
2. Logical Data Model: Defines HOW the system should be implemented regardless of
the DBMS. This model is typically created by Data Architects and Business Analysts.
The purpose is to developed technical map of rules and data structures.
3. Physical Data Model: This Data Model describes HOW the system will be
implemented using a specific DBMS system. This model is typically created by DBA
and developers. The purpose is actual implementation of the database.
• The main goal of a designing data model is to make certain that data objects offered by
the functional team are represented accurately.
• The data model should be detailed enough to be used for building the physical
database.
• The information in the data model can be used for defining the relationship between
tables, primary and foreign keys, and stored procedures.
• Data Model helps business to communicate the within and across organizations.
• Data model helps to documents data mappings in ETL process
• Help to recognize correct sources of data to populate the model.
7|Page
Disadvantages of data model: • To develop Data model, one should know
4. Database design:
The goals of database design are multiple:
I. Satisfy the information content requirements of the specified users and applications.
II. Provide a natural and easy-to-understand structuring of the information
III. Support processing requirements and any performance objectives, such as response
time, processing time, and storage space.
These goals are very hard to accomplish and measure and they involve an inherent trade-off:
if one attempts to achieve more naturalness and understandability of the model, it may be at
the cost of performance. The problem is aggravated because the database design process
often begins with informal and incomplete requirements. In contrast, the result of the design
activity is a rigidly defined database schema that cannot easily be modified once the database
is implemented. We can identify six main phases of the overall database design and
implementation process:
Steps for database design and implementation:
8|Page
and software engineers that the two activities should proceed hand-in-hand, and design tools
are increasingly combining them.
ER-MODEL:
• ER model stands for an Entity-Relationship model. It is a high-level data model. This
model is used to define the data elements and relationship for a specified system.
• It develops a conceptual design for the database. It also develops a very simple and
easy to design view of data.
• In ER modelling, the database structure is portrayed as a diagram called an
entityrelationship diagram.
1. Entity: An entity may be any object, class, person or place. In the ER diagram, an
entity
can be represented as rectangles.
Weak entity: An entity that depends on another entity called a weak entity.
The weak entity doesn't contain any key attribute of its own. The weak entity
is represented by a double rectangle
2. Attribute: The attribute is used to describe the property of an entity. Eclipse is used
to represent an attribute.
9|Page
a. Key attribute: The key attribute is used to represent the main characteristics of
an entity. It represents a primary key. The key attribute is represented by an
ellipse with the text underlined
b. Composite attribute: An attribute that composed of many other attributes is
known as a composite attribute. The composite attribute is represented by an
ellipse, and those ellipses are connected with an ellipse.
c. Multivalued attribute: An attribute can have more than one value. These
attributes are known as a multivalued attribute. The double oval is used to
represent multivalued attribute.
d. Derived attribute: An attribute that can be derived from another attribute is
known as a derived attribute. It can be represented by a dashed ellipse.
3. Relationship: A relationship is used to describe the relation between entities.
Diamond or rhombus is used to represent the relationship.
a. One-to-one relation: When only one instance of an entity is associated with the
relationship, then it is known as one-to-one relationship.
b. One-to-many relation: When only one instance of the entity on the left, and
more than one instance of an entity on the right associates with the
relationship then this is known as a one-to-many relationship.
c. Many-to-one relation: When more than one instance of the entity on the left,
and only one instance of an entity on the right associates with the relationship
then it is known as a many-to-one relationship
d. Many-to-many relation: When more than one instance of the entity on the left,
and more than one instance of an entity on the right associates with the
relationship then it is known as a many-to-many relationship.
10 | P a g e
ER diagram:
Relational model
11 | P a g e
Hotel Strong H_ID, name, H_ID H_ID
address
1. Attribute: Each column in a Table. Attributes are the properties which define a
relation.
2. Tables – In the Relational model the, relations are saved in the table format. It is
stored along with its entities. A table has two properties rows and columns. Rows
represent records and columns represent attributes.
3. Tuple – It is nothing but a single row of a table, which contains a single record.
4. Relation Schema: A relation schema represents the name of the relation with its
attributes.
5. Degree: The total number of attributes which in the relation is called the degree of the
relation.
6. Cardinality: Total number of rows present in the Table.
7. Column: The column represents the set of values for a specific attribute.
8. Relation instance – Relation instance is a finite set of tuples in the RDBMS system.
Relation instances never have duplicate tuples.
9. Relation key - Every row has one, two or multiple attributes, which is called relation
key.
10. Attribute domain – Every attribute has some pre-defined value and scope which is
known as attribute domain
12 | P a g e
Admin manages Branch and 1:1 One admin manages one
travel agency Account travel agency also one travel
agency is managed by one
admin , so the relationship
between Admin and Travel
agency is one to one.
Customers pay Bill Customer and 1:N One customer can pay many
Bill bill , one bill cannot be paid
by many customer , so the
relation between customer
and bill is one to many.
Hotel has Bill Hotel and Bill 1:N One hotel can have many bill
but one bill cannot have
many hotel , so the
relationship between hotel
and bill is one to many .
• For each regular (strong) entity type E in the ER schema, create a relation R that
includes all the simple attributes of E.
• Choose one of the key attributes of E as the primary key for R. If the chosen key of E
is composite, the set of simple attributes that form it will together form the primary
key of R.
13 | P a g e
• For each weak entity type W in the ER schema with owner entity type E, create a
relation R and include all simple attributes (or simple components of composite
attributes) of W as attributes of R.
• In addition, include as foreign key attributes of R the primary key attribute(s) of the
relation(s) that correspond to the owner entity type(s).
• The primary key of R is the combination of the primary key(s) of the owner(s) and the
partial key of the weak entity type W, if any.
For each binary 1:1 relationship type R in the ER schema, identify the relations S and T that
correspond to the entity types participating in R. There are three possible approaches:
(1) Foreign Key approach: Choose one of the relations-S, say-and include a foreign key
in S the primary key of T. It is better to choose an entity type with total participation in R in
the role of S.
(2) Merged relation option: An alternate mapping of a 1:1 relationship type is possible by
merging the two entity types and the relationship into a single relation. This may be
appropriate when both participations are total.
(3) Cross-reference or relationship relation option: The third alternative is to set up a third
relation R for the purpose of cross-referencing the primary keys of the two relations S and T
representing the entity types.
• For each regular binary 1:N relationship type R, identify the relation S that represent
the participating entity type at the N-side of the relationship type.
• Include as foreign key in S the primary key of the relation T that represents the other
entity type participating in R.
• Include any simple attributes of the 1:N relation type as attributes of S.
• For each regular binary M:N relationship type R, create a new relation S to represent
R.
• Include as foreign key attributes in S the primary keys of the relations that represent
the participating entity types; their combination will form the primary key of S.
14 | P a g e
• Also include any simple attributes of the M:N relationship type (or simple
components of composite attributes) as attributes of S.
• For each multivalued attribute A, create a new relation R. This relation R will include
an attribute corresponding to A, plus the primary key attribute K-as a foreign key in
Rof the relation that represents the entity type of relationship type that has A as an
attribute.
• The primary key of R is the combination of A and K. If the multivalued attribute is
composite, we include its simple components.
• For each n-ary relationship type R, where n>2, create a new relationship S to
represent R.
• Include as foreign key attributes in S the primary keys of the relations that represent
the participating entity types.
• Also include any simple attributes of the n-ary relationship type (or simple
components of composite attributes) as attributes of S.
15 | P a g e
5. Schema Diagram:
16 | P a g e
4. Normalization:
The process of decomposing unsatisfactory "bad" relations by breaking up their
attributes into smaller relations. Normalization is carried out in practice so that the
resulting designs are of high quality and meet the desirable properties
Normal form: Condition using keys and Functional Dependencies of a relation to certify
whether a relation schema is in a particular normal form Types of Normal form :
3NF: A relation schema R is in third normal form, if it is in 2NF and no non-prime attribute
A in R is transitively dependent on the primary key
17 | P a g e
Normalisation:
18 | P a g e
Lab Project Report On
Batch No: 01
NAME USN
Pratyush Prakash 2GI19IS038
Prof.Sudhindra. B.Deshpande
KLS, GIT, Department of ISE, Belagavi
Course Name: Database Management System
Semester: IV
Course Code: 18IS43
19 | P a g e
Lab Project Report on
1. Title
2. Problem statement for that the project
3. Need Analysis, Variables involved
4. Atleast two alternate solutions to solve the problem defined or meet the need analysis
5. Comparison between the solutions and reason for selecting the final solution
6. Working model of the final solution
Marks allocation:
Batch No. : 14
1 Project Title: Travel And Hotel Boooking Mark USN
. System s 2GI19IS053 2GI19IS008 2GI19IS064
Rang
e
2 Problem statement (PO2) 0-1
.
3 Need Analysis, Variables involved
0-2
. (PO1,PO2)
4 Alternate solutions to solve the
0-3
. problem(PO3)
5 Comparison between the solutions
. and reason for selecting the final 0-4
solution(PO1,PO3,PO4)
6 Working model of the final solution
0-5
. (PO3,PO12)
7 Report and Oral presentation skill
0-5
. (PO9,PO10)
Total 20
* 20 marks is converted to 10 marks for CGPA calculation
21 | P a g e
21 | P a g e
6. Table Creations
1. Admin Tabel :
A_ID int,
Password varchar(15),
A_Name varchar(15),
primary key(A_ID)
);
22 | P a g e
2. Travel Agency Table:
T_ID varchar(15),
Name varchar(15),
Address varchar(30),
Cell int,
primary key(T_ID)
);
23 | P a g e
3. Tourist Place Table:
Trs_ID varchar(15),
Trs_Name varchar(25),
Location varchar(30),
primary key(Trs_ID)
);
H_ID varchar(15),
H_Nmae varchar(30),
Address varchar(30),
primary key(H_ID)
);
25 | P a g e
5. Bill Table :
BILL_ID int,
BILL_Date date,
Amount varchar(15),
primary key(BILL_ID)
);
26 | P a g e
insert into BILL values(8800, '2021-05-10','RS 8853');
6. Customer Table:
C_ID varchar(15),
Name varchar(20),
Age int,
Address varchar(30),
Cell int,
primary key(C_ID)
);
27 | P a g e
insert into CUSTOMER values('RD9854','Prince Raj',23,'Kolkata',996413528);
6. Books table :
CREATE TABLE BOOKS(
T_ID varchar(15),
H_ID varchar(15),
primary key(T_ID,H_ID),
foreign key(T_ID) references TRAVEL_AGENCY(T_ID),
foreign key(H_ID) references HOTEL(H_ID)
);
7. Visits Table :
T_ID varchar(15),
Trs_ID varchar(15),
primary key(T_ID,Trs_ID),
);
29 | P a g e
insert into VISITS values('A89','V17I66');
30 | P a g e
2. ADMIN
3 BILL
31 | P a g e
4 BOOKS
HOTEL
32 | P a g e
TOURIST PLACE
Travel Agency
33 | P a g e
VISITS
CUSTOMER
34 | P a g e
10. Conclusions
As we know Travelling has become a part of our life. Most of the people loves travelling.
So for travelling we need a good guide, and a travel agency so that the travelling and hotel
booking become easy. Hotel booking is very important during travelling . With the help of this
program we can easily get the details of travel agency, tourist place, hotel in the specific
region.
11. References
➢ www.guru99.com
➢ www.javapoint.com
➢ www.geeksforgeeks.com ➢
www.tutorialspoint.com
35 | P a g e