496e02efc24a6bbc9b681f6887a3d1e3.ppt
- Количество слайдов: 18
Chapter 7: Conceptual Data Modeling (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A. Hoffer © Prentice Hall, 2004 7 -1
Conceptual Data Model l. A detailed model that shows the overall content and structure (relationships) of organizational data l Independent of any DBMS product or other implementation considerations. Chapter 7 © Prentice Hall, 2004 2
Chapter 7 © Prentice Hall, 2004 3
Conceptual Data Model Elements Classes Attributes Identifiers Associations (Relationships) Special Relationships: aggregation, composition generalizations Time dimensions Integrity rules Security controls Chapter 7 © Prentice Hall, 2004 4
Classes & Objects 1. Name 2. List of attributes 3. List of methods 4. (processes) create. Student() Class Instances = Objects Chapter 7 © Prentice Hall, 2004 5
Kinds of Attributes l Simple attributes – contain single data item l Identifiers – unique value per object, key values (keys): <<PK>> More l Multivalued attributes – contain multiple values simultaneously (e. g. , tel. number): <<multivalued>> More l Composite attributes – group of related attributes (e. g. , address) More Chapter 7 © Prentice Hall, 2004 6
Primary key is a unique identifier; no two Student instances will have the same student. Id value. Multivalued attribute can contain multiple values; a student may have several phone numbers Chapter 7 © Prentice Hall, 2004 7
Composite attributes have multiple sections (subattributes). They are treated as separate classes in conceptual data models. Chapter 7 © Prentice Hall, 2004 8
Relationships This relationship indicates that employees work in departments. Chapter 7 © Prentice Hall, 2004 9
Relationship Degree l The number of classes that participate in a relationship l Types of degrees: – Unary – a relationship between objects of the same class – Binary – a relationship between objects of two different classes – Ternary – a relationship between objects of three different classes Chapter 7 © Prentice Hall, 2004 10
Binary Chapter 7 © Prentice Hall, 2004 11
• Ternary relationships are simultaneous; mutual dependence of the classes involved (tight coupling): the Ships class must be related to Vendor who makes Part that is shipped into Warehouse. • To track fully parts contained in a shipment, vendor and warehousing info must be included. • Ternary relationship cannot be broken down to three binary relationships between 12 Chapter 7 Ships and each of the other classes. © Prentice Hall, 2004
Multiplicity (Cardinality) l The number of objects that participate in a relationship. Multiplicity is UML’s name for Cardinality. l Multiplicity question: Each object of one class is associated with how many objects of the other class? Minimum Multiplicity vs. Maximum Multiplicity = the minimum number of objects in a relationship vs. the maximum number of objects in a relationship Chapter 7 © Prentice Hall, 2004 13
Multiplicity Types One – to – one One – to – many Many – to – many Look at the maximum multiplicity to determine type. Often, we just state max. multiplicity. Relationship types often called after multiplicity types. Do NOT mix with this relationship degree! Chapter 7 © Prentice Hall, 2004 14
If just one number but two on the other, the former usually means both min. and max. multiplicity. Also used: 0. . * For finite max. multiplicity=3: 0. . 3 Multiplicity notation is: Chapter 7 © Prentice Hall, 2004 min. . max 15
Associative Class l. A special purpose class that represents an association (relationship) between classes and contains attributes and/or relationships in its own right l Represented as a class connected to an association with a dotted line Chapter 7 © Prentice Hall, 2004 16
A Certificate represents a relationship between an employee and a course, and has an attribute pertaining to that relationship Chapter 7 © Prentice Hall, 2004 17
Special Relationships • Part-Whole One class represents the whole, and the other represents the part (e. g. , Team—Player). • Generalization l One class forms a broader category and the l other class is a sub-category (e. g. , superclass = Employee, subclasses = Part. Time. Employee, and Full. Time. Employee). Inheritance works. Chapter 7 © Prentice Hall, 2004 18
496e02efc24a6bbc9b681f6887a3d1e3.ppt