SlideShare a Scribd company logo
E-R MODEL
Entities
■ An entity is an object whose information is stored in the database. It is distinguishable from other
objects.
■ For example: specific person, company, event, plant.
■ In other words, any thing that may ‘have an independent existence and about which we intend to
collect data is known as Entity. It is also known as Entity type.
■ Entities are the principal data object about which information is to be collected. Entities are usually
recognizable concepts, either concrete or abstract, such as person, places, things, or events, which
have relevance to the database.
■ Some specific examples of entities are EMPLOYEES, PROJECTS, and INVOICES.An entity is
analogous to a table in the relational model. Entities are classified as independent or dependent (in
some methodologies, the terms used are strong and weak, respectively).
■ An independent entity is one that does not rely on another for identification.A dependent entity is
one that relies on another for identification.An entity occurrence (also called an instance) is an
individual occurrence of an entity. An occurrence is analogous to a row in the relational table.
Attributes
■ Attributes describe the properties of the entity of which they are associated.A particular instance of
an attribute is a value.
■ For example, “Ram” is one value of the attribute Name.The domain of an attribute is the collection
of all possible values an attribute can have.The domain of Name is a character string.
■ We can classify attributes as following types:
■ • Simple
■ • Composite
■ • Single-values
■ • Multi-values
■ • Derived
■ Simple Attribute:A simple attribute is an attribute composed of a single component with an
independent existence. Simple attributes cannot be further subdivided. Examples of simple
attributes include Sex,Age, and Salary etc. Simple attributes are sometimes called atomic
attributes.
■ Composite Attribute: An attribute composed of multiple components, each with an independent
existence is called a composite attribute. Some attributes can be further divided to yield smaller
components with an independent existence of their own.
■ For example, the Address attribute can be composed of components like Street number, Area, City,
Pin code and so on.The decision to model the Address, Area, and City etc. is dependent on whether
the user view of the model refers to the Address attribute as a single unit or as individual
components.
■ Single-valuedAttribute: A single-valued attribute is one that holds a single value for a single entity.
The majority of attributes are single-valued for a particular entity. For example, the Classroom entity
has as single value for the room_number attribute and therefore the room_number attribute is
referred to as being single-valued.
■ Multi-valuedAttribute: A multi-valued attribute is one that holds multiple values for a single
entity. Some attribute has multiple values for a particular entity. For example, a student entity can
have multiple values for the Hobby attribute-reading, music, movies and so on.A multi-valued
attribute may have set of numbers with upper and lower limits.
■ For example, the Hobby attribute of a Student may have between one and five values. In other
words, a student may have a minimum of one hobby and maximum of 5 hobbies.
■ DerivedAttribute: A derived attribute is one that represents a value that is derivable from the
value of a related attribute or set of attributes, not necessarily in the same entity. Some attributes
may be related for a particular entity.
■ For example the Age attribute can be derived from the date-of-birth attribute and therefore they
are related.We refer the age attribute as a derived attribute, the value of which is derived from
the date-of-birth attribute.
Diagrams of Attributes
Diagram of Multivalued and Derived
Attribute
■ MultivaluedAttribute
■ DerivedAttribute
Relationships
■ A Relationship represents an association between two or more entities. Relationships are classified in
terms of degree, connectivity, cardinality, and existence.
■ An example of a relationship would be: • Employees are assigned to projects • Projects have subtasks
• Departments manage one or more projects
■ Degree of a Relationship
■ The degree of a relationship is the number of entities associated with the relationship.The n-
ary relationship is the general form for degree n. Special cases are the binary, and ternary, where the
degree is 2, and 3, respectively. Binary relationships, the association between two entities are the
most common type in the real world.A recursive binary relationship occurs when an entity is related
to itself.
■ An example might be “some employees are married to other employees”. A ternary relationship
involves three entities and is used when a binary relationship is inadequate. Many modeling
approaches recognize only binary relationships.Ternary or n-ary relationships are decomposed into
two or more binary relationships.
Keys
■ A key is an attribute of a table which helps to identify a row.There can be many different types of
keys which are explained here.
■ Super Key or Candidate Key: It is such an attribute of a table that can uniquely identify a row in a
table. Generally they contain unique values and can never contain NULL values.There can be more
than one super key or candidate key in a table e.g. within a STUDENT table Roll and Mobile No. can
both serve to uniquely identify a student.
■ Primary Key: It is one of the candidate keys that are chosen to be the identifying key for the entire
table. E.g. although there are two candidate keys in the STUDENT table, the college would obviously
use Roll as the primary key of the table.
■ Alternate Key: This is the candidate key which is not chosen as the primary key of the table.They
are named so because although not the primary key, they can still identify a row.
■ Composite Key: Sometimes one key is not enough to uniquely identify a row. E.g. in a single class
Roll is enough to find a student, but in the entire school, merely searching by the Roll is not
enough, because there could be 10 classes in the school and each one of them may contain a
certain roll no 5.To uniquely identify the student we have to say something like “classVII, roll no 5”.
So, a combination of two or more attributes is combined to create a unique combination of values,
such as Class + Roll.
■ Foreign Key: Sometimes we may have to work with an attribute that does not have a primary key
of its own.To identify its rows, we have to use the primary attribute of a related table. Such a copy
of another related table’s primary key is called foreign key
■ Strong andWeak Entity Based on the concept of foreign key, there may arise a situation when we
have to relate an entity having a primary key of its own and an entity not having a primary key of
its own. In such a case, the entity having its own primary key is called a strong entity and the entity
not having its own primary key is called a weak entity.
■ Whenever we need to relate a strong and a weak entity together, the ERD would change just a
little. Say, for example, we have a statement “A Student lives in a Home.”
■ STUDENT is obviously a strong entity having a primary key Roll. But HOME may not have a unique
primary key, as its only attribute Address may be shared by many homes (what if it is a housing
estate?). HOME is a weak entity in this case.
■ The ERD of this statement would be like the following.As you can see, the weak entity itself and
the relationship linking a strong and weak entity must have double border.
How to Draw ER Diagrams
■ Below points show how to go about creating an ER diagram.
 Identify all the entities in the system. An entity should appear only once in a particular
