SlideShare une entreprise Scribd logo
1  sur  35
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 (Car, Person, house) or may
be an object with a conceptual
existence(a company, a job).
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 each
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.
 The entity set is usually referred to using the same
name as the entity type. For example, EMPLOYEE
refers to both a type of entity as well as the current
set of all employee entities in the database.
 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.
Value Sets(Domains) of Attributes
Each simple attribute in an entity set is
associated with an value set 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 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.

Contenu connexe

Tendances

Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database languageJafar Nesargi
 
Chapter3 the relational data model and the relation database constraints part2
Chapter3 the relational data model and the relation database constraints part2Chapter3 the relational data model and the relation database constraints part2
Chapter3 the relational data model and the relation database constraints part2eidah20
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data ModelSmriti Jain
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model IntroductionNishant Munjal
 
Database Assignment
Database AssignmentDatabase Assignment
Database AssignmentJayed Imran
 
Chapter 2 Relational Data Model-part 2
Chapter 2 Relational Data Model-part 2Chapter 2 Relational Data Model-part 2
Chapter 2 Relational Data Model-part 2Eddyzulham Mahluzydde
 
5. Other Relational Languages in DBMS
5. Other Relational Languages in DBMS5. Other Relational Languages in DBMS
5. Other Relational Languages in DBMSkoolkampus
 
Eer >r.model
Eer >r.modelEer >r.model
Eer >r.modellavya3
 
CHAPTER 2 DBMS IN EASY WAY BY MILAN PATEL
CHAPTER 2 DBMS IN EASY WAY BY  MILAN PATELCHAPTER 2 DBMS IN EASY WAY BY  MILAN PATEL
CHAPTER 2 DBMS IN EASY WAY BY MILAN PATELShashi Patel
 
Database Design and Normalization Techniques
Database Design and Normalization TechniquesDatabase Design and Normalization Techniques
Database Design and Normalization TechniquesNishant Munjal
 
Relational database intro for marketers
Relational database intro for marketersRelational database intro for marketers
Relational database intro for marketersSteve Finlay
 
Dbms ii mca-ch3-er-model-2013
Dbms ii mca-ch3-er-model-2013Dbms ii mca-ch3-er-model-2013
Dbms ii mca-ch3-er-model-2013Prosanta Ghosh
 
4. SQL in DBMS
4. SQL in DBMS4. SQL in DBMS
4. SQL in DBMSkoolkampus
 
Mapping ER and EER Model
Mapping ER and EER ModelMapping ER and EER Model
Mapping ER and EER ModelMary Brinda
 

Tendances (20)

Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database language
 
Chapter3 the relational data model and the relation database constraints part2
Chapter3 the relational data model and the relation database constraints part2Chapter3 the relational data model and the relation database constraints part2
Chapter3 the relational data model and the relation database constraints part2
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data Model
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
 
Database Assignment
Database AssignmentDatabase Assignment
Database Assignment
 
Dbms relational data model and sql queries
Dbms relational data model and sql queries Dbms relational data model and sql queries
Dbms relational data model and sql queries
 
ch6
ch6ch6
ch6
 
Relational model
Relational modelRelational model
Relational model
 
Chapter 2 Relational Data Model-part 2
Chapter 2 Relational Data Model-part 2Chapter 2 Relational Data Model-part 2
Chapter 2 Relational Data Model-part 2
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
5. Other Relational Languages in DBMS
5. Other Relational Languages in DBMS5. Other Relational Languages in DBMS
5. Other Relational Languages in DBMS
 
Eer >r.model
Eer >r.modelEer >r.model
Eer >r.model
 
Lesson03 the relational model
Lesson03 the relational modelLesson03 the relational model
Lesson03 the relational model
 
CHAPTER 2 DBMS IN EASY WAY BY MILAN PATEL
CHAPTER 2 DBMS IN EASY WAY BY  MILAN PATELCHAPTER 2 DBMS IN EASY WAY BY  MILAN PATEL
CHAPTER 2 DBMS IN EASY WAY BY MILAN PATEL
 
Database Design and Normalization Techniques
Database Design and Normalization TechniquesDatabase Design and Normalization Techniques
Database Design and Normalization Techniques
 
Relational database intro for marketers
Relational database intro for marketersRelational database intro for marketers
Relational database intro for marketers
 
Dbms ii mca-ch3-er-model-2013
Dbms ii mca-ch3-er-model-2013Dbms ii mca-ch3-er-model-2013
Dbms ii mca-ch3-er-model-2013
 
Dbms ER Model
Dbms ER ModelDbms ER Model
Dbms ER Model
 
4. SQL in DBMS
4. SQL in DBMS4. SQL in DBMS
4. SQL in DBMS
 
Mapping ER and EER Model
Mapping ER and EER ModelMapping ER and EER Model
Mapping ER and EER Model
 

En vedette

Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database languageJafar 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
 
Relational database language
Relational database languageRelational database language
Relational database languageJafar Nesargi
 
Introduction to transaction processing
Introduction to transaction processingIntroduction to transaction processing
Introduction to transaction processingJafar Nesargi
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheetsJafar Nesargi
 
Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database languageJafar Nesargi
 
Chapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processingChapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processingJafar 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
 
Dbms lab 01 termwork1
Dbms lab 01 termwork1Dbms lab 01 termwork1
Dbms lab 01 termwork1Jafar Nesargi
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jspJafar Nesargi
 
Database system concepts and architecture
Database system concepts and architectureDatabase system concepts and architecture
Database system concepts and architectureJafar Nesargi
 
