You are on page 1of 12

Pundra University of Science & Technology

Department: Computer Science & Engineering


Course Code: CSE 225
Course Title: Database Management System

Assignment on
Participation , Diagram and Aggregation

Submitted By Submitted To
Name: Mujahidul Islam Rahi Name: Md. Julkar Nayeem
ID: 01319106023 Designation: Lecturer

USER ID: 01319106023 Department: Dept. of Computer


Batch: 13th Batch(HSC) Science and Engineering

Year & Semester: 2nd year,


4th semester
Session: Spring - 19

Submission Date: 23 November, 2020


Table of Contents

CHAPTER ONE
1. Participation
 Overview.................................................................................................... 2
 Total Participation ..................................................................................... 3
 Partial Participation ............................................................................ 4

CHAPTER TWO
1. ER-Diagram
 What is ER-Diagram................................................................................. 5
 History of ER-Diagram.............................................................................. 6
 Why we use ER-Diagram...................................................................... 7

CHAPTER THREE
2. Aggregation
 Definition of Aggregation.................................................................... 8
 What is Generalization......................................................................... 9
 What is Specialization.......,......................................................................... 10
 What is the difference between Generalization and Specialization............. 11

1
CHAPTER ONE
Participation

Definition : The participation constraint specifies whether the existence of an entity


depends on its being related to another entity via the relationship type. This
constraint specifies the minimum number of relationship instances that each entity
can participate in.
There are two types of participation constraints: Total Participation and Partial
Participation

2
Total Participation

Total Participation is when each entity in the entity set occurs in at least one
relationship in that relationship set.
For instance, consider the relationship borrower between customers and
loans. A double line from loan to borrower, as shown in figure below indicates
that each loan must have at least one associated customer.

Example :

Here,
 Double line between the entity set “Student” and relationship set “Enrolled in”
signifies total participation.
It specifies that each student must be enrolled in at least one course.

3
Partial Participation

Partial Participation is when each entity in the entity set may not occur in at least one
relationship in that relationship set. For instance, If a company policy states that
employee (manager) must manage a department, However every employee may not
manage a department, so the participation of EMPLOYEE in the MANAGES
relationship type is partial, meaning that some or part of the set of employee entities
are related to some department entity via MANAGES, but not necessarily all.
Note: Partial Participation is represented by single line connecting entities in
relationship.

Example :

Here,
 Single line between the entity set “Course” and relationship set “Enrolled in”
signifies partial participation.
 It specifies that there might exist some courses for which no enrollments are
made.

4
CHAPTER TWO

What is an ER diagram?

An Entity Relationship (ER) Diagram is a type of flowchart that illustrates how


“entities” such as people, objects or concepts relate to each other within a system.
ER Diagrams are most often used to design or debug relational databases in the
fields of software engineering, business information systems, education and
research. Also known as ERDs or ER Models, they use a defined set of symbols
such as rectangles, diamonds, ovals and connecting lines to depict the
interconnectedness of entities, relationships and their attributes. They mirror
grammatical structure, with entities as nouns and relationships as verbs.ER
diagrams are related to data structure diagrams (DSDs), which focus on the
relationships of elements within entities instead of relationships between entities
themselves. ER diagrams also are often used in conjunction with data flow diagrams
(DFDs), which map out the flow of information for processes or systems.

5
History of ER-Diagram

Peter Chen (a.k.a. Peter Pin-Shan Chen), currently a faculty member at Carnegie-
Mellon University in Pittsburgh, is credited with developing ER modeling for database
design in the 1970s. While serving as an assistant professor at MIT’s Sloan School
of Management, he published a seminal paper in 1976 titled “The Entity-Relationship
Model: Toward a Unified View of Data.” In a broader sense, the depiction of the
interconnectedness of things dates back to least ancient Greece, with the works of
Aristotle, Socrates and Plato. It’s seen more recently in the 19th and 20th
Century works of philosopher-logicians like Charles Sanders Peirce and Gottlob
Frege.

By the 1960s and 1970s, Charles Bachman (above) and A.P.G. Brown were working
with close predecessors of Chen’s approach.  Bachman developed a type of Data
Structure Diagram, named after him as the Bachman Diagram. Brown published
works on real-world systems modeling.  James Martin added ERD refinements. The
work of Chen, Bachman, Brown, Martin and others also contributed to the
development of Unified Modeling Language (UML), widely used in software design.

6
Why we use ER-Diagram
The most common use of this diagram is to present the relation of the various tables
present in a database. Some key benefits of Entity Relationship Diagrams are further
discussed in this article.

Visual Representation
The most crucial benefit of ERD is that it offers a visual presentation of the layout.
Having an effective design provides assistance to the database designers to
determine the flow of data and working of the complete system. ERD in combination
with data-flow diagrams result in an effective visual representation.

Effective communication
The clear representation of the data listed under proper headings and tables results
in the effective flow of information and communication. The readers can easily
understand the relationship between different fields. The information is represented
via different symbols. There are various symbols for representing different
information like relationships are represented by diamond shaped boxes, attributes
are represented by ovals and entities are represented by rectangular boxes. These
symbols allow the designer to have a proper understanding of the working of the
database after completion.

