R McFadyen 7-192.2911 Chapter 7 Conceptual Data Modeling.

Slides:



Advertisements
Similar presentations
Object-oriented modeling Class/Object Diagrams
Advertisements

Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Jan 2003Ron McFadyen Generalization (Ch 26) a generalization is a relationship between a general thing (the superclass or parent class) and a.
1 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred.
System Analysis - Data Modeling
Chapter 14 (Web): Object-Oriented Data Modeling
Lecture Eleven Entity-Relationship Modelling
Chapter 4 ENTITY-RELATIONSHIP MODELLING.
Systems Analysis and Design in a Changing World, 6th Edition
Chapter 2: Entity-Relationship Model (Continued)
Entity-Relationship (E-R) Model
Chapter 4 Entity-Relationship modeling Transparencies © Pearson Education Limited 1995, 2005.
Chapter 14: Object-Oriented Data Modeling
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas.
Entity-Relationship modeling Transparencies
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
1 © Prentice Hall, 2002 CMIS564: E/R Modeling Dr. Bordoloi Based on Chapter 3; Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott,
1 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred.
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
UML Unified Modeling Language. What is UML? Unified Modeling Language (UML) is a standardized, general-purpose modeling language in the field of software.
Entity-relationship Modeling Transparencies 1. ©Pearson Education 2009 Objectives How to use ER modeling in database design. The basic concepts of an.
Chapter 5 Entity–Relationship Modeling
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 8 Slide 1 Chapter 9 Structuring System Data Requirements.
Entity Relationship Modeling
Conceptual Data Modeling. What Is a Conceptual Data Model? A detailed model that shows the overall structure of organizational data A detailed model.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 4 - Domain Classes.
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 4 Domain Classes.
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
CHAPTER 13 (ONLINE): OBJECT-ORIENTED DATA MODELING © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
1 © Prentice Hall, 2002 Chapter 14: Object-Oriented Data Modeling Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R.
7-1 © Prentice Hall, 2004 Chapter 7: Conceptual Data Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
7-1 © Prentice Hall, 2007 Chapter 7: Conceptual Data Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 15: Object-Oriented Data Modeling Modern Database Management 9 h Edition Jeffrey A.
Unit 3 Conceptual Data Modeling. Key Concepts Conceptual data modeling process Classes and objects Attributes Identifiers, candidate keys, and primary.
7-1 © Prentice Hall, 2007 Week 5: Conceptual Data Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 13 (Online): Object-Oriented Data Modeling Modern Database Management 10 th Edition.
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
CHAPTER 13: OBJECT-ORIENTED DATA MODELING (OVERVIEW) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
Initial Design of Entity Types for the COMPANY Database Schema Based on the requirements, we can identify four initial entity types in the COMPANY database:
Chapter 11 & 12 Entity-Relationship (E-R) Model Characteristics of E-R Model Components of E-R Model Example of E-R Model Enhanced E-R Model.
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
DeSiamorePowered by DeSiaMore1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Sept Ron McFadyen1 Class Diagram Begins as a conceptual or analysis class model and evolves to a design class model Used throughout the development.
2007ACS-3913 Ron McFadyen1 Class Diagram See Schaum’s UML Outline, especially chapters 4, 5, 6, 7.
Generalization (Ch 26) a generalization is a relationship between a general thing (the superclass or parent class) and a more specific kind of thing (the.
Object-Oriented Data Modeling
Entity Relationship Modeling
Object-Oriented Analysis and Design CHAPTERS 9, 31: DOMAIN MODELS 1.
Entity-Relation Model. E-R Model The Entity-Relationship (ER) model was originally proposed by Peter in 1976 ER model is a conceptual data model that.
advanced data modeling
January Ron McFadyen1 Domain Models Domain Model: a visual representation of conceptual classes or real-world objects in a domain of interest.
Data Modeling Using the Entity- Relationship (ER) Model.
Sept 2004Ron McFadyen Generalization (Ch 26) a generalization is a relationship between a general thing (the superclass or parent class) and a.
Entity-Relationship Modeling. 2 Entity Type u Entity type –Group of objects with same properties, identified by enterprise as having an independent existence.
Chapter 8 Entity-Relationship Modeling Pearson Education © 2009.
2007ACS-3913 Ron McFadyen1 Generalization a generalization is a relationship between a general thing (the superclass or parent class) and a more specific.
CHAPTER 13: OBJECT-ORIENTED DATA MODELING (OVERVIEW) Modern Database Management 11 th Edition Jeffrey A. Hoffer, V. Ramesh, Heikki Topi © 2013 Pearson.
Data Modeling Using the Entity- Relationship (ER) Model
Object-Oriented Modeling
Business System Development
Object Oriented Analysis and Design
Chapter 20 Object-Oriented Analysis and Design
a generalization is a relationship between a general thing (the
Systems Analysis – ITEC 3155 Modeling System Requirements – Part 2
Chapter 3: Modeling Data in the Organization
a generalization is a relationship between a general thing (the
ER MODELING Instructor: SAMIA ARSHAD
Presentation transcript:

R McFadyen Chapter 7 Conceptual Data Modeling

R McFadyen Topics topics: –Developing a conceptual data model from use cases –UML notations for conceptual data modeling –UML class diagram bears a resemblance to an Entity Relationship Diagram (see for ERDs)

R McFadyen Topics UML: –attributes –association, aggregation, and generalization –multiplicities, roles, …

R McFadyen

R McFadyen What Is a Conceptual Data Model? A detailed model that shows the overall structure of organizational data; it is independent of any database management system or other implementation considerations. Represented by UML class diagrams Sources: Current knowledge Existing system System documents / reports Interviews Use cases

R McFadyen Use cases are key inputs to conceptual data modeling.

R McFadyen

R McFadyen

R McFadyen Conceptual Data Model Elements Classes Attributes Identifiers Associations, aggregations, compositions Generalizations Time dimensions Integrity rules Security controls

R McFadyen What Is an Object? An entity that encapsulates data and behavior Examples: product, employee, order, line item Class – a set of objects that share the same attributes, operations, relationships, and semantics (abstract) Instance – a single object (concrete)

R McFadyen Instances We use a rectangular shape to represent a class. It may be shown with one, two or three compartments attributes operations Name of class

R McFadyen

R McFadyen Types of Attributes Simple attributes – contain single data item Identifiers – unique key value Multivalued attributes – contain multiple values simultaneously Composite attributes – group of related attributes

R McFadyen Stereotypes in Class Diagrams Stereotype – a construct that extends the UML vocabulary Identifier stereotype > for primary key Multivalued stereotype >

R McFadyen Primary key is a unique identifier; no two Student instances will have the same studentId value.

R McFadyen Multivalued attribute can contain multiple values; a student may have several phone numbers

R McFadyen Composite attributes have multiple components. They are treated as separate classes in conceptual data models. The attribute address is defined to be of type Address.

R McFadyen What Is a Relationship? A semantic connection between objects of one or more classes In UML, represented as a line connecting two or more class boxes (or connecting one class to itself) In UML, known as an association

R McFadyen This is association between two classes, and is known as a binary association: an employee works in a department. Binary associations are the most common type.

R McFadyen We use an adornment to indicate how to read the association: “an employee works in a department” works in

R McFadyen Roles identify the purpose of each class in the relationship. Rolenames are useful (much) later on when we have software classes with attributes referring to instances of classes Note that neither class has an attribute referring to object(s) of the other class – that would be an implementation detail

R McFadyen What Is Relationship Degree? The number of classes that participate in a relationship Main 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 –!NOTE. Our text differs from other texts in these definitions: Degree is the number of objects that participate – there is no Unary relationship. Instead of unary, the term recursive is used From text

R McFadyen A reflexive association reflexive

R McFadyen This example is related to a business rule that states a specific quantity of a Part is shipped by a Vendor to a Warehouse. The ternary relationship is expressed as in the following slide:

R McFadyen An n-ary association, n>2, is shown with a diamond symbol Part VendorWarehouse ships The diamond is the symbol used for a n-ary association

R McFadyen An analyst will likely promote the association to a full class. This changes the model so it now has four classes and three binary associations. Part VendorWarehouse ships Shipment

R McFadyen Multiplicity Associations can be: –One – to – one –One – to – many –Many – to – many

R McFadyen Multiplicity The range of the number of objects in a class that can or must be associated with each object of another class in an association. ** represents zero or more 0..*same meaning as above 1..*one or more 1..5one, two, three, four, or five 0,1zero or one 1exactly one 3exactly three Ranges use.. Enumeration uses,

R McFadyen Multiplicity notation is: min..max

R McFadyen Roles, especially for reflexive associations, make it clear how an object participates in the association. Here, one object is the supervisor and the other is the subordinate.

R McFadyen A reflexive association What are the multiplicities?

R McFadyen Associative Class An associative class is both a class and an association. It contains attributes and/or participates in relationships in its own right Represented as a class connected to an association with a dotted line Typically appears with a many-to-many association – there probably are attributes that describe the association

R McFadyen A Certificate represents a relationship between an employee and a course, and has an attribute pertaining to that relationship

R McFadyen In a many-to-many association, an object of one class can be associated with an object of the other class at most one time. This is true irrespective of whether we have an associative class or not: EmployeeCourse ** EmployeeCourse ** Certificate completes

R McFadyen Suppose an employee can take the same course more than once. We must promote the associative class to a full class: EmployeeCourse ** EmployeeCourse ** Certificate 11 dateCompleted Certificate dateCompleted

R McFadyen Reconsider marriedTo. Do we need an associative class? Do we need to promote an associative class to a full class?

R McFadyen Sometimes associative classes have their own relationships with other classes.

R McFadyen Types of Associations Association – no object is subordinate to any other. Aggregation – one class represents the whole, and the other represents the part, but there is no concept of ownership Composition – one class represents the whole, and the other represents the part; the whole contains or owns the part; the part cannot exist without the whole. Generalization/specialization –an association between a general thing (the superclass or parent class) and a more specific kind of thing (the subclass or child class)

R McFadyen Composition Aggregation

R McFadyen Generalization a generalization is an association between a general thing (the superclass or parent class) and a more specific kind of thing (the subclass or child class) Inheritance – A subclass inherits all the attributes and operations of its superclass; an instance of the subclass contains all the same information (plus more) as an instance of the superclass An instance of a subclass is also an instance of the superclass

R McFadyen Generalization (Ch 26) Multiple subclasses can be grouped to indicate they are related subclasses LibraryMember StaffMemberStudentMember It then becomes meaningful to consider certain constraints: complete, incomplete, disjoint, overlapping

R McFadyen Generalization Inheritance of attributes and behaviour: everything a LibraryMember can do, a StaffMember can do everything a LibraryMember can do, a StudentMember can do If a LibraryMember can borrow a book, so can a StaffMember and a StudentMember a StaffMember and a StudentMember have all the attributes the LibraryMember has, and possibly more Specialization: there are some things that a specialized class can do that a LibraryMember cannot LibraryMember StaffMemberStudentMember

R McFadyen example: a SavingsAccount is a specialized kind of BankAccount a ChequingAccount is a specialized kind of BankAccount a BankAccount is a specialized kind of Asset RealEstate is … Asset RealEstateBankAccountSecurity SavingsAccountChequingAccount

R McFadyen Payment Amount: money Cash Payment Credit PaymentCheque Payment Sale Pays-for 1 1 Every payment, regardless of whether it is cash, credit, or cheque, has an Amount and it is associated with a Sale CreditCardCheque *

R McFadyen Motivation for partitioning a conceptual class into subclasses: subclass has additional attributes of interest subclass has additional associations of interest subclass is operated on, handled, reacted to, or manipulated differently than the superclass or other subclasses the subclass concept represents an animate thing that behaves differently than the superclass or other subclasses

R McFadyen

R McFadyen Using the UML symbol

R McFadyen

R McFadyen

R McFadyen Multiple inheritance is complicated and not supported by all object- oriented programming languages.

R McFadyen This is a difficult model to work with. An employee could be a Secretary paid hourly, but another Secretary may be paid a salary.

R McFadyen Consider:

R McFadyen Instead of Figure 7.23, a modeler might use: Part BasicPartAggregate 1..* What is this? What does this allow us to build? Are there some common attributes for BasicPart and Aggregate? Are there common operations? Composed of subpart

R McFadyen Summary We have covered : –Developing data models from use cases –UML notation for conceptual modeling –Associations and multiplicity –Aggregation, composition, and generalization –Attributes: identifier, composite, multivalued, derived attributes