diagram. Create rectangles for all entities and name them properly.
 Identify relationships between entities. Connect them using a line and add a diamond in the
middle describing the relationship.
 Add attributes for entities. Give meaningful attribute names so they can be understood easily.
E-R Diagram Symbols and their meaning
E-R model for employee table
Exercises
1. Construct an ER diagram for a car-insurance company whose customers own one
or more cars each. Each car has associated with it zero to any number of recorded
accidents.
2. Construct an ER diagram for a hospital with a set of patients and a set of doctors.
Associate with each patient a log of the various tests and examinations conducted.
3. Construct an ER diagram of the library system in your college.
Librarian
password
Issue
4. Construct an ER diagram to maintain data about students, instructors, semester,
and courses in a college.
5. Construct an ERD to record the marks that students get in different exams of
different course offerings.

More Related Content

What's hot

Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
Shakila Mahjabin
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
Vraj Patel
 
Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)
Mudasir Qazi
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
sadique_ghitm
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
Chirag vasava
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbmsNaresh Kumar
 
ER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMSER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMS
ssuser20b618
 
Data modeling using the entity relationship model
Data modeling using the entity relationship modelData modeling using the entity relationship model
Data modeling using the entity relationship modelJafar Nesargi
 
EER modeling
EER modelingEER modeling
EER modeling
Dabbal Singh Mahara
 
Types Of Keys in DBMS
Types Of Keys in DBMSTypes Of Keys in DBMS
Types Of Keys in DBMS
PadamNepal1
 
Data Models
Data ModelsData Models
Data Models
RituBhargava7
 
Enhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) ModelingEnhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) Modeling
sontumax
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPT
Trinath
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
madhav bansal
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)tameemyousaf
 
ER model
ER modelER model
ER model
ShilpaDe
 
12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMSkoolkampus
 

What's hot (20)

Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
 
Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
 
Entity relationship modelling
Entity relationship modellingEntity relationship modelling
Entity relationship modelling
 
Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: Normalisation
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbms
 
ER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMSER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMS
 
Data modeling using the entity relationship model
Data modeling using the entity relationship modelData modeling using the entity relationship model
Data modeling using the entity relationship model
 
EER modeling
EER modelingEER modeling
EER modeling
 
