SlideShare a Scribd company logo
1 of 33
Data Modeling using the
Entity Relationship Model
Chapter 3
Contents
 High-level Conceptual Data Models for
Database design
 Example Database Application
 Entity types, Entity Sets, Attributes and keys
 Relationship types, relationship sets, Roles
and structural Constraints
 E-R Diagram, Naming Conventions and
Design Issues
Example Database Application
 The Company is a organized into
departments. Each Department has unique
name, a unique number and a particular
employee who manages the department. We
keep track of the start date when that
employee began managing the department. A
department has several locations.
 A department controls a number of projects,
each of which has a unique name , a unique
number and a single location.
 We store each employee’s name ,social
security number, address, salary, sex, and
birthdate. An employee is assigned one
department but may work on several projects,
which are not necessarily, controlled by the
same department. We keep track of the
number of hours per week that an employee
works on each project. We also keep track of
the direct supervisor of each employee.
We want to keep track of the
dependents of each employee for
insurance purposes. We keep each
dependent’s first name, sex, birth date,
and relationship to the employee.
Entity Types, Entity Sets, Attributes
and Keys
The basic object that the ER- Model
represents is an entity, which is a “thing”
in real-world with an independent
existence.
An Entity may be an object with physical
existence or may be an object with a
conceptual existence.
Entity Types, Entity Sets, Attributes
and Keys
Each Entity has attributes- the properties
that describe it.
There are several types of attributes
Simple versus Composite
Single valued versus Multivalued
Stored Versus Derived
Composite Versus Simple Attributes
Composite attributes can be divided into
smaller subparts, which represents more
basic attributes with independent
meaning.
For example: Address can be sub
divided into streetaddress, city,
state,country,zip.
Attributes that are not divisible are called
Simple or atomic attributes
Single Valued versus Multivalued
Attributes
Attributes that hold single value are
called single-valued attributes.
For example :age
Multivalued attributes hold more than
one value.
For example: car with two colors, or phone
no of a person
Attributes which are derived from some
other attributes are called as derived
attributes.
The attributes from which others
attributes are derived are called stored
attributes.
For ex: Age is derived from BirthDate, so
age is derived attribute and Birth Date is
stored attribute.
Stored versus Derived Attributes
Null Values
In some cases entity may not have an
applicable value for an attribute.
For Example: Fax Number or apartment
number.
For such attributes an special attribute
called null is created.
Null Means unknown .
Complex Attributes
The composition of composite and
multivalued attributes is called as
complex attributes.
Composite attributes are represented by
() paranthesis and multivalued attributes
{ }.
Entity Types, Entity Sets
A Database usually contains groups of
entities that are similar.
For Example, a company hiring
hundreds of employees may want to
store similar information
These entities share same attributes, but
have their own values for eac attributes.
Entity Type, Entity Sets
An Entity Type defines a collection of
entities that have same attributes.
The collection of all the entities of a
particular entity type in the database at
any point in time is called an entity set.
Entity type is represented as a
Rectangular box in ER Diagrams
enclosing entity type name.
Entity types , Entity Sets
Attributes names are enclosed in ovals
and are attached to their entity type by
straight lines.
Multivalued attributes are displayed in
double ovals.
Key attributes
 An Entity type has an attribute whose values
are distinct for each individual entity in the
entity set. Such attributes are called key
attributes.
 For example: Roll no in Student table.
 Sometimes several attributes together form a
key,meaning that combination of the attribute
will identify the entities in an entity set.
 Such an combination of attributes is called as
