333 Conceptual Design
333 Conceptual Design
DBMS Lab
Objective:
This lab enables the students to practice the concepts learnt in the subject DBMS by
developing a database for an example company named ―Roadway Travels‖ whose description
is as follows: The student is expected to practice the designing, developing and querying a
database in the context of example database ―Roadway Travel‖. Students are
expected to use ―Mysql‖ database.
Roadways Travels:
Reservations:
Reservations are directly handled by booking office. Reservation can be made 60
days in advance in either cash or credit .In Case the ticket is not available, a wait listed
ticket is issued to the customer. This ticket is confirmed against the cancellation.
KITS Page -1
Computer Science and Engineering Data Base Management System
E-R MODEL:
Analyze the problem carefully and come up with the entities in it. Identify
what data has to be persisted in the database. This contains the entities, attributes etc.
Identify the primary keys for all the entities. Identify the other keys like candidate
keys, partial keys, if any.
Example: Entities:
1. Bus
2. Ticket
3. Passenger
Primary key Attributes:
1. Ticket Id (Ticket Entity)
2. Passport Id (Passenger Entity)
A part from the above mentioned entities you can identify more. The above mentioned
are few.
E-R Model:
The E-R model is a top-down approach to database design that is based on uniquely
identifiable object. It begins by identifying that are uniquely distinguishable called entities
and relationship among these entities.
Entity: It is a 'thing' in the real world with an independent existence. (or)
A real word object that can be distinguished from other objects is called an entity.
There are two types of entities:
1) Strong Entity
2) Weak Entity
Entity type: It is a collection (set) of entities that have same attributes.
Entity set: It is a collection of all entities of particular entity type in the database.
Extension of entity type: The collections of entities of a particular entity type are
grouped together into an entity set.
Attribute: It is a particular property, which describes the entity.(or) Each entity &
relationship has a property called Attributes.
KITS Page -2
Computer Science and Engineering Data Base Management System
The difference symbols which are used to draw E-R models:
2. Ellipse (Attributes)
Super Key:
A Super Key of an entity set is a set of one (or) more attributes whose values uniquely
determine each entity.
Candidate Key:
A Candidate Key of an entity set is a minimal super key.
For example: 1) Customer_Id is Candidate Key of
Customer
2)Account_ Number is Candidate Key of Account
Primary Key:
Although several Candidate keys may exist, one of the Candidate keys is selected to
be the Primary Key.
Partial Key:
It is a set of attributes that can uniquely identify weak entities and that are related
to same owner entity. It is sometime called as Discriminator.
Example: Entities:
1. Bus
2. Ticket
3. Passenger
Bus Attributes:
BusNo,
KITS Page -3
Computer Science and Engineering Data Base Management System
Dept_time,
Source,
Destination,
WeekDay
Ticket Attributes:
Ticket No,
Journey Date,
Source,
Destination,
Age,
Arrival Time,
Departure Time,
SEX
Passenger Attributes:
Name, PNO_NO,
Ticket No,
PPNO,
SEX,
Age
Reservation Attributes:
No_of_Seats,
PNR_NO,
Status,
Journey Date,
Address,
Contact No
Cancellation Attributes:
No_of_Seats,
PNR_NO,
Waiting List,
Status,
Journey Date,
Address,
Contact No
KITS Page -4
Computer Science and Engineering Data Base Management System
KITS Page -5
Computer Science and Engineering Data Base Management System
Week -2
Concept design with ER model:
Relationship:-
It is defined as an association among several entities. A relationship can be one-to-one,
one-to-many (or) many-to-many.
A Collection of similar relationships is called a relationship set and is denoted by a Rhombus.
Strong Entity: It is the one that does not depend on other entities.
Weak Entity: It is the one that depends on other entities for existence.
Specialization: All the entities within an entity set do not share all the attributes.
Aggregation: The drawback of ER diagrams is that can not show the relationship
among relationship
KITS Page -6
Computer Science and Engineering Data Base Management System
KITS Page -7