You are on page 1of 9

D. Y.

PATIL COLLEGE OF ENGINEERING, AKURDI PUNE 411044


Department of Artificial Intelligence & Data Science

DBMS Lab Manual

-------------------------------------------------------------------------------------------------------------
Name:- vaishnavi ghodke
Department: AI&DS Academic Year: 2022 – 2023 Semester: V
Subject: SL- I: Database Management System (317523)

Assignment - 1
TITLE :
Conceptual design using ER Model, Reducing ER into tables, normalization
OBJECTIVE Propose a Conceptual Design using ER features using tools like ERDplus, ER Win
etc. Convert the ER diagram into tables on paper and propose a normalize Relational data model.

PROBLEM STATEMENT: Hospital appointment system.

THEORY:
● All ER Notations

ERD entity symbols :

Entities are objects or concepts that represent important data. Entities are typically nouns such as product, customer,
location, or promotion. There are three types of entities commonly used in entity relationship diagrams.

Entity Symbol Name Description

These shapes are independent from other entities, and are


often called parent entities, since they will often have
Strong entity
weak entities that depend on them. They will also have a
primary key, distinguishing each occurrence of the entity.
Weak entities depend on some other entity type. They
Weak entity don't have primary keys, and have no meaning in the
diagram without their parent entity.

Associative entities relate the instances of several entity


Associative entity types. They also contain attributes specific to the
relationship between those entity instances.
ERD relationship symbols :

Within entity-relationship diagrams, relationships are used to document the interaction between two entities.
Relationships are usually verbs such as assign, associate, or track and provide useful information that could not be
discerned with just the entity types.

Relationship Symbol Name Description

Relationships are associations between or among


Relationship
entities.

Weak Relationships are connections between a weak


Weak relationship
entity and its owner.
ERD attribute symbols

ERD attributes are characteristics of the entity that help users to better understand the database. Attributes are
included to include details of the various entities that are highlighted in a conceptual ER diagram.

Attribute Symbol Name Description

Attributes are characteristics of an entity, a many-to-


Attribute
many relationship, or a one-to-one relationship.

Multivalued attributes are those that are can take on


Multivalued attribute
more than one value.

Derived attributes are attributes whose value can be


Derived attribute
calculated from related attribute values.
Relationships are associations between or among
Relationship
entities.

● Brief rules to reduce ER diagram into tables


• Entity type becomes a table.
• All single-valued attribute becomes a column for the table.
• A key attribute of the entity type represented by the primary key.
• The multivalued attribute is represented by a separate table
• Composite attribute represented by components.
• Derived attributes are not considered in the table.

● Brief about 1NF, 2NF, 3NF and BCNF

Normal
Description
Form

1NF A relation is in 1NF if it contains an atomic value.

2NF A relation will be in 2NF if it is in 1NF and all non-key attributes are

fully functional dependent on the primary key.

3NF A relation will be in 3NF if it is in 2NF and no transition dependency

exists.

BCNF A stronger definition of 3NF is known as Boyce Codd's normal form.


E-R Diagram (for your Problem Statement):

Reduced Table Structure from above E-R Diagram:

Medical Report :
Attribute Data Type Constraint

Patient_id Int foreign_key


Diagnosed_With String

Date date

Hospital Table
Attribute Data Type Constraint

Hospital_name String Primary Key


Hosp_add String NOT NULL

Doctor Table :
Column name Data type Constraints
Name varchar NOT NULL

doctor_ID int Primary_key , NOT NULL


qualification String

Hospital_name String Foreign Key


Appointment table :

Column name Data type Constraints

Appoint_ID int Primary key


Apt_time time

Apt_date date
Patient_ID int Foreign key

Doctor_ID int Foreign key

Patient report :
Attribute Data Type Constraint

Patient_id int Primary Key


Patient_name String NOT NULL

Contact int
Address String

Normalized Tables at least in 3NF:

CONCLUSION

ROADWAY TRAVELS
“Roadway Travels” is in business since 1977 with several buses connecting different
places in India. Its main office is located in Hyderabad.
The company wants to computerize its operations in the following areas:
Reservations
Ticketing
Cancellations

Reservations :
Reservations are directly handeled by booking office.reservations 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.

Cancellation and modification:


Cancellations are also directly handed at the booking office. Cancellation charges
will be charged.
Wait listed tickets that do not get confirmed are fully refunded.

AIM: Analyze the problem and come with the entities in it. Identify what Data has to
be
persisted in the databases.
The Following are the entities:
1 .Bus
2. Reservation
3. Ticket
4. Passenger
5. Cancellation

You might also like