Types Of Keys in DBMS
Types Of Keys in DBMSTypes Of Keys in DBMS
Types Of Keys in DBMS
 
Data Models
Data ModelsData Models
Data Models
 
Enhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) ModelingEnhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) Modeling
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPT
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
DBMS Keys
DBMS KeysDBMS Keys
DBMS Keys
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)
 
ER model
ER modelER model
ER model
 
12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS
 

Similar to Er diagram

Data Models.pptx
Data Models.pptxData Models.pptx
Data Models.pptx
CheriviralaNikhil
 
Day 1 SQL.pptx
Day 1 SQL.pptxDay 1 SQL.pptx
Day 1 SQL.pptx
raghuKatagall1
 
SQL.pptx
SQL.pptxSQL.pptx
SQL.pptx
raghuKatagall1
 
E_R-Diagram (2).pptx
E_R-Diagram (2).pptxE_R-Diagram (2).pptx
E_R-Diagram (2).pptx
sandeep54552
 
er-models.pptx
er-models.pptxer-models.pptx
er-models.pptx
UmmerFarooq24
 
ERD(2).ppt
ERD(2).pptERD(2).ppt
ERD(2).ppt
Vijaykumar311275
 
Unit iv dbms
Unit   iv dbmsUnit   iv dbms
Unit iv dbms
Arnav Chowdhury
 
RDBMS ER (Entity Relationship) Diagram.pptx
RDBMS ER (Entity Relationship) Diagram.pptxRDBMS ER (Entity Relationship) Diagram.pptx
RDBMS ER (Entity Relationship) Diagram.pptx
premak23
 
Jobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptxJobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptx
prosofts1
 
Entityrelationshipmodel
EntityrelationshipmodelEntityrelationshipmodel
Entityrelationshipmodel
Enes Bolfidan
 
ER-Diagram.pptx
ER-Diagram.pptxER-Diagram.pptx
ER-Diagram.pptx
SherinRappai1
 
E - R Models.pptx SQL and plsql database
E - R Models.pptx SQL and plsql databaseE - R Models.pptx SQL and plsql database
E - R Models.pptx SQL and plsql database
ironman82715
 
rdbmsdol.pptx
rdbmsdol.pptxrdbmsdol.pptx
rdbmsdol.pptx
Dolchandra
 
rdbmsdol.pptx
rdbmsdol.pptxrdbmsdol.pptx
rdbmsdol.pptx
Dolchandra
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship ModelSlideshare
 
Database part3-
Database part3-Database part3-
Database part3-
Taymoor Nazmy
 
ER diagram
ER diagramER diagram
ER diagram
Amrit Kaur
 
Data Models
Data ModelsData Models
Data Models
Megha Sharma
 
Entity Relationship Diagram – ER Diagram in DBMS.pptx
Entity Relationship Diagram – ER Diagram in DBMS.pptxEntity Relationship Diagram – ER Diagram in DBMS.pptx
Entity Relationship Diagram – ER Diagram in DBMS.pptx
sukrithlal008
 

Similar to Er diagram (20)

Data Models.pptx
Data Models.pptxData Models.pptx
Data Models.pptx
 
Day 1 SQL.pptx
Day 1 SQL.pptxDay 1 SQL.pptx
Day 1 SQL.pptx
 
SQL.pptx
SQL.pptxSQL.pptx
SQL.pptx
 
E_R-Diagram (2).pptx
E_R-Diagram (2).pptxE_R-Diagram (2).pptx
E_R-Diagram (2).pptx
 
er-models.pptx
er-models.pptxer-models.pptx
er-models.pptx
 
ERD(2).ppt
ERD(2).pptERD(2).ppt
ERD(2).ppt
 
Unit iv dbms
Unit   iv dbmsUnit   iv dbms
Unit iv dbms
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
RDBMS ER (Entity Relationship) Diagram.pptx
RDBMS ER (Entity Relationship) Diagram.pptxRDBMS ER (Entity Relationship) Diagram.pptx
RDBMS ER (Entity Relationship) Diagram.pptx
 
Jobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptxJobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptx
 
Entityrelationshipmodel
EntityrelationshipmodelEntityrelationshipmodel
Entityrelationshipmodel
 
