Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
3: Entity-Relationship Modeling
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
er diagram
4what is an er model?
semantic integrity constraints
using the er modeling grammarconceptual modeling
page 80er modeling notation
not a scienceheuristic (intuitive), iterative, recursive, incrementalltarget audience: end-userstechnology-independentg
an end-user communication/presentation devicepresentation-layer er model
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
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
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
pages 75-77bearcat incorporated
identify entity typesplant, project, employee, dependent,
credit union account, hobby
why not company, manager, or supervisor?
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
a series of steps - box 1development of er model
a series of steps - box 2development of er model
a series of steps - box 3development of er model
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.
a series of steps - box 4development of er model
a series of steps - box 5development of er model
Exclusive arc: joint account between employee/dependent not permitted
a series of steps - box 6development of er model
Inclusive arc: all accounts are joint accounts between employee/dependent
a series of steps - box 7development of er model
Noninclusive arc: joint accounts between employee/dependent permitted
a series of steps - box 8development of er model
one part of the ER modelpresentation-layer er diagram
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
semantic integrity constraints - the other part of the ER modelpresentation layer constraints