23
3: Entity-Relationship Modeling

3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

3: Entity-Relationship Modeling

Page 2: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

presentation-layer er model/schemaused to interact with the user communityKdesign-specific er model/schemadesign tool at the highest level of abstractionK

two major purposeser model for conceptual modeling

Page 3: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

er diagram

4what is an er model?

semantic integrity constraints

Page 4: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

using the er modeling grammarconceptual modeling

Page 5: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

page 80er modeling notation

Page 6: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

not a scienceheuristic (intuitive), iterative, recursive, incrementalltarget audience: end-userstechnology-independentg

an end-user communication/presentation devicepresentation-layer er model

Page 7: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

synthesisdata elements j attributes j entity types j relationships vanalysisentity types j attributes j relationships v

for generating an initial set of entity types and attributestwo approaches

Page 8: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

list data elements and treat them as attributes4for generating an initial set of entity types and attributessynthesis approach

group these attributes based on commonalities5designate each cluster of attributes as an entity typeWreview leftover data elements, investigate possibility that some of them serve as links among the entity types !designate these links as relationship typesg

Page 9: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

search for things that can be labeled by singular nouns and call these things entity typesW

for generating an initial set of entity types and attributesanalysis approach

gather properties that belong to individual entity types and label them as attributes of a particular entity type4be sensitive throughout the process to the identification of relationships among the various entity typesg

Page 10: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

pages 75-77bearcat incorporated

identify entity typesplant, project, employee, dependent,

credit union account, hobby

why not company, manager, or supervisor?

Page 11: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

a series of stepsdevelopment of er model

1. divide story into meaningful chunks

2. identify relationships among entity types

3. read the story again, refine entity types and relationship types

4. gather business rules that can’t be captured in the ERD into semantic integrity constraints

5. repeat until all business rules accounted for in model

Page 12: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

a series of steps - box 1development of er model

Page 13: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

a series of steps - box 2development of er model

Page 14: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

a series of steps - box 3development of er model

Page 15: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

a series of steps - box 4development of er model

Some employees may have several dependents. Bearcat Incorporated does not allow both husband and wife to be an employee of the company. Also, a dependent can only be a dependent of one employee at any time. Bearcat Incorporated offers credit union facilities as a service to its employees and to their dependents. An employee is not required to become a member of Bearcat Credit Union (BCU). However, most employees and some of their dependents have accounts in BCU. Some BCU accounts are individual accounts and others are joint accounts between an employee and his or her dependent(s). Every BCU account must belong to at least an employee or a dependent. Each joint account must involve no more than one employee and no more than one of his or her dependents. If an employee leaves the company, all dependents and BCU accounts of the employee must be removed. In addition, as long as a dependent has a BCU account, deletion of the dependent is not permitted.

Page 16: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

a series of steps - box 4development of er model

Page 17: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

a series of steps - box 5development of er model

Exclusive arc: joint account between employee/dependent not permitted

Page 18: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

a series of steps - box 6development of er model

Inclusive arc: all accounts are joint accounts between employee/dependent

Page 19: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

a series of steps - box 7development of er model

Noninclusive arc: joint accounts between employee/dependent permitted

Page 20: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

a series of steps - box 8development of er model

Page 21: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

one part of the ER modelpresentation-layer er diagram

Page 22: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

semantic integrity constraints - the other part of the ER modelpresentation layer constraints

grouped into the following categories:

4 attribute level business rules

entity level business rules

business rules governing entity deletion

miscellaneous business rules

Page 23: 3: Entity-Relationship Modeling€¦ · presentation-layer er model/schema K used to interact with the user community design-specific er model/schema K design tool at the highest

semantic integrity constraints - the other part of the ER modelpresentation layer constraints