Composite attribute.
Value Sets(Domains) of Attributes
Each simple attribute in an entity set is
associated with an value se or domain ,
which specifies the set of values that it
may hold.
Value sets are typically specified using
the basic data types such as integer,
boolean, floating,enumeration,sub range
and so on.
Initial Conceptual Design of
Company Database
An entity type DEPARTMENT with
attributes Name, Number, Locations,
Manager, and ManagerStartDate.
Locations is only multivalued attribute.
We can specify both name and number
as key attributes.
Initial Conceptual Design of
Company Database
An entity type PROJECT with attributes
Name, Number, Location,and
ControllingDepartment.
Both Name and Number are key
attributes.
Initial Conceptual Design of
Company Database
An Entity EMPLOYEE with attributes
Name, SSN,Sex, Address, Salary,
BirthDate, Department, and Supervisor.
Both Name and address may be
composite attributes; however this was
not specified in requirements.
Initial Conceptual Design of
Company Database
An Entity type DEPENDENT with
attributes Employee, DependentName,
Sex, BirthDate and Relationship(to the
employee)
Relationship types, Relations Sets
and Structural Constraints
Degree of a relationship type: The
degree of a relationship type is the
number of participating entity types.
For Example: WORKSFOR relationship
is of degree two.
A relationship type of degree two is
called binary.
A relationship type of degree three is
called ternary.
Relationship as Attributes
It is sometimes convenient to think of a
relationship type in terms of attributes.
ManagerStartDate is an attribute which
is necessary for both Employee and
Department.
Role Names
The role name signifies the role that a
participating entity from the entity type
plays in each relationship instance and
helps to explain what the relationship
means.
For example: In WORKS_FOR
relationship type, EMPLOYEE plays the
role of employee and DEPARTMENT
plays a role of employer
Recursive Relationships
In Some cases the same entity type
participates in a relationship type in
different roles.
Such relationships are called Recursive
Relationships.
For such relationships the role name
becomes essential for distinguishing the
meaning of each participation.
Constraints of Relationship Types
Cardinality Ratios for Binary Relationship
The cardinality ratio for a binary relationship
specifies the maximum number of
relationship instances that an entity can
participate in.
For Example: Works _For Relationship is
between EMPLOYEE and DEPARTMENT
Its Cardinality ratio is 1:N
Possible Cardinality ratios for binary
relationships are 1:1,1:N,N:1,and M:N.
Participation Constraint
Specifies whether the existance of an
entity depends on its being related to
another entity via the relationship type.
There are 2 possible participation
constraints
Total
Partial
Weak Entity Types
 Entity types that do not have key attributes of
their own are called weak entity types.
 In contrast regular entity types that do have
key attributes are called strong entity types.
 Entities belonging to a weak entity type is are
identified by strong entity types and the
relation ship is called identifying relationship
ER Diagram Naming Conventions
ER Diagram Naming Conventions
E-R Diagram For Company Schema
Proper Naming of Schema
Constructs
Use Singular Names for Entity Types
rather than plurals because entity type
applies to each individual entity.
Entity Type names and relationship
types are written in uppercase.
Attribute names are capitilized
Role names are in lower case.

More Related Content

What's hot

Enhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) ModelingEnhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) Modelingsontumax
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramShakila Mahjabin
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to databasePradnya Saval
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramRakhi Mukherji
 
Integrity constraints in dbms
Integrity constraints in dbmsIntegrity constraints in dbms
Integrity constraints in dbmsVignesh Saravanan
 
The Relational Database Model
The Relational Database ModelThe Relational Database Model
The Relational Database ModelShishir Aryal
 
data modeling and models
data modeling and modelsdata modeling and models
data modeling and modelssabah N
 
Chapter-3 Data Modeling Using the Entity-Relationship Model
Chapter-3  Data Modeling Using the Entity-Relationship ModelChapter-3  Data Modeling Using the Entity-Relationship Model
Chapter-3 Data Modeling Using the Entity-Relationship ModelRaj vardhan
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship ModelSlideshare
 
Dbms 10: Conversion of ER model to Relational Model
Dbms 10: Conversion of ER model to Relational ModelDbms 10: Conversion of ER model to Relational Model
Dbms 10: Conversion of ER model to Relational ModelAmiya9439793168
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship ModellingBhandari Nawaraj
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity ConstraintsMegha yadav
 

