Index: Annexure-I
Index: Annexure-I
ANNEXURE-I
1.0 Aims/Benefits of the Micro-Project 5
ANNEXURE-II
Brief Introduction/Rationale
1.0 7-8
ANNEXURE-I
1
1.0 Aims/Benefits of the micro project
Introduction to ER Diagram with the help of diagram
Benefit Taken from this micro-project is understanding the concept of ER diagram notations
2
Sr. Plan start Plan finish Name of responsible
Detail of activity
No. date date team members
1
2 Textbook/Manual DBMS Database Management System 22319
ANNEXURE-II
3
1.0 Brief Introduction/Rationale
An ER diagram shows the relationship among entity sets. An entity set is a group of
similar entities and these entities can have attributes. In terms of DBMS, an entity is a
table or attribute of a table in database, so by showing relationship among tables and their
attributes, ER diagram shows the complete logical structure of a database. Lets have a
look at a simple ER diagram to understand this concept.
A simple ER Diagram:
4
In the following diagram we have two entities Student and College and their relationship.
The relationship between Student and College is many to one as a college can have many
students however a student cannot study in multiple colleges at the same time. Student
entity has attributes such as Stu_Id, Stu_Name & Stu_Addr and College entity has
attributes such as Col_ID & Col_name.
Here are the geometric shapes and their meaning in an E-R Diagram. We will discuss
these terms in detail in the next section (Components of a ER Diagram) of this guide so
don’t worry too much about these terms now, just go through them once.
5
2.0 Components of a ER Diagram
1. Entity
6
Weak Entity:
An entity that cannot be uniquely identified by its own attributes and relies on the
relationship with other entity is called weak entity. The weak entity is represented by a
double rectangle. For example – a bank account cannot be uniquely identified without
knowing the bank to which the account belongs, so bank account
is a weak entity.
Weak Entities
A weak entity is a type of entity which doesn't have its key attribute. It can be identified
uniquely by considering the primary key of another entity. For that, weak entity sets
need to have participation.
7
In above example, "Trans No" is a discriminator within a group of transactions in an
ATM. Let's learn more about a weak entity by comparing it with a Strong Entity
Strong entity set always has a primary It does not have enough attributes to build
key. a primary key.
It is represented by a rectangle symbol. It is represented by a double rectangle
symbol.
It contains a Primary key represented by It contains a Partial Key which is
the underline symbol. represented by a dashed underline symbol.
The member of a strong entity set is The member of a weak entity set called as
called as dominant entity set. a subordinate entity set.
Primary Key is one of its attributes which In a weak entity set, it is a combination of
helps to identify its member. primary key and partial key of the strong
entity set.
In the ER diagram the relationship The relationship between one strong and a
between two strong entity set shown by weak entity set shown by using the double
using a diamond symbol. diamond symbol.
The connecting line of the strong entity The line connecting the weak entity set
set with the relationship is single. for identifying relationship is double.
2. Attribute
An attribute describes the property of an entity. An attribute is represented as Oval in
an ER diagram. There are four types of attributes:
1. Key attribute
2. Composite attribute
3. Multivalued attribute
4. Derived attribute
8
1. Key attribute:
A key attribute can uniquely identify an entity from an entity set. For example, student
roll number can uniquely identify a student from a set of students. Key attribute is
represented by oval same as other attributes however the text of key
attribute is underlined.
3. Multivalued attribute:
9
4. Derived attribute:
A derived attribute is one whose value is dynamic and derived from another attribute. It
is represented by dashed oval in an ER Diagram. For example – Person age is a derived
attribute as it changes over time and can be derived from another attribute (Date of
birth).
3. Relationship
Cardinality: Defines the numerical attributes of the relationship between two entities or
entity sets.
When a single instance of an entity is associated with a single instance of another entity
then it is called one to one relationship. For example, a person has only one passport
and a passport is given to one person.
10
2. One to Many Relationship
When a single instance of an entity is associated with more than one instances of
another entity then it is called one to many relationship. For example – a customer can
place many orders but a order cannot be placed by many customers.
When more than one instances of an entity is associated with a single instance of
another entity then it is called many to one relationship. For example – many students
can study in a single college but a student cannot study in many
colleges at the same time.
When more than one instances of an entity is associated with more than one instances of
another entity then it is called many to many relationship. For example, a can be
assigned to many projects and a project can be assigned to
many students.
11
Total Participation of an Entity set
A Total participation of an entity set represents that each entity in entity set must have
at least one relationship in a relationship set. For example: In the below diagram each
college must have at-least one associated Student.
12
3.0 Steps to Create an ERD (E-R Digram)
Following are the steps to create an ERD.
13
Step 3) Cardinality Identification
For them problem statement we know that,
A student can be assigned multiple courses
A Professor can deliver only one course
14
For Course Entity, attributes could be Duration, Credits, Assignments, etc. For the sake
of ease we have considered just one attribute.
15
Step 5) Create the ERD
A more modern representation of ERD Diagram
Summary
The ER model is a high-level data model diagram
ER diagrams are a visual tool which is helpful to represent the ER model
Entity relationship diagram displays the relationships of entity set stored in a database
ER diagrams help you to define terms related to entity relationship modeling
ER model is based on three basic concepts: Entities, Attributes & Relationships
An entity can be place, person, object, event or a concept, which stores data
in the database
16
Relationship is nothing but an association among two or more entities
A weak entity is a type of entity which doesn't have its key attribute
It is a single-valued property of either an entity-type or a relationship-type
It helps you to defines the numerical attributes of the relationship
between two entities or entity sets
ER- Diagram is a visual representation of data that describe how
data is related to each other
While Drawing ER diagram you need to make sure all your entities
and relationships are properly labeled.
1
2 Textbook/Manual DBMS Database Management System 22319
17
7.0 Skill Developed
1. Teamwork
2. Communication skills
4. Problem-solving skills.
5. Creativity.
18
19