Что такое findslide.org?

FindSlide.org - это сайт презентаций, докладов, шаблонов в формате PowerPoint.


Для правообладателей

Обратная связь

Email: Нажмите что бы посмотреть 

Яндекс.Метрика

Презентация на тему ER – entity relationship diagram major components of ER diagram. (Chapter 6)

Содержание

*Yan Huang - ERER1976 proposed by Peter ChenER diagram is widely used in database designRepresent conceptual level of a database systemDescribe things and their relationships in high level
*Yan Huang - ERChapter 6: ER – Entity Relationship DiagramMajor components of ER diagramPractices *Yan Huang - ERER1976 proposed by Peter ChenER diagram is widely used *Yan Huang - ERBasic ConceptsEntity set – an abstraction of similar things, *Yan Huang - ERAn Example *Yan Huang - ERRelationshipA relationship may be thought as a set as *Yan Huang - ERRelationshipA relationship set is a mathematical relation among n *Yan Huang - ERRelationship Example *Yan Huang - ERAttribute of A Relationship Set *Yan Huang - ERRelationshipThe degree of a relationship = the number of *Yan Huang - EROne-One and One-Many *Yan Huang - ERMany-one and many-many *Yan Huang - ER1- many *Yan Huang - ERMany - 1 *Yan Huang - ERMany - many *Yan Huang -CSCE4350 - ERAlternative Cardinality Specification *Yan Huang - ERNote on Mapping CardinalityBoth many and 1 include 0Meaning *Yan Huang - ERTotal ParticipationWhen we require all entities to participate in *Yan Huang - ERSelf RelationshipSometimes entities in a entity set may relate *Yan Huang - ERMore examples on self-relationshipPeople to peopleParent – childrenManager – *Yan Huang 350 - ERAttributesBoth entity sets and relationships can have attributesAttributes *Yan Huang - ERAnother Example *Yan Huang - ERKeysA super key of an entity set is a *Yan Huang - ERKey ExamplesSuggest super keys for the following entity?What are the candidate keys?Primary key?authornamebirthdaydeathdescription *Yan Huang - - ERTernary Relationship *Yan Huang - ERCan We Decompose a Ternary Relationship?Some relationships that appear *Yan Huang - ERConverting Ternary to binaryIn general, any non-binary relationship can *Yan Huang - ERConverting Ternary to binary *Yan Huang - ERDesign an ER DiagramDesign a database for an on-line *Yan Huang - ERWeak Entity SetSome entity sets in real world naturally *Yan Huang - ERWeak Entity Set NotationsDouble rectangles for weak entity setDouble *Yan Huang - ERSpecializationA lower-level entity set inherits all the attributes and *Yan Huang - ER *Yan Huang - ERSpecificationDisjointCompleteness constraint (use double lines)total : an entity must *Yan Huang - ERDesign ConsiderationsUse of entity sets vs. attributesWhether we want *Yan Huang - ERNotations *Yan Huang - ERNotations *Yan Huang - ERER Practice AgainDesign an ER diagram for an online *Yan Huang CE4350 - ERBest Practice Guide for ER DesignUse of entity *Yan Huang - ERER for Banking EnterpriseDescription handhout *Yan Huang - ERRead ER DiagramsFollowing are some ER diagrams grabbed from the webRead to understand/criticize *Yan Huang - ER????????? *Yan Huang -CSCE4350 - ER????? *Yan Huang -CSCE4350 - ER? *Yan Huang -CSCE4350 - ER
Слайды презентации

Слайд 2 *
Yan Huang - ER
ER
1976 proposed by Peter Chen
ER

*Yan Huang - ERER1976 proposed by Peter ChenER diagram is widely

diagram is widely used in database design
Represent conceptual level

of a database system
Describe things and their relationships in high level

Слайд 3 *
Yan Huang - ER
Basic Concepts
Entity set – an

*Yan Huang - ERBasic ConceptsEntity set – an abstraction of similar

abstraction of similar things, e.g. cars, students
An entity

set contains many entities
Attributes: common properties of the entities in a entity sets
Relationship – specify the relations among entities from two or more entity sets


Слайд 4 *
Yan Huang - ER
An Example

*Yan Huang - ERAn Example

Слайд 5 *
Yan Huang - ER
Relationship
A relationship may be thought

*Yan Huang - ERRelationshipA relationship may be thought as a set

as a set as well
For binary relationship, it enumerates

the pairs of entities that relate to each other
For example, entity set M = {Mike, Jack, Tom} entity set F = {Mary, Kate}. The relationship set married between M and F may be {,}


Слайд 6 *
Yan Huang - ER
Relationship
A relationship set is a