What's hot (20)

DBMS PPT
DBMS PPTDBMS PPT
DBMS PPT
 
Enhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) ModelingEnhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) Modeling
 
Er diagram
Er diagramEr diagram
Er diagram
 
Er diagrams presentation
Er diagrams presentationEr diagrams presentation
Er diagrams presentation
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
 
Anomalies in database
Anomalies in databaseAnomalies in database
Anomalies in database
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
Integrity constraints in dbms
Integrity constraints in dbmsIntegrity constraints in dbms
Integrity constraints in dbms
 
Entities and attributes
Entities and attributesEntities and attributes
Entities and attributes
 
Files Vs DataBase
Files Vs DataBaseFiles Vs DataBase
Files Vs DataBase
 
The Relational Database Model
The Relational Database ModelThe Relational Database Model
The Relational Database Model
 
E r model
E r modelE r model
E r model
 
data modeling and models
data modeling and modelsdata modeling and models
data modeling and models
 
Chapter-3 Data Modeling Using the Entity-Relationship Model
Chapter-3  Data Modeling Using the Entity-Relationship ModelChapter-3  Data Modeling Using the Entity-Relationship Model
Chapter-3 Data Modeling Using the Entity-Relationship Model
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
Data model and entity relationship
Data model and entity relationshipData model and entity relationship
Data model and entity relationship
 
Dbms 10: Conversion of ER model to Relational Model
Dbms 10: Conversion of ER model to Relational ModelDbms 10: Conversion of ER model to Relational Model
Dbms 10: Conversion of ER model to Relational Model
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship Modelling
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 

Viewers also liked

3 data modeling using the entity-relationship (er) model
3 data modeling using the entity-relationship (er) model3 data modeling using the entity-relationship (er) model
3 data modeling using the entity-relationship (er) modelKumar
 
Entity Relationship Diagram2
Entity Relationship Diagram2Entity Relationship Diagram2
Entity Relationship Diagram2sadeenedian08
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPTTrinath
 
Data Modeling Using the EntityRelationship (ER) Model
Data Modeling Using the EntityRelationship (ER) ModelData Modeling Using the EntityRelationship (ER) Model
Data Modeling Using the EntityRelationship (ER) Modelsontumax
 
03 Ch3 Notes Revised
03 Ch3 Notes Revised03 Ch3 Notes Revised
03 Ch3 Notes Revisedguest6f408c
 
IT Certifications in Demand for 2012 | Best Certs to Get a Job
IT Certifications in Demand for 2012 | Best Certs to Get a JobIT Certifications in Demand for 2012 | Best Certs to Get a Job
IT Certifications in Demand for 2012 | Best Certs to Get a JobITCareerFinder
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)tameemyousaf
 
Data flow diagram
Data flow diagram Data flow diagram
Data flow diagram Nidhi Sharma
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)tameemyousaf
 
Database system concepts and architecture
Database system concepts and architectureDatabase system concepts and architecture
Database system concepts and architectureJafar Nesargi
 
Dbms lab 01 termwork1
Dbms lab 01 termwork1Dbms lab 01 termwork1
Dbms lab 01 termwork1Jafar Nesargi
 
A method for filtering large conceptual schemas
A method for filtering large conceptual schemasA method for filtering large conceptual schemas
A method for filtering large conceptual schemasAntonio Villegas
 
Delegation, Decentralization and centrlization
Delegation, Decentralization and centrlizationDelegation, Decentralization and centrlization
Delegation, Decentralization and centrlizationKhushbu Malara
 
Conceptual Modeling of Data
Conceptual Modeling of DataConceptual Modeling of Data
Conceptual Modeling of DataM.Zalmai Rahmani
 
Entity Relationship diagrams - ER diagrams
Entity Relationship diagrams - ER diagramsEntity Relationship diagrams - ER diagrams
Entity Relationship diagrams - ER diagramsmbedlabs Technosolutions
 