Easy To Understand
Entity relationship diagrams can easily be created by expert designers. These are
designed in a simple manner so that all the individuals can understand it easily.
Before actually designing the database, the designers are required to get the design
confirmed and approved the representatives who are to use this data. The
representatives have the right to give their suggestions for rectifying the issues
related to the designer. Their contribution can play an important role in enhancing
the overall design.

High flexibility
This is yet another feature of ERD models. Though the complete database is linked
to information in different tables, the readers can easily make out the relationship
between various tables. There are several other mathematical formulae which can
be used to determine the relationships.
Entity relationship diagrams are an essential part of the business organizations as
they prove to be beneficial in managing wide data in an easy and effective manner. It
acts as a blueprint of the existing database and allows the designers to create an
accurate design as per the needs and requirements of the company and the project.
The ERD model makes data flow more efficient. These creative and simple diagrams
serve as the best tool for the business organizations allowing them to maintain their
database effectively.

This is why we use ER-Diagram.

7
CHAPTER THREE

Definition of Aggregation

Definition : Aggregation in DBMS (Database Management System) is a process


of combining two or more entities to form a more meaningful new entity. This
Aggregation process is done when the entities don’t make sense on their own
without applying the aggregation process. In order to create aggregation between
two entities, which cannot be used for its individual qualities, a relationship is
established and the resulting product is created into a new entity. The relationship
can be of any type, such as SUM, AVG, AND, OR, etc. Aggregation on tables can be
performed using various tools available in the market.

Reasons for Using Aggregation in DBMS


Aggregation method in DBMS is applied when the DBMS has the below conditions,

 When the DBMS has only trivial entities and no complex entities, it is not
possible for future upgrade or In this situation, two or more trivial entities can
be used to create a new relationship between them, and the resulting artifact
can be formed as a new complex entity.
 When the DBMS has one trivial entity, which needs to be used for more than
one operation, then this entity is used to create a relationship with more than
one other This can result in multiple aggregation processes, and multiple new
entities depending on the operations applied between the entities.
 When the Entity-Relationship model is not able to represent the relationship
between any entities in its system, that particular entity can be used to create
a new relationship with any other The resulting entity can be used to set up
relationships in the Entity-Relationship model. In this scenario, Aggregation
helps in making use of all the entities in the system, as an alternative to letting
any entity to be inoperative.

These are a few sample scenarios where Aggregation will be an essential process.
Practically, there can be other possible situations where Aggregation can help in
making the DBMS more scalable for future upgrades and long-lasting in nature.

8
What is Generalization ?
It works on the principle of bottom up approach. In Generalization lower level functions
are combined to form higher level function which is called as entities. This process is
repeated further to make advanced level entities.
In the Generalization process properties are drawn from particular entities and thus we
can create generalized entity. We can summarize Generalization process as it
combines subclasses to form superclass.
Example:
Consider two entities Student and Patient. These two entities will have some
characteristics of their own. For example Student entity will have Roll_No, Name and
Mob_No while patient will have PId, Name and Mob_No characteristics. Now in this
example Name and Mob_No of both Student and Patient can be combined as a
Person to form one higher level entity and this process is called as Generalization
Process.

9
What is Specialization ?
We can say that Specialization is opposite of Generalization. In Specialization things
are broken down into smaller things to simplify it further. We can also say that in
Specialization a particular entity gets divided into sub entities and it’s done on the
basis of it’s characteristics. Also in Specialization Inheritance takes place.
Example:
Consider an entity Account. This will have some attributes consider them Acc_No and
Balance. Account entity may have some other attributes like Current_Acc and
Savings_Acc. Now Current_Acc may have Acc_No, Balance and Transactions while
Savings_Acc may have Acc_No, Balance and Interest_Rate henceforth we can say
that specialized entities inherits characteristics of higher level entity.

10
What is the difference between Generalization and Specialization ?

Difference between Generalization and Specialization :

GENERALIZATION SPECIALIZATION

Generalization works in Bottom-Up Specialization works in top-down


approach. approach.

In Generalization, size of schema gets In Specialization, size of schema gets


reduced. increased.

Generalization is normally applied to We can apply Specialization to a single


group of entities. entity.

Generalization can be defined as a Specialization can be defined as process


process of creating groupings from of creating subgrouping within an entity
various entity sets set

Specialization is reverse of
In Generalization process, what actually Generalization. Specialization is a
happens is that it takes the union of two process of taking a subset of a higher
or more lower-level entity sets to produce level entity set to form a lower-level entity
a higher-level entity sets. set.

Generalization process starts with the Specialization process starts from a


number of entity sets and it creates high- single entity set and it creates a different
level entity with the help of some common entity set by using some different
features. features.

In Generalization, the difference and


similarities between lower entities are In Specialization, a higher entity is split to
ignored to form a higher entity. form lower entities.

There is no inheritance in Generalization. There is inheritance in Specialization.

11

You might also like