*Yan Huang - ERRelationshipA relationship set is a mathematical relation among

mathematical relation among n ≥ 2 entities, each taken

from entity sets
{(e1, e2, … en) | e1 ∈ E1, e2 ∈ E2, …, en ∈ En} where (e1, e2, …, en) is a relationship
Example:
(Hayes, A-102) ∈ depositor

Слайд 7 *
Yan Huang - ER
Relationship Example

*Yan Huang - ERRelationship Example

Слайд 8 *
Yan Huang - ER
Attribute of A Relationship Set

*Yan Huang - ERAttribute of A Relationship Set

Слайд 9 *
Yan Huang - ER
Relationship
The degree of a relationship

*Yan Huang - ERRelationshipThe degree of a relationship = the number

= the number of entity sets that participate in

the relationship
Mostly binary relationships
Sometimes more
Mapping cardinality of a relationship
1 –1
1 – many
many – 1
Many-many


Слайд 10 *
Yan Huang - ER
One-One and One-Many

*Yan Huang - EROne-One and One-Many

Слайд 11 *
Yan Huang - ER
Many-one and many-many

*Yan Huang - ERMany-one and many-many

Слайд 12 *
Yan Huang - ER
1- many

*Yan Huang - ER1- many

Слайд 13 *
Yan Huang - ER
Many - 1

*Yan Huang - ERMany - 1

Слайд 14 *
Yan Huang - ER
Many - many

*Yan Huang - ERMany - many

Слайд 15 *
Yan Huang -CSCE4350 - ER
Alternative Cardinality Specification

*Yan Huang -CSCE4350 - ERAlternative Cardinality Specification

Слайд 16 *
Yan Huang - ER
Note on Mapping Cardinality
Both many

*Yan Huang - ERNote on Mapping CardinalityBoth many and 1 include

and 1 include 0
Meaning some entity may not participate

in the relationship

Слайд 17 *
Yan Huang - ER
Total Participation
When we require all

*Yan Huang - ERTotal ParticipationWhen we require all entities to participate

entities to participate in the relationship (total participation), we

use double lines to specify

Every loan has to have at least one customer


Слайд 18 *
Yan Huang - ER
Self Relationship
Sometimes entities in a

*Yan Huang - ERSelf RelationshipSometimes entities in a entity set may

entity set may relate to other entities in the

same set. Thus self relationship
Here employees mange some other employees
The labels “manger” and “worker” are called roles the self relationship

Слайд 19 *
Yan Huang - ER
More examples on self-relationship
People to

*Yan Huang - ERMore examples on self-relationshipPeople to peopleParent – childrenManager

people
Parent – children
Manager – employee
Husband – wife
Word to word
Root

– synonym



Слайд 20 *
Yan Huang 350 - ER
Attributes
Both entity sets and

*Yan Huang 350 - ERAttributesBoth entity sets and relationships can have

relationships can have attributes
Attributes may be
Composite
Multi-valued (double ellipse)
Derive

(dashed ellipse)


Слайд 21 *
Yan Huang - ER
Another Example

*Yan Huang - ERAnother Example

Слайд 22 *
Yan Huang - ER
Keys
A super key of an

*Yan Huang - ERKeysA super key of an entity set is

entity set is a set of one or more

attributes whose values uniquely determine each entity.
A candidate key of an entity set is a minimal super key
Although several candidate keys may exist, one of the candidate keys is selected to be the primary key.

Слайд 23 *
Yan Huang - ER
Key Examples
Suggest super keys for

*Yan Huang - ERKey ExamplesSuggest super keys for the following entity?What are the candidate keys?Primary key?authornamebirthdaydeathdescription

the following entity?
What are the candidate keys?
Primary key?


author
name
birthday
death
description





Слайд 24 *
Yan Huang - - ER
Ternary Relationship

*Yan Huang - - ERTernary Relationship

Слайд 25 *
Yan Huang - ER
Can We Decompose a Ternary

*Yan Huang - ERCan We Decompose a Ternary Relationship?Some relationships that

Relationship?
Some relationships that appear to be non-binary may be

better represented using binary relationships
E.g. A ternary relationship parents, relating a child to his/her father and mother, is best replaced by two binary relationships, father and mother
Using two binary relationships allows partial information (e.g. only mother being know)
But there are some relationships that are naturally non-binary
E.g. works-on, why?

Слайд 26 *
Yan Huang - ER
Converting Ternary to binary
In general,

*Yan Huang - ERConverting Ternary to binaryIn general, any non-binary relationship

any non-binary relationship can be represented using binary relationships