Computer basics Intro
Computer basics IntroComputer basics Intro
Computer basics IntroJafar Nesargi
 
The Data Cleansing Process - A Roadmap to Material Master Data Quality
The Data Cleansing Process - A Roadmap to Material Master Data QualityThe Data Cleansing Process - A Roadmap to Material Master Data Quality
The Data Cleansing Process - A Roadmap to Material Master Data QualityI.M.A. Ltd.
 

Viewers also liked (20)

3 data modeling using the entity-relationship (er) model
3 data modeling using the entity-relationship (er) model3 data modeling using the entity-relationship (er) model
3 data modeling using the entity-relationship (er) model
 
Entity Relationship Diagram2
Entity Relationship Diagram2Entity Relationship Diagram2
Entity Relationship Diagram2
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPT
 
Data Modeling Using the EntityRelationship (ER) Model
Data Modeling Using the EntityRelationship (ER) ModelData Modeling Using the EntityRelationship (ER) Model
Data Modeling Using the EntityRelationship (ER) Model
 
03 Ch3 Notes Revised
03 Ch3 Notes Revised03 Ch3 Notes Revised
03 Ch3 Notes Revised
 
IT Certifications in Demand for 2012 | Best Certs to Get a Job
IT Certifications in Demand for 2012 | Best Certs to Get a JobIT Certifications in Demand for 2012 | Best Certs to Get a Job
IT Certifications in Demand for 2012 | Best Certs to Get a Job
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)
 
Data flow diagram
Data flow diagram Data flow diagram
Data flow diagram
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)
 
Database system concepts and architecture
Database system concepts and architectureDatabase system concepts and architecture
Database system concepts and architecture
 
Dbms lab 01 termwork1
Dbms lab 01 termwork1Dbms lab 01 termwork1
Dbms lab 01 termwork1
 
A method for filtering large conceptual schemas
A method for filtering large conceptual schemasA method for filtering large conceptual schemas
A method for filtering large conceptual schemas
 
E r model
E r modelE r model
E r model
 
Delegation, Decentralization and centrlization
Delegation, Decentralization and centrlizationDelegation, Decentralization and centrlization
Delegation, Decentralization and centrlization
 
Conceptual Modeling of Data
Conceptual Modeling of DataConceptual Modeling of Data
Conceptual Modeling of Data
 
Entity Relationship diagrams - ER diagrams
Entity Relationship diagrams - ER diagramsEntity Relationship diagrams - ER diagrams
Entity Relationship diagrams - ER diagrams
 
Computer basics Intro
Computer basics IntroComputer basics Intro
Computer basics Intro
 
The Data Cleansing Process - A Roadmap to Material Master Data Quality
The Data Cleansing Process - A Roadmap to Material Master Data QualityThe Data Cleansing Process - A Roadmap to Material Master Data Quality
The Data Cleansing Process - A Roadmap to Material Master Data Quality
 
UAE Police & Military Hostile Environs Security Training Project V
UAE Police & Military Hostile Environs Security Training Project VUAE Police & Military Hostile Environs Security Training Project V
UAE Police & Military Hostile Environs Security Training Project V
 
File Sever
File SeverFile Sever
File Sever
 

Similar to Data modeling using the entity relationship model

Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...Mustafa Kamel Mohammadi
 
Jobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptxJobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptxprosofts1
 
ERD with complete knowledge
ERD with complete knowledgeERD with complete knowledge
ERD with complete knowledgeAsma Rasool
 
3. Chapter Three.pdf
3. Chapter Three.pdf3. Chapter Three.pdf
3. Chapter Three.pdffikadumola
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship ModelA. S. M. Shafi
 
Basic concepts of Data and Databases
Basic concepts of Data and Databases Basic concepts of Data and Databases
Basic concepts of Data and Databases Tharindu Weerasinghe
 
