🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

Lecture 10 Structuring Data Requirements (Part 1) (ERD).pdf

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Full Transcript

Systems Analysis and Design LECTURE 10 STRUCTURING DATA REQUIREMENTS (PART 1) SOURCE: KENNETH E. KENDALL AND JULIE E. KENDALL, SYSTEM ANALYSIS AND DESIGN, PEARSON ENTITY RELATIONSHIP (ER) MODELING CONCEPTUAL DATA MODELING INTRODUCTION...

Systems Analysis and Design LECTURE 10 STRUCTURING DATA REQUIREMENTS (PART 1) SOURCE: KENNETH E. KENDALL AND JULIE E. KENDALL, SYSTEM ANALYSIS AND DESIGN, PEARSON ENTITY RELATIONSHIP (ER) MODELING CONCEPTUAL DATA MODELING INTRODUCTION 2 ❑ Previous lecture: The DFD techniques do not show the definition, structure and relationship within data. So data modeling develops these missing and crucial, pieces of description of a system. ❑ Conceptual data modeling: is a detailed model that captures the overall structure of organizational data that is independent of any database management system (DBMS) or other implementation considerations. It is a representation of organizational data. The purpose is to show as many rules about the meaning and interrelationships among data as possible. Conceptual modelling is typically done in parallel with other requirements analysis and structuring steps during system analysis. CONCEPTUAL DATA MODELING (CONT..) INTRODUCTION (CONT..) 3 Figure 8-1 Systems development life cycle with analysis phase highlighted CONCEPTUAL DATA MODELING (CONT..) WHAT IS CONCEPTUAL DATA MODELING? 4 ❑ Conceptual data modeling is one of the data modeling and database design carried out throughout the system development process. Figure 8.2 shows the different kind of data modeling and database design that go on during the whole SDLC. The process of conceptual data modelling begins with developing a data model for the current system. CONCEPTUAL DATA MODELING (CONT..) WHAT IS CONCEPTUAL DATA MODELING? (CONT..) 5 Figure 8-2 Relationship between data modeling and the SDLC CONCEPTUAL DATA MODELING (CONT..) DELIVERABLES AND OUTCOMES 6 ▪ The primary deliverable from the conceptual data modelling steps within analysis phase is:  E-R diagram or UML diagram which shows entities (or classes) – as major categories of data, represented as rectangles and  Business Relationships (or associations) – lines between the entities ▪ A full set of entries about data objects to be stored in repository project dictionary or data modeling software:  Repository links data, process, and logic models of an IS  Data elements included in the data flow diagram (DFD) must appear in the data model and vice versa.  Each data store in a process model must relate to business objects represented in the data model CONCEPTUAL DATA MODELING (CONT..) DELIVERABLES AND OUTCOMES (CONT..) 7 Figure 8-3 Sample conceptual data model CONCEPTUAL DATA MODELING (CONT..) GATHERING INFORMATION FOR CONCEPTUAL DATA MODELING 8  Requirement determination must include questions and investigations that take a data, not only a process and logic focus.  Following are few key questions asked during requirements determination for data modeling: ❑ What are subjects/objects of the business? o Data entities and descriptions ❑ What unique characteristics distinguish between subjects/objects of the same type? o Primary keys ❑ What characteristics describe each subject/object? o Attributes and secondary keys CONCEPTUAL DATA MODELING (CONT..) GATHERING INFORMATION FOR CONCEPTUAL DATA MODELING 9 ❑ How do you use the data? o Security controls and user access privileges ❑ Over what period of time are you interested in the data? o Cardinality and time dimensions ❑ Are all instances of each object the same? o Supertypes, subtypes, and aggregations ❑ What events occur that imply associations between objects? o Relationships and cardinalities ❑ Are there special circumstances that affect the way events are handled? o Integrity rules, cardinalities, time dimensions ENTITY RELATIONSHIP (ER) MODELING 10  Entity Relationship data model (ER model) is a detailed, logical representation of the entities, associations and data elements for an organization or business area. It uses three main constructs:  data entities in the business environment,  relationships or associations among those entities and  their associated attributes or properties  An ER model is normally expressed as an Entity Relationship Diagram (ERD) or Enhanced Entity Relationship Diagram (EERD) ENTITY RELATIONSHIP (ER) MODELING (CONT..) 11 ER modeling use three main constructs; data entities, relationships and their associated attributes: 1. Entities is a concept in the user environment about which organization wishes to maintain data. An entity has its own identity which distinguishes it from each other entity Entity: a person, place, object, event or concept in the user environment about which data is to be maintained Entity type: collection of entities that share common properties or characteristics Entity instance: single occurrence of an entity type 2.Attribute: a named property or characteristic of an entity that is of interest to the organization  Naming an attribute: i.e. Vehicle_ID  Place its name inside the rectangle for the associated entity in the ER diagram. ENTITY RELATIONSHIP (ER) MODELING (CONT..) NAMING AND DEFINING ENTITY 12 An entity name should be: 1) A singular noun (ex CUSTOMER, STUDENT). 2) Descriptive and specific to the organization (ex PURCHASE ORDER) 3) Concise (ex REGISTRATION instead STUDENT REGISTRATION FOR CLASS) 4) Event entity should be named for the result of the event, not the activity or process of the event. 5) Should include statement of what the unique characteristic(s) is (are) for each instance of the entity type 6) Entity type definition should make clear what entity instances are include and not included 7) An entity type definition often includes a description of when an instance of entity type is created and added ENTITY RELATIONSHIP (ER) MODELING (CONT..) NAMING AND DEFINING ATTRIBUTES 13  An attribute name is a noun and should be unique (Ex. Customer_ID, Age, Major)  To make an attribute name unique and for clarity, each attribute name should follow a standard format  Similar attributes of different entity types should use similar but distinguishing names  An attributes of different entity types should use similar but distinguishing names (Ex. Faculty_Residence for staffs and Student_Residence for students)  An attribute definition states what the attribute is and possibly why it is important  An attribute definition should make it clear what is included and what is not included ENTITY RELATIONSHIP (ER) MODELING (CONT..) CANDIDATE KEYS AND IDENTIFIERS 14  Every entity must have an attribute or set of attributes that distinguishes on instance from other instances  Candidate key: an attribute (or combination of attributes) that uniquely identifies each instance of an entity type. (Ex. For STUDENT entity type might be Student_ID)  Identifier: a candidate key that has been selected as the unique, identifying characteristic for an entity type.  Selection rules for an identifier  The candidate key will not change its value over the life of each instance  For each instance, the attribute is guaranteed to have valid values not null  Avoid using intelligent identifier, whose structure indicate classification s, locations and so on ENTITY RELATIONSHIP (ER) MODELING (CONT..) OTHER ATTRIBUTE TYPES 15  Multivalued attribute: an attribute that may take on more than one value for each entity instance. ( Ex. Employee skill may take more than one)  Repeating group: a set of two or more multivalued attributes that are logically related or repeat together. ( Ex. Employees spouse and children) ENTITY RELATIONSHIP (ER) MODELING (CONT..) RELATIONSHIPS 16  Relationships are the glue that holds together the various components of an E-R model (see the fifth, seven and eight questions). It is an association between the instances of one or more entity types that is of interest to the organization. An association usually means that an event has occurred or that there exists some natural linkage between entity instances. (See Fig 8-10) ENTITY RELATIONSHIP (ER) MODELING (CONT..) RELATIONSHIPS (CONT..) 17  Degree: the number of entity types that participate in a relationship  Three most common relationship in E-R model: (see fig 8-11) 1) Unary relationship: a relationship between the instances of one entity type. Also called a recursive relationship 2) Binary relationship: a relationship between instances of two entity types. Most common type of relationship encountered in data modeling 3) Ternary relationship: a simultaneous relationship among instances of three entity types ENTITY RELATIONSHIP (ER) MODELING (CONT..) RELATIONSHIPS (CONT..) 18 Figure 8-11 Examples of relationships of different degrees ENTITY RELATIONSHIP (ER) MODELING (CONT..) CARDINALITIES IN RELATIONSHIPS 19 ▪ Suppose there are two entity types A and B, connected by a relationship. The cardinality of a relationship (see fifth, seventh and eighth question Table 8-1) is the number of instances of entity B that can (or must) be associated with each instance of entity A. ▪ Minimum Cardinality  The minimum number of instances of entity B that may be associated with each instance of entity A ▪ Maximum Cardinality  The maximum number of instances of entity B that may be associated with each instance of entity A  Mandatory vs. Optional Cardinalities  Specifies whether an instance must exist or can be absent in the relationship ENTITY RELATIONSHIP (ER) MODELING (CONT..) CARDINALITIES IN RELATIONSHIPS (CONT..) 20 Figure 8-14 Examples of cardinality constraints ENTITY RELATIONSHIP (ER) MODELING (CONT..) NAMING AND DEFINING RELATIONSHIPS 21 1) A relationship name is a verb phrase (Ex. Assigned_to, Supplies) and 2) Should avoid vague names (Ex. Has or Is_Related). 3) A relationship definition: 1) Explains what action is to be taken and possibly why it is important. 2) Possible gives examples to clarify the action. 4) A relationship definition should: ▪ Explain any optional participation. ▪ Explain the reason for any explicit maximum cardinality other than many. ▪ Explain any restrictions on participation in the relationship. ▪ Explain the extent of history that is kept in the relationship. ▪ Explain whether an entity instance involved in a relationship instance can transfer participation to another relationship instance. ENTITY RELATIONSHIP MODELING (CONT..) ASSOCIATIVE (BRIDGE) ENTITIES 22  Associative Entity: an entity type that associates the instances of one or more entity types and contains attributes that are peculiar to the relationship between those entity instances  The data modeler chooses to model the relationship as an entity type  See Figure 8-15 for example ENTITY RELATIONSHIP (ER) MODELING (CONT..) ASSOCIATIVE (BRIDGE) ENTITIES (CONT..) 23 (a) Attribute on a relationship (b) An associative entity (CERTIFICATE) (c) An associative entity using Microsoft Visio® Figure 8-15 An associative entity ENTITY RELATIONSHIP (ER) MODELING (CONT..) BUSINESS RULES 24  Conceptual data modeling is a step by step process for documenting information requirements and concerned with both structure of data and with rules about the integrity of the data.  Business rules are specifications that preserve the integrity of the logical data model  Captured during requirements determination  Stored in CASE repository as they are documented  Four basic types of business rules are: 1) Entity integrity: unique, non-null identifiers 2) Referential integrity constraints: rules governing relationships between entity types 3) Domains: constraints on valid values for attributes 4) Triggering operations: other business rules that protect the validity of attribute values ENTITY RELATIONSHIP MODELING (CONT..) BUSINESS RULES (CONT..) 25 (a) Sample of banking relationship (b) Typical domain definitions (c) Typical triggering operation Figure 8-20 Examples of business rule ENTITY RELATIONSHIP (ER) MODELING (CONT..) BUSINESS RULES (CONT..) 26  Domain: the set of all data types and values that an attribute can assume  Several advantages  Verify that the values for an attribute are valid  Ensure that various data manipulation operations are logical  Help conserve effort in describing attribute characteristics 27

Use Quizgecko on...
Browser
Browser