ER-Diagram.pptx
ER-Diagram.pptxER-Diagram.pptx
ER-Diagram.pptx
 
E - R Models.pptx SQL and plsql database
E - R Models.pptx SQL and plsql databaseE - R Models.pptx SQL and plsql database
E - R Models.pptx SQL and plsql database
 
rdbmsdol.pptx
rdbmsdol.pptxrdbmsdol.pptx
rdbmsdol.pptx
 
rdbmsdol.pptx
rdbmsdol.pptxrdbmsdol.pptx
rdbmsdol.pptx
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
Database part3-
Database part3-Database part3-
Database part3-
 
ER diagram
ER diagramER diagram
ER diagram
 
Data Models
Data ModelsData Models
Data Models
 
Entity Relationship Diagram – ER Diagram in DBMS.pptx
Entity Relationship Diagram – ER Diagram in DBMS.pptxEntity Relationship Diagram – ER Diagram in DBMS.pptx
Entity Relationship Diagram – ER Diagram in DBMS.pptx
 

More from Sabana Maharjan

All in one mis
All in one misAll in one mis
All in one mis
Sabana Maharjan
 
All in one mis
All in one misAll in one mis
All in one mis
Sabana Maharjan
 
M commerce
M commerceM commerce
M commerce
Sabana Maharjan
 
E marketing
E marketingE marketing
E marketing
Sabana Maharjan
 
Onlineshhopping final
Onlineshhopping finalOnlineshhopping final
Onlineshhopping final
Sabana Maharjan
 
Online shopping presentation
Online shopping presentationOnline shopping presentation
Online shopping presentation
Sabana Maharjan
 
Erlonggg
ErlongggErlonggg
Erlonggg
Sabana Maharjan
 
Er long
Er longEr long
Relational model
Relational modelRelational model
Relational model
Sabana Maharjan
 
Introduction to structured query language (sql)
Introduction to structured query language (sql)Introduction to structured query language (sql)
Introduction to structured query language (sql)
Sabana Maharjan
 
Good food for better life
Good food for better lifeGood food for better life
Good food for better life
Sabana Maharjan
 
Do not think about any consequences just travel around nepal
Do not think about any consequences just travel around nepalDo not think about any consequences just travel around nepal
Do not think about any consequences just travel around nepal
Sabana Maharjan
 
5 best place to watch sunrise and sunset naturally
5 best place to watch sunrise and sunset naturally5 best place to watch sunrise and sunset naturally
5 best place to watch sunrise and sunset naturally
Sabana Maharjan
 
Newari food
Newari foodNewari food
Newari food
Sabana Maharjan
 
This is indeed a life time experience
This is indeed a life time experienceThis is indeed a life time experience
This is indeed a life time experience
Sabana Maharjan
 
File tracking system
File tracking systemFile tracking system
File tracking system
Sabana Maharjan
 
MIS enterprise system for collaboration
MIS enterprise system for collaborationMIS enterprise system for collaboration
MIS enterprise system for collaboration
Sabana Maharjan
 
Mis presentation
Mis presentationMis presentation
Mis presentation
Sabana Maharjan
 
Chapter9
Chapter9Chapter9
Chapter9
Sabana Maharjan
 
Chapter8
Chapter8Chapter8
Chapter8
Sabana Maharjan
 

More from Sabana Maharjan (20)

All in one mis
All in one misAll in one mis
All in one mis
 
All in one mis
All in one misAll in one mis
All in one mis
 
M commerce
M commerceM commerce
M commerce
 
E marketing
E marketingE marketing
E marketing
 
Onlineshhopping final
Onlineshhopping finalOnlineshhopping final
Onlineshhopping final
 
Online shopping presentation
Online shopping presentationOnline shopping presentation
Online shopping presentation
 
Erlonggg
ErlongggErlonggg
Erlonggg
 
Er long
Er longEr long
Er long
 
Relational model
Relational modelRelational model
Relational model
 
Introduction to structured query language (sql)
Introduction to structured query language (sql)Introduction to structured query language (sql)
Introduction to structured query language (sql)
 
Good food for better life
Good food for better lifeGood food for better life
Good food for better life
 
Do not think about any consequences just travel around nepal
Do not think about any consequences just travel around nepalDo not think about any consequences just travel around nepal
Do not think about any consequences just travel around nepal
 