ECEG 4702-Class7-Entity-Relationship modeling.pptx
ECEG 4702-Class7-Entity-Relationship modeling.pptxECEG 4702-Class7-Entity-Relationship modeling.pptx
ECEG 4702-Class7-Entity-Relationship modeling.pptxmiftah88
 
DBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptxDBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptxparimala123
 
Chapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxChapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxsantosh96234
 
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.pptxsukrithlal008
 
Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------keishaangelina2
 
Free video lectures for mca
Free video lectures for mcaFree video lectures for mca
Free video lectures for mcaEdhole.com
 

Similar to Data modeling using the entity relationship model (20)

Chapter3
Chapter3Chapter3
Chapter3
 
Chapter3
Chapter3Chapter3
Chapter3
 
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
 
Jobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptxJobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptx
 
27 fcs157al3
27 fcs157al327 fcs157al3
27 fcs157al3
 
ERD with complete knowledge
ERD with complete knowledgeERD with complete knowledge
ERD with complete knowledge
 
3. Chapter Three.pdf
3. Chapter Three.pdf3. Chapter Three.pdf
3. Chapter Three.pdf
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
Basic concepts of Data and Databases
Basic concepts of Data and Databases Basic concepts of Data and Databases
Basic concepts of Data and Databases
 
02er
02er02er
02er
 
database1
database1database1
database1
 
ECEG 4702-Class7-Entity-Relationship modeling.pptx
ECEG 4702-Class7-Entity-Relationship modeling.pptxECEG 4702-Class7-Entity-Relationship modeling.pptx
ECEG 4702-Class7-Entity-Relationship modeling.pptx
 
DBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptxDBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptx
 
Chapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxChapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptx
 
E R Model details.ppt
E R Model details.pptE R Model details.ppt
E R Model details.ppt
 
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
 
Unit02 dbms
Unit02 dbmsUnit02 dbms
Unit02 dbms
 
Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------
 
Unit 3 final.pptx
Unit 3 final.pptxUnit 3 final.pptx
Unit 3 final.pptx
 
Free video lectures for mca
Free video lectures for mcaFree video lectures for mca
Free video lectures for mca
 

More from Jafar Nesargi

Network adpater,cabel,cards ,types, network devices
Network adpater,cabel,cards ,types, network devicesNetwork adpater,cabel,cards ,types, network devices
Network adpater,cabel,cards ,types, network devicesJafar Nesargi
 
An introduction to networking
An introduction to networkingAn introduction to networking
An introduction to networkingJafar Nesargi
 
Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database languageJafar Nesargi
 
Chapter 6 relational data model and relational
Chapter  6  relational data model and relationalChapter  6  relational data model and relational
Chapter 6 relational data model and relationalJafar Nesargi
 
Chapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organizationChapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organizationJafar Nesargi
 
Introduction to-oracle
Introduction to-oracleIntroduction to-oracle
Introduction to-oracleJafar Nesargi
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheetsJafar Nesargi
 
Session1 gateway to web page development
Session1   gateway to web page developmentSession1   gateway to web page development
Session1 gateway to web page developmentJafar Nesargi
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jspJafar Nesargi
 
Record storage and primary file organization
Record storage and primary file organizationRecord storage and primary file organization
Record storage and primary file organizationJafar Nesargi
 
Introduction to-oracle
Introduction to-oracleIntroduction to-oracle
Introduction to-oracleJafar Nesargi
 
Relational database language
Relational database languageRelational database language
Relational database languageJafar Nesargi
 

More from Jafar Nesargi (20)

Network adpater,cabel,cards ,types, network devices
Network adpater,cabel,cards ,types, network devicesNetwork adpater,cabel,cards ,types, network devices
Network adpater,cabel,cards ,types, network devices
 
An introduction to networking
An introduction to networkingAn introduction to networking
An introduction to networking
 
Css
CssCss
Css
 
Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database language
 
