Presentation is loading. Please wait.

Presentation is loading. Please wait.

Data Modelling Chapter 7

Similar presentations


Presentation on theme: "Data Modelling Chapter 7"— Presentation transcript:

1 Data Modelling Chapter 7
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

2 Key definitions Data models show the people, places and things relevant to the system, and the relationships between them. The logical data model shows the organization of data (without indicating how it is stored, created, or manipulated). PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

3 Key definitions A physical data model shows how the data will actually be stored in the database. Normalisation is the process of checking for data redundancy. PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

4 The Entity-Relation Diagram (ERD)
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

5 What is an ERD? A diagram of the information created, stored and used.
Entities are people, places and things of relevance to the system. Lines linking entities indicate relationships between them. PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

6 Showing business rules in ERD
ERD symbols can show when one example of an entity must exist for an example of another to exist A product must exist before it can be sold ERD symbols can show when one example of an entity can be related to only one or to many examples of another entity One doctor can have many patients; each patient may have only one primary doctor PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

7 An ERD example PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

8 ERD elements PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

9 Entities and Instances
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

10 CASE entry for Patient entity
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

11 Attributes Information about an entity.
Only those details used by the system should be included in the model. Attribute names are nouns. Sometimes entity name is added at the beginning of the attribute name, to avoid confusions. PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

12 Identifiers The identifier uniquely identifies each instance of the entity. The identifier can consist of one or more attributes. PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

13 Identifier Types PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

14 CASE entry for Patient_SSN
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

15 Relationships Associations between entities Connected by a line
Given active verb names One verb can describe relationship in both directions Two verbs can describe each direction PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

16 Cardinality Cardinality refers to the number of times instances in one entity can be related to instances in another entity One instance in an entity refers to one and only one instance in the related entity (1:1) One instance in an entity refers to one or more instances in the related entity (1:M) One or more instances in an entity refer to one or more instances in the related entity (M:M) PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

17 Modality Modality refers to the minimum number of times that an instance in one entity can be related to an instance in another entity One means that an instance in the related entity must exist for an instance in another entity to be valid Zero means that no instance in the related entity is necessary for an instance in another entity to be valid (i.e., it is optional) PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

18 Showing cardinality and modality in an ERD
Cardinality is shown with the marking closer from the entity Modality is shown with the marking farther from the entity PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

19 CASE entry for a Relationship
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

20 Metadata Metadata provides information about components of the model
Developers and users can share the metadata stored in the CASE repository throughout the SDLC. PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

21 Metadata examples An Entity An Attribute A Relationship
can be can be can be described by: described by: described by: Name Name Verb phrase Definition Description Definition Notes Alias Cardinality Acceptable Values Modality Format Notes Notes PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

22 ERD building guildelines
Data stores of the DFD should correspond to entities Only include entities with more than one instance of information Don’t include entities associated with implementation of the system (i.e., not the system itself) PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

23 Special types of entity
Intersection entities are created to store information about two entities sharing an M:M relationship Independent entities can exist without the help of another entity Dependent entities use the identifier of one or more other entities as part or all of their identifiers PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

24 Take-home tips Best practices: Entities should have many occurrences
Avoid unnecessary attributes Clearly label all components Apply correct cardinality and modality Break attributes into lowest level needed Use common business terms for labels Assumptions should be clearly stated PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

25 Balancing ERDs with DFDs
Analysis activities are inter-related Process models contain two data components data flows and data stores The DFD data components need to balance the ERD’s data stores (entities) and data elements (attributes) Many CASE tools provide features to check for imbalance Check that all data stores and elements match between the models Do not follow without thinking - check that the models make sense!! PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.

26 Summary The ERD is the most common technique for drawing data models. The building blocks of the ERD are: Entities describe people, places, or things Attributes capture information about the entity Relationships associate data across entities Intersection, dependent, and independent entities must be recognized. The ERD must be balanced with the DFD. PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved.


Download ppt "Data Modelling Chapter 7"

Similar presentations


Ads by Google