by creating an artificial entity set.
Replace R between entity sets A, B and C by an entity set E, and three relationship sets:
1. RA, relating E and A 2.RB, relating E and B
3. RC, relating E and C
Create a special identifying attribute for E
Add any attributes of R to E
For each relationship (ai , bi , ci) in R, create
1. a new entity ei in the entity set E 2. add (ei , ai ) to RA
3. add (ei , bi ) to RB 4. add (ei , ci ) to RC


Слайд 27 *
Yan Huang - ER
Converting Ternary to binary

*Yan Huang - ERConverting Ternary to binary

Слайд 28 *
Yan Huang - ER
Design an ER Diagram
Design a

*Yan Huang - ERDesign an ER DiagramDesign a database for an

database for an on-line reservation system for microscopes in

material science lab
There are two types of users: microscope administrators and microscope end users
Each microscope is located in a specific lab
Each request is assigned to an administrator who can authorize or deny the request
Using of some microscope requires the presence of an administrator
Time is divided into 1 hour slots. Each reservation can only take one or more time slots

Слайд 29 *
Yan Huang - ER
Weak Entity Set
Some entity sets

*Yan Huang - ERWeak Entity SetSome entity sets in real world

in real world naturally depend on some other entity

set
They can be uniquely identified only if combined with another entity set
Example:
section1, section2, … become unique only if you put them into a context, e.g. csce4350

Слайд 30 *
Yan Huang - ER
Weak Entity Set Notations
Double rectangles

*Yan Huang - ERWeak Entity Set NotationsDouble rectangles for weak entity

for weak entity set
Double diamond for weak entity relationship
Dashed

underscore for discriminator

Слайд 31 *
Yan Huang - ER
Specialization
A lower-level entity set inherits

*Yan Huang - ERSpecializationA lower-level entity set inherits all the attributes

all the attributes and relationship participation of the higher-level

entity set to which it is linked.
A lower-level entity set may have additional attributes and participate in additional relationships

Слайд 32 *
Yan Huang - ER

*Yan Huang - ER

Слайд 33 *
Yan Huang - ER
Specification
Disjoint
Completeness constraint (use double lines)
total

*Yan Huang - ERSpecificationDisjointCompleteness constraint (use double lines)total : an entity

: an entity must belong to one of the

lower-level entity sets
partial: an entity need not belong to one of the lower-level entity sets


Слайд 34 *
Yan Huang - ER
Design Considerations
Use of entity sets

*Yan Huang - ERDesign ConsiderationsUse of entity sets vs. attributesWhether we

vs. attributes
Whether we want to keep additional information
Use of

entity sets vs. relationship sets
Actions among entities are usually represented by relationships
Binary versus n-ary relationship sets
N-nary relationships are usually more natural for actions among entity sets
Weak entity set vs. strong entity set
Generalization

Слайд 35 *
Yan Huang - ER
Notations

*Yan Huang - ERNotations

Слайд 36 *
Yan Huang - ER
Notations

*Yan Huang - ERNotations

Слайд 37 *
Yan Huang - ER
ER Practice Again
Design an ER

*Yan Huang - ERER Practice AgainDesign an ER diagram for an

diagram for an online music store. The database will

contain at least the following concepts: songs, artists, bands, albums, and genres.
State your design assumptions you make to support design decisions. Be sure your assumptions are reasonable.

Слайд 38 *
Yan Huang CE4350 - ER
Best Practice Guide for

*Yan Huang CE4350 - ERBest Practice Guide for ER DesignUse of

ER Design
Use of entity sets vs. attributes
Use of entity

sets vs. relationship sets
Binary versus n-ary relationship sets
Weak entity set vs. strong entity set
Choose the natural one
Generalization
If specialized entities need to keep additional information and participate in additional relationships

Слайд 39 *
Yan Huang - ER
ER for Banking Enterprise
Description handhout

*Yan Huang - ERER for Banking EnterpriseDescription handhout

Слайд 40 *
Yan Huang - ER
Read ER Diagrams
Following are some

*Yan Huang - ERRead ER DiagramsFollowing are some ER diagrams grabbed from the webRead to understand/criticize

ER diagrams grabbed from the web
Read to understand/criticize


Слайд 41 *
Yan Huang - ER

?
?
?
?
?
?
?
?
?

*Yan Huang - ER?????????

Слайд 42 *
Yan Huang -CSCE4350 - ER

?
?
?
?
?

*Yan Huang -CSCE4350 - ER?????

Слайд 43 *
Yan Huang -CSCE4350 - ER

?

*Yan Huang -CSCE4350 - ER?

  • Имя файла: er-–-entity-relationship-diagram-major-components-of-er-diagram-chapter-6.pptx
  • Количество просмотров: 151
  • Количество скачиваний: 0