Presentation on theme: "Chapter 9 Structuring System Data Requirements"— Presentation transcript:
1 Chapter 9 Structuring System Data Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George Joseph S. ValacichChapter 9Structuring System Data Requirements
2 Learning Objectives Define key data modeling terms. Draw entity-relationship (E-R) and class diagrams to represent common business situations.Explain the role of conceptual data modeling in IS analysis and design.Distinguish between unary, binary, and ternary relationships.Define four types of business rules.Compare the capabilities of class diagrams vs. E-R diagrams.Relate data modeling to process and logic modeling.
5 Conceptual Data Modeling A detailed model that captures the overall structure of data in an organizationIndependent of any database management system (DBMS) or other implementation considerations
6 Process of Conceptual Data Modeling Develop a data model for the current systemDevelop a new conceptual data model that includes all requirements of the new systemIn the design stage, the conceptual data model is translated into a physical designProject repository links all design and data modeling steps performed during SDLC
7 Deliverables and Outcome Primary deliverable is an entity-relationship (E-R) diagram or class diagramAs many as 4 E-R or class diagrams are produced and analyzedE-R diagram that covers data needed in the project’s applicationE-R diagram for the application being replacedE-R diagram for the whole database from which the new application’s data are extractedE-R diagram for the whole database from which data for the application system being replaced is drawn
8 Deliverables and Outcome (cont.) Second deliverable is a set of entries about data objects to be stored in repository or project dictionary.Repository links data, process, and logic models of an information system.Data elements included in the 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.
10 Gathering Information for Conceptual Data Modeling Two perspectivesTop-downData model is derived from an intimate understanding of the business.Bottom-upData model is derived by reviewing specifications and business documents.
11 Requirements Determination Questions for Data Modeling What are subjects/objects of the business?Data entities and descriptionsWhat unique characteristics distinguish between subjects/objects of the same type?Primary keysWhat characteristics describe each subject/object?Attributes and secondary keysHow do you use the data?Security controls and user access privileges
12 Requirements Determination Questions for Data Modeling (cont.) Over what period of time are you interested in the data?Cardinality and time dimensionsAre all instances of each object the same?Supertypes, subtypes, and aggregationsWhat events occur that imply associations between objects?Relationships and cardinalitiesAre there special circumstances that affect the way events are handled?Integrity rules, cardinalities, time dimensions
13 Introduction to Entity-Relationship (E-R) Modeling Entity-Relationship (E-R) DiagramA detailed, logical representation of the entities, associations and data elements for an organization or businessNotation uses three main constructsData entitiesRelationshipsAttributes
14 Association between the instances of one or more entity types Person, place, object, event or concept about which data is to be maintainedEntity type: collection of entities with common characteristicsEntity instance: single entitynamed property or characteristic of an entity
15 Identifier Attributes Candidate keyAttribute (or combination of attributes) that uniquely identifies each instance of an entity typeIdentifierA candidate key that has been selected as the unique identifying characteristic for an entity type
16 Identifier Attributes (cont.) Selection rules for an identifierChoose a candidate key that will not change its value.Choose a candidate key that will never be null.Avoid using intelligent keys.Consider substituting single value surrogate keys for large composite keys.
17 Multivalued Attributes An attribute that may take on more than one value for each entity instanceRepresented on E-R Diagram in two ways:double-lined ellipseweak entity
18 Entity and Attribute Example Simple attributesIdentifier attribute… each employee has a unique ID.Multivalued attribute… an employee may have more than one skill.
19 Degree of Relationship Degree: number of entity types that participate in a relationshipThree casesUnary: between two instances of one entity typeBinary: between the instances of two entity typesTernary: among the instances of three entity types
21 CardinalityThe number of instances of entity B that can or must be associated with each instance of entity AMinimum CardinalityThe minimum number of instances of entity B that may be associated with each instance of entity AMaximum CardinalityThe maximum number of instances of entity B that may be associated with each instance of entity AMandatory vs. Optional CardinalitiesSpecifies whether an instance must exist or can be absent in the relationship
25 Associative EntitiesAn entity type that associates the instances of one or more entity types and contains attributes that are peculiar to the relationship between those entity instancesAn associative entity is:An entityA relationshipThis is the preferred way of illustrating a relationship with attributes
26 A relationship with an attribute …as an associative entity
28 A relationship that itself is related to other entities via another relationship must be represented as an associative entity.
29 Supertypes and Subtypes Subtype: a subrouping of the entities in an entity type that shares common attributes or relationships distinct from other subtypesSupertype: a generic entity type that has a relationship with one or more subtype
30 Rules for Supertype/Subtypes Relationships Total specialization: an entity instance of the supertype must be an instance of one of the subtypesPartial specialization: an entity instance of the supertype may or may not be an instance of one of the subtypesDisjoint: an entity instance of the supertype can be an instance of only one subtypeOverlap: an entity instance of the supertype may be an instance of multiple subtypes
32 Business RulesSpecifications that preserve the integrity of the logical data modelFour typesEntity integrity: unique, non-null identifiersReferential integrity constraints: rules governing relationshipsDomains: valid values for attributesTriggering operations: other business rules regarding attribute values
33 DomainsThe set of all data types and ranges of values that an attribute can assumeSeveral advantagesVerify that the values for an attribute are validEnsure that various data manipulation operations are logicalHelp conserve effort in describing attribute characteristics
34 Triggering Operations An assertion or rule that governs the validity of data manipulation operations such as insert, update and deleteComponents:User rule: statement of the business rule to be enforced by the triggerEvent: data manipulation operation that initiates the operationEntity Name: name of entity being accessed or modifiedCondition: condition that causes the operation to be triggeredAction: action taken when the operation is triggered
36 Packaged Data ModelsGeneric data models that can be applied and modified for an organizationTwo categoriesUniversalIndustry-specificBenefitsReduced implementation time and costHigh-quality modeling
37 Packaged data models provide generic models that can be customized for a particular organization’s business rules
38 Object Modeling Using Class Diagrams Object-oriented approachBased on Unified Modeling Language (UML)FeaturesObjects and classesEncapsulation of attributes and operationsPolymorphismInheritance
39 Objects Object: an entity with a well-defined role in an application Each object has:State: encompasses the attributes, their values, and relationships of an objectBehavior: represents how an object acts and reactsIdentity: uniqueness, no two objects are the same
40 ClassesClass: a logical grouping of objects with similar attributes and behaviorsOperation: a function or service provided by all instances of a classEncapsulation: the technique of hiding internal implementation details of an object from external view
41 Class DiagramA diagram showing the static structure of an object-oriented modelUML classes are analogous to E-R entities
42 Types of Operations Constructor Query Update Scope Creates a new instance of a classQueryAccesses the state of an objectUpdateAlters the state of an objectScopeApplies to a full class rather than an individual instance
43 Representing Associations Association: a relationship among instances of object classesAssociation role: the end of an association where it connects to a classMultiplicity: indicates how many objects participate in a give relationship
44 UML associations are analogous to E-R relationships. UML multiplicities are analogous to E-R cardinalities.
45 Multiplicity notation: 0..10 means minimum of 0 and maximum of 10 rolesmultiplicitiesMultiplicity notation:means minimum of 0 and maximum of 101, 2 means can be either 1 or 2* means any number
46 Association ClassAn association with its own attributes, operations, or relationshipsUML association classes are analogous to E-R associative entities.
47 Derived Attributes, Associations, and Roles Derived attributes are calculated based on other attributesDerived items are represented with a slash (/).
48 Generalization Superclass-subclass relationships Subclass inherits attributes, operations, and associations of the superclassTypes of superclassesAbstract: cannot have any direct instancesConcrete: can have direct instances
49 Generalization and inheritance implemented via superclass/subclasses in UML, supertypes/subtypes in E-R
50 Polymorphic Operations The same operation may apply to two or more classes in different waysAbstract operationsdefined in abstract classesdefined the protocol, but not the implementation of an operationMethodsthe implementation of an operation
51 Abstraction:Student is an abstract class and calc-tuition() is an abstract operation (italicized)Polymorphism:Here, each type of student has its own version of calc-tuition()Class scope:tuitionPerCred is a class-wide attribute
52 Aggregation and Composition A part-of relationship between a component and an aggregate objectCompositionAn aggregation in which the part object belongs to only one aggregate object and lives and dies with the aggregate object
53 Aggregation is represented with open diamonds Composition is represented with filled diamonds
54 Summary In this chapter you learned how to: Define key data modeling terms.Draw entity-relationship (E-R) and class diagrams to represent common business situations.Explain the role of conceptual data modeling in IS analysis and design.Distinguish between unary, binary, and ternary relationships.Define four types of business rules.Compare the capabilities of class diagrams vs. E-R diagrams.Relate data modeling to process and logic modeling.