5 best place to watch sunrise and sunset naturally
5 best place to watch sunrise and sunset naturally5 best place to watch sunrise and sunset naturally
5 best place to watch sunrise and sunset naturally
 
Newari food
Newari foodNewari food
Newari food
 
This is indeed a life time experience
This is indeed a life time experienceThis is indeed a life time experience
This is indeed a life time experience
 
File tracking system
File tracking systemFile tracking system
File tracking system
 
MIS enterprise system for collaboration
MIS enterprise system for collaborationMIS enterprise system for collaboration
MIS enterprise system for collaboration
 
Mis presentation
Mis presentationMis presentation
Mis presentation
 
Chapter9
Chapter9Chapter9
Chapter9
 
Chapter8
Chapter8Chapter8
Chapter8
 

Recently uploaded

Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Subhajit Sahu
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
NABLAS株式会社
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
ewymefz
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Linda486226
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
pchutichetpong
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
slg6lamcq
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
ewymefz
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Boston Institute of Analytics
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
vcaxypu
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
MaleehaSheikh2
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
enxupq
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
Tiktokethiodaily
 
SOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape ReportSOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape Report
SOCRadar
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
yhkoc
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
haila53
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
benishzehra469
 

Recently uploaded (20)

Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
 
SOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape ReportSOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape Report
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
 