Chapter 6 relational data model and relational
Chapter  6  relational data model and relationalChapter  6  relational data model and relational
Chapter 6 relational data model and relational
 
Chapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organizationChapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organization
 
Introduction to-oracle
Introduction to-oracleIntroduction to-oracle
Introduction to-oracle
 
Chapter2
Chapter2Chapter2
Chapter2
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Session1 gateway to web page development
Session1   gateway to web page developmentSession1   gateway to web page development
Session1 gateway to web page development
 
Introduction to jsp
Introduction to jspIntroduction to jsp
Introduction to jsp
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
 
Rmi
RmiRmi
Rmi
 
Java bean
Java beanJava bean
Java bean
 
Networking
NetworkingNetworking
Networking
 
Chapter2 j2ee
Chapter2 j2eeChapter2 j2ee
Chapter2 j2ee
 
Chapter 1 swings
Chapter 1 swingsChapter 1 swings
Chapter 1 swings
 
Record storage and primary file organization
Record storage and primary file organizationRecord storage and primary file organization
Record storage and primary file organization
 
Introduction to-oracle
Introduction to-oracleIntroduction to-oracle
Introduction to-oracle
 
Relational database language
Relational database languageRelational database language
Relational database language
 

Recently uploaded

This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 

Recently uploaded (20)

This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 