Database Management System And Design Questions
Database Management System And Design QuestionsDatabase Management System And Design Questions
Database Management System And Design QuestionsSamir Sabry
 

En vedette (20)

Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database language
 
Session1 gateway to web page development
Session1   gateway to web page developmentSession1   gateway to web page development
Session1 gateway to web page development
 
Ch1
Ch1Ch1
Ch1
 
Relational database language
Relational database languageRelational database language
Relational database language
 
Introduction to transaction processing
Introduction to transaction processingIntroduction to transaction processing
Introduction to transaction processing
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Css
CssCss
Css
 
Css
CssCss
Css
 
Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database language
 
Chapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processingChapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processing
 
Chapter2
Chapter2Chapter2
Chapter2
 
Introduction to jsp
Introduction to jspIntroduction to jsp
Introduction to jsp
 
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
 
Chapter8 pl sql
Chapter8 pl sqlChapter8 pl sql
Chapter8 pl sql
 
Dbms lab 01 termwork1
Dbms lab 01 termwork1Dbms lab 01 termwork1
Dbms lab 01 termwork1
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
 
Chapter1
Chapter1Chapter1
Chapter1
 
Database system concepts and architecture
Database system concepts and architectureDatabase system concepts and architecture
Database system concepts and architecture
 
Rmi
RmiRmi
Rmi
 
Database Management System And Design Questions
Database Management System And Design QuestionsDatabase Management System And Design Questions
Database Management System And Design Questions
 

Similaire à Chapter3

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
 
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
 
ERD with complete knowledge
ERD with complete knowledgeERD with complete knowledge
ERD with complete knowledgeAsma Rasool
 
Jobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptxJobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptxprosofts1
 
3. Chapter Three.pdf
3. Chapter Three.pdf3. Chapter Three.pdf
3. Chapter Three.pdffikadumola
 
03 Ch3 Notes Revised
03 Ch3 Notes Revised03 Ch3 Notes Revised
03 Ch3 Notes Revisedguest6f408c
 
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 ModelA. S. M. Shafi
 
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
 
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
 
DBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptxDBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptxparimala123
 
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
 
Chapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxChapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxsantosh96234
 

Similaire à Chapter3 (20)

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
 
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...
 
E r model
E r modelE r model
E r model
 
ERD with complete knowledge
ERD with complete knowledgeERD with complete knowledge
ERD with complete knowledge
 
Jobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptxJobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptx
 
02er
02er02er
02er
 
3. Chapter Three.pdf
3. Chapter Three.pdf3. Chapter Three.pdf
3. Chapter Three.pdf
 
27 fcs157al3
27 fcs157al327 fcs157al3
27 fcs157al3
 
03 Ch3 Notes Revised
03 Ch3 Notes Revised03 Ch3 Notes Revised
03 Ch3 Notes Revised
 
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
 
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
 
database1
database1database1
database1
 
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
 
DBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptxDBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptx
 
Basic concepts of Data and Databases
Basic concepts of Data and Databases Basic concepts of Data and Databases
Basic concepts of Data and Databases
 
DBMS PPT
DBMS PPTDBMS PPT
DBMS PPT
 
Unit02 dbms
Unit02 dbmsUnit02 dbms
Unit02 dbms
 
Chapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxChapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptx
 
ER diagram
ER diagramER diagram
ER diagram
 

Plus de 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
 
Computer basics Intro
Computer basics IntroComputer basics Intro
Computer basics IntroJafar Nesargi
 
Introduction to-oracle
Introduction to-oracleIntroduction to-oracle
Introduction to-oracleJafar 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
 
Functional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesFunctional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesJafar Nesargi
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheetsJafar Nesargi
 

Plus de Jafar Nesargi (12)

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
 
Computer basics Intro
Computer basics IntroComputer basics Intro
Computer basics Intro
 
Introduction to-oracle
Introduction to-oracleIntroduction to-oracle
Introduction to-oracle
 
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
 
Functional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesFunctional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databases
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 

Dernier

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Dernier (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Chapter3

  • 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.
  • 8. 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 (Car, Person, house) or may be an object with a conceptual existence(a company, a job).
  • 9. 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
  • 10. 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
  • 11. 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
  • 12. 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
  • 13. 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 .
  • 14. Complex Attributes The composition of composite and multivalued attributes is called as complex attributes. Composite attributes are represented by () paranthesis and multivalued attributes { }.
  • 15. 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 each attributes.
  • 16. 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.  The entity set is usually referred to using the same name as the entity type. For example, EMPLOYEE refers to both a type of entity as well as the current set of all employee entities in the database.  Entity type is represented as a Rectangular box in ER Diagrams enclosing entity type name.
  • 17. 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.
  • 18. 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.
  • 19. Value Sets(Domains) of Attributes Each simple attribute in an entity set is associated with an value set 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 and so on.
  • 20. 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.
  • 21. Initial Conceptual Design of Company Database An entity type PROJECT with attributes Name, Number, Location,and ControllingDepartment. Both Name and Number are key attributes.
  • 22. 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.
  • 23. Initial Conceptual Design of Company Database An Entity type DEPENDENT with attributes Employee, DependentName, Sex, BirthDate and Relationship(to the employee)
  • 24. 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.
  • 25.
  • 26. 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.
  • 27. 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
  • 28. 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.
  • 29. 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.
  • 30. 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
  • 31. 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
  • 32. ER Diagram Naming Conventions
  • 33. ER Diagram Naming Conventions
  • 34. E-R Diagram For Company Schema
  • 35. 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.