Er diagram

  • 2. Entities ■ An entity is an object whose information is stored in the database. It is distinguishable from other objects. ■ For example: specific person, company, event, plant. ■ In other words, any thing that may ‘have an independent existence and about which we intend to collect data is known as Entity. It is also known as Entity type. ■ Entities are the principal data object about which information is to be collected. Entities are usually recognizable concepts, either concrete or abstract, such as person, places, things, or events, which have relevance to the database. ■ Some specific examples of entities are EMPLOYEES, PROJECTS, and INVOICES.An entity is analogous to a table in the relational model. Entities are classified as independent or dependent (in some methodologies, the terms used are strong and weak, respectively). ■ An independent entity is one that does not rely on another for identification.A dependent entity is one that relies on another for identification.An entity occurrence (also called an instance) is an individual occurrence of an entity. An occurrence is analogous to a row in the relational table.
  • 3. Attributes ■ Attributes describe the properties of the entity of which they are associated.A particular instance of an attribute is a value. ■ For example, “Ram” is one value of the attribute Name.The domain of an attribute is the collection of all possible values an attribute can have.The domain of Name is a character string. ■ We can classify attributes as following types: ■ • Simple ■ • Composite ■ • Single-values ■ • Multi-values ■ • Derived
  • 4. ■ Simple Attribute:A simple attribute is an attribute composed of a single component with an independent existence. Simple attributes cannot be further subdivided. Examples of simple attributes include Sex,Age, and Salary etc. Simple attributes are sometimes called atomic attributes. ■ Composite Attribute: An attribute composed of multiple components, each with an independent existence is called a composite attribute. Some attributes can be further divided to yield smaller components with an independent existence of their own. ■ For example, the Address attribute can be composed of components like Street number, Area, City, Pin code and so on.The decision to model the Address, Area, and City etc. is dependent on whether the user view of the model refers to the Address attribute as a single unit or as individual components. ■ Single-valuedAttribute: A single-valued attribute is one that holds a single value for a single entity. The majority of attributes are single-valued for a particular entity. For example, the Classroom entity has as single value for the room_number attribute and therefore the room_number attribute is referred to as being single-valued.
  • 5. ■ Multi-valuedAttribute: A multi-valued attribute is one that holds multiple values for a single entity. Some attribute has multiple values for a particular entity. For example, a student entity can have multiple values for the Hobby attribute-reading, music, movies and so on.A multi-valued attribute may have set of numbers with upper and lower limits. ■ For example, the Hobby attribute of a Student may have between one and five values. In other words, a student may have a minimum of one hobby and maximum of 5 hobbies. ■ DerivedAttribute: A derived attribute is one that represents a value that is derivable from the value of a related attribute or set of attributes, not necessarily in the same entity. Some attributes may be related for a particular entity. ■ For example the Age attribute can be derived from the date-of-birth attribute and therefore they are related.We refer the age attribute as a derived attribute, the value of which is derived from the date-of-birth attribute.
  • 7. Diagram of Multivalued and Derived Attribute ■ MultivaluedAttribute ■ DerivedAttribute
  • 8. Relationships ■ A Relationship represents an association between two or more entities. Relationships are classified in terms of degree, connectivity, cardinality, and existence. ■ An example of a relationship would be: • Employees are assigned to projects • Projects have subtasks • Departments manage one or more projects ■ Degree of a Relationship ■ The degree of a relationship is the number of entities associated with the relationship.The n- ary relationship is the general form for degree n. Special cases are the binary, and ternary, where the degree is 2, and 3, respectively. Binary relationships, the association between two entities are the most common type in the real world.A recursive binary relationship occurs when an entity is related to itself. ■ An example might be “some employees are married to other employees”. A ternary relationship involves three entities and is used when a binary relationship is inadequate. Many modeling approaches recognize only binary relationships.Ternary or n-ary relationships are decomposed into two or more binary relationships.
  • 9. Keys ■ A key is an attribute of a table which helps to identify a row.There can be many different types of keys which are explained here. ■ Super Key or Candidate Key: It is such an attribute of a table that can uniquely identify a row in a table. Generally they contain unique values and can never contain NULL values.There can be more than one super key or candidate key in a table e.g. within a STUDENT table Roll and Mobile No. can both serve to uniquely identify a student. ■ Primary Key: It is one of the candidate keys that are chosen to be the identifying key for the entire table. E.g. although there are two candidate keys in the STUDENT table, the college would obviously use Roll as the primary key of the table.
  • 10. ■ Alternate Key: This is the candidate key which is not chosen as the primary key of the table.They are named so because although not the primary key, they can still identify a row. ■ Composite Key: Sometimes one key is not enough to uniquely identify a row. E.g. in a single class Roll is enough to find a student, but in the entire school, merely searching by the Roll is not enough, because there could be 10 classes in the school and each one of them may contain a certain roll no 5.To uniquely identify the student we have to say something like “classVII, roll no 5”. So, a combination of two or more attributes is combined to create a unique combination of values, such as Class + Roll. ■ Foreign Key: Sometimes we may have to work with an attribute that does not have a primary key of its own.To identify its rows, we have to use the primary attribute of a related table. Such a copy of another related table’s primary key is called foreign key
  • 11. ■ Strong andWeak Entity Based on the concept of foreign key, there may arise a situation when we have to relate an entity having a primary key of its own and an entity not having a primary key of its own. In such a case, the entity having its own primary key is called a strong entity and the entity not having its own primary key is called a weak entity. ■ Whenever we need to relate a strong and a weak entity together, the ERD would change just a little. Say, for example, we have a statement “A Student lives in a Home.” ■ STUDENT is obviously a strong entity having a primary key Roll. But HOME may not have a unique primary key, as its only attribute Address may be shared by many homes (what if it is a housing estate?). HOME is a weak entity in this case. ■ The ERD of this statement would be like the following.As you can see, the weak entity itself and the relationship linking a strong and weak entity must have double border.
  • 12. How to Draw ER Diagrams ■ Below points show how to go about creating an ER diagram.  Identify all the entities in the system. An entity should appear only once in a particular diagram. Create rectangles for all entities and name them properly.  Identify relationships between entities. Connect them using a line and add a diamond in the middle describing the relationship.  Add attributes for entities. Give meaningful attribute names so they can be understood easily.
  • 13. E-R Diagram Symbols and their meaning
  • 14.
  • 15. E-R model for employee table
  • 16.
  • 17.
  • 18.
  • 20. 1. Construct an ER diagram for a car-insurance company whose customers own one or more cars each. Each car has associated with it zero to any number of recorded accidents.
  • 21. 2. Construct an ER diagram for a hospital with a set of patients and a set of doctors. Associate with each patient a log of the various tests and examinations conducted.
  • 22. 3. Construct an ER diagram of the library system in your college. Librarian password Issue
  • 23. 4. Construct an ER diagram to maintain data about students, instructors, semester, and courses in a college.
  • 24. 5. Construct an ERD to record the marks that students get in different exams of different course offerings.