Data modeling using the entity relationship model

  • 1. Data Modeling using the Entity Relationship Model Chapter 3
  • 2. Contents  High-level Conceptual Data Models for Database design  Example Database Application  Entity types, Entity Sets, Attributes and keys  Relationship types, relationship sets, Roles and structural Constraints  E-R Diagram, Naming Conventions and Design Issues
  • 3.
  • 4. Example Database Application  The Company is a organized into departments. Each Department has unique name, a unique number and a particular employee who manages the department. We keep track of the start date when that employee began managing the department. A department has several locations.  A department controls a number of projects, each of which has a unique name , a unique number and a single location.
  • 5.  We store each employee’s name ,social security number, address, salary, sex, and birthdate. An employee is assigned one department but may work on several projects, which are not necessarily, controlled by the same department. We keep track of the number of hours per week that an employee works on each project. We also keep track of the direct supervisor of each employee.
  • 6. We want to keep track of the dependents of each employee for insurance purposes. We keep each dependent’s first name, sex, birth date, and relationship to the employee.
  • 7. Entity Types, Entity Sets, Attributes and Keys The basic object that the ER- Model represents is an entity, which is a “thing” in real-world with an independent existence. An Entity may be an object with physical existence or may be an object with a conceptual existence.
  • 8. Entity Types, Entity Sets, Attributes and Keys Each Entity has attributes- the properties that describe it. There are several types of attributes Simple versus Composite Single valued versus Multivalued Stored Versus Derived
  • 9. Composite Versus Simple Attributes Composite attributes can be divided into smaller subparts, which represents more basic attributes with independent meaning. For example: Address can be sub divided into streetaddress, city, state,country,zip. Attributes that are not divisible are called Simple or atomic attributes
  • 10. Single Valued versus Multivalued Attributes Attributes that hold single value are called single-valued attributes. For example :age Multivalued attributes hold more than one value. For example: car with two colors, or phone no of a person
  • 11. Attributes which are derived from some other attributes are called as derived attributes. The attributes from which others attributes are derived are called stored attributes. For ex: Age is derived from BirthDate, so age is derived attribute and Birth Date is stored attribute. Stored versus Derived Attributes
  • 12. Null Values In some cases entity may not have an applicable value for an attribute. For Example: Fax Number or apartment number. For such attributes an special attribute called null is created. Null Means unknown .
  • 13. Complex Attributes The composition of composite and multivalued attributes is called as complex attributes. Composite attributes are represented by () paranthesis and multivalued attributes { }.
  • 14. Entity Types, Entity Sets A Database usually contains groups of entities that are similar. For Example, a company hiring hundreds of employees may want to store similar information These entities share same attributes, but have their own values for eac attributes.
  • 15. Entity Type, Entity Sets An Entity Type defines a collection of entities that have same attributes. The collection of all the entities of a particular entity type in the database at any point in time is called an entity set. Entity type is represented as a Rectangular box in ER Diagrams enclosing entity type name.
  • 16. Entity types , Entity Sets Attributes names are enclosed in ovals and are attached to their entity type by straight lines. Multivalued attributes are displayed in double ovals.
  • 17. Key attributes  An Entity type has an attribute whose values are distinct for each individual entity in the entity set. Such attributes are called key attributes.  For example: Roll no in Student table.  Sometimes several attributes together form a key,meaning that combination of the attribute will identify the entities in an entity set.  Such an combination of attributes is called as Composite attribute.
  • 18. Value Sets(Domains) of Attributes Each simple attribute in an entity set is associated with an value se or domain , which specifies the set of values that it may hold. Value sets are typically specified using the basic data types such as integer, boolean, floating,enumeration,sub range and so on.
  • 19. Initial Conceptual Design of Company Database An entity type DEPARTMENT with attributes Name, Number, Locations, Manager, and ManagerStartDate. Locations is only multivalued attribute. We can specify both name and number as key attributes.
  • 20. Initial Conceptual Design of Company Database An entity type PROJECT with attributes Name, Number, Location,and ControllingDepartment. Both Name and Number are key attributes.
  • 21. Initial Conceptual Design of Company Database An Entity EMPLOYEE with attributes Name, SSN,Sex, Address, Salary, BirthDate, Department, and Supervisor. Both Name and address may be composite attributes; however this was not specified in requirements.
  • 22. Initial Conceptual Design of Company Database An Entity type DEPENDENT with attributes Employee, DependentName, Sex, BirthDate and Relationship(to the employee)
  • 23. Relationship types, Relations Sets and Structural Constraints Degree of a relationship type: The degree of a relationship type is the number of participating entity types. For Example: WORKSFOR relationship is of degree two. A relationship type of degree two is called binary. A relationship type of degree three is called ternary.
  • 24. Relationship as Attributes It is sometimes convenient to think of a relationship type in terms of attributes. ManagerStartDate is an attribute which is necessary for both Employee and Department.
  • 25. Role Names The role name signifies the role that a participating entity from the entity type plays in each relationship instance and helps to explain what the relationship means. For example: In WORKS_FOR relationship type, EMPLOYEE plays the role of employee and DEPARTMENT plays a role of employer
  • 26. Recursive Relationships In Some cases the same entity type participates in a relationship type in different roles. Such relationships are called Recursive Relationships. For such relationships the role name becomes essential for distinguishing the meaning of each participation.
  • 27. Constraints of Relationship Types Cardinality Ratios for Binary Relationship The cardinality ratio for a binary relationship specifies the maximum number of relationship instances that an entity can participate in. For Example: Works _For Relationship is between EMPLOYEE and DEPARTMENT Its Cardinality ratio is 1:N Possible Cardinality ratios for binary relationships are 1:1,1:N,N:1,and M:N.
  • 28. Participation Constraint Specifies whether the existance of an entity depends on its being related to another entity via the relationship type. There are 2 possible participation constraints Total Partial
  • 29. Weak Entity Types  Entity types that do not have key attributes of their own are called weak entity types.  In contrast regular entity types that do have key attributes are called strong entity types.  Entities belonging to a weak entity type is are identified by strong entity types and the relation ship is called identifying relationship
  • 30. ER Diagram Naming Conventions
  • 31. ER Diagram Naming Conventions
  • 32. E-R Diagram For Company Schema
  • 33. Proper Naming of Schema Constructs Use Singular Names for Entity Types rather than plurals because entity type applies to each individual entity. Entity Type names and relationship types are written in uppercase. Attribute names are capitilized Role names are in lower case.