Data Modeling 101 UC Berkeley Extension Copyright © 2000 Patrick McDermott

Slides:



Advertisements
Similar presentations
Zen & The Art of Oriented / Objects College of Alameda Copyright © 2006 Patrick McDermott With a tip of the hat to: Herrigel, Eugen,
Advertisements

Assignment I, part 1. Groups of three students. Specify one as group leader. group names to TA and me. Create an object-oriented conceptualization.
Modeling the Data: Conceptual and Logical Data Modeling
FIS 431/631 Financial Information Systems: Analysis and Design REA Modeling Joe Callaghan Oakland University Department of Accounting & Finance.
Copyright ©2004 Cezary Z Janikow 1 Domain Model n Visualization of entities and relationships n In UP presented as Class Diagrams – Classes, Relationships,
From Class Diagrams to Databases. So far we have considered “objects” Objects have attributes Objects have operations Attributes are the things you record.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Slide 1 Chapter 7 Structural Modeling. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
Agenda for Week 1/31 & 2/2 Learn about database design
A Quick Review of Analysis Stages of the Systems Development Life Cycle Planning Analysis Design Construction.
FIS 431/631 Financial Information Systems: Analysis and Design ERD & Normalization Joe Callaghan Oakland University Department of Accounting & Finance.
Systems Analysis and Design in a Changing World, 6th Edition
Database Design Concepts Lecture 7 Introduction to E:R Modelling Identifying Entities.
Chapter 9 Domain Models 1CS6359 Fall 2012 John Cole.
1 CSE 403 Design and UML Class Diagrams Reading: UML Distilled Ch. 3, by M. Fowler These lecture slides are copyright (C) Marty Stepp, They may not.
CSCI 242 Relational Data Modeling Copyright 2011, David C. Roberts, all rights reserved.
The Unified Modeling Language (UML) Class Diagrams.
Entity-Relationship Design
The chapter will address the following questions:
Entity-Relationship Modeling I The cautious seldom err. Confucius.
CSE314 Database Systems Data Modeling Using the Entity- Relationship (ER) Model Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
CRC Cards C lass  R esponsibility  C ollaborator Copyright © 1999 Patrick McDermott UC Berkeley Extension Although not strictly part.
Database Design Sections 4 & 5 Subtype, Supertype, Mutually exclusive, non-transferability, transferable, 1:1, 1:M, M:M, Redundant, Intersection entity,
Introduction to Sequence Diagrams
Database Design Sections 6 & 7 Second Normal Form (2NF), Unique Identifiers (UID), Third Normal Form (3NF), Arcs, Hierarchies and Recursive relationships.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Big Java Chapter 12. Software Process - Waterfall Analysis Design Implementation Testing Deployment Does not work well when rigidly applied! established.
Object Oriented Analysis & Design & UML (Unified Modeling Language)1 Part V: Design The Design Workflow Design Classes Refining Analysis Relationships.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 4th Edition Copyright © 2012 John Wiley & Sons, Inc. All rights.
UML Diagrams: Class Diagrams The Static Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
MIS 3053 Database Design & Applications The University of Tulsa Professor: Akhilesh Bajaj ER Model Lecture 1 © Akhilesh Bajaj, 2000, 2002, 2003, 2004.
Slide 1 Structural Modeling Chapter 7. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 4 Domain Classes.
Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand.
Which ERAT? Entity Relationship Attribute Trigger Copyright © 1999 Patrick McDermott.
Chapter 5 Models and UML Notation for The Object-Oriented Approach.
Unit 1 INTRODUCTION TO MODELING AND CLASS MODEL Ref : L7-UML.PDF.
Conceptual Modeling Modeling the Problem Domain. Conceptual Modeling Decompose problem space into comprehensible concepts. Clarify the terminology or.
1 Entity-Relationship Diagram. 2 Components of ERD: –Entity –Relationship –Cardinality –Attributes.
Section 08 (a)ER Modelling In Practice1 HSQ - DATABASES & SQL And Franchise Colleges 08 (a) ER Modelling In Practice QUICKHIRE Car Company.
Lecture 6: Structural Modeling
Relationships II Copyright © 1999 Patrick McDermott UC Berkeley Extension Earth’s Interrelated Systems & Climate NASA.
Structural Modeling Chapter 7. Key Ideas A structural or conceptual model describes the structure of the data that supports the business processes in.
1 Structural Modeling Chapter 7. 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business processes.
Subtypes Copyright © 1999 Patrick McDermott UC Berkeley Extension
Design Model Lecture p6 T120B pavasario sem.
Object Oriented Analysis and Design Class and Object Diagrams.
Relationships Copyright © 1999 Patrick McDermott UC Berkeley Extension Mary Cassatt (1844–1926) Mother and Child against a Green Background.
Chapter 17 – Object- Oriented Design. Chapter Goals To learn about the software life cycle To learn about the software life cycle To learn how to discover.
12 OBJECT-ORIENTED DESIGN CHAPTER
Information Access Mgt09/12/971 Entity-Relationship Design Information Level Design.
Slide 1 Systems Analysis and Design with UML Version 2.0, Second Edition Alan Dennis, Barbara Haley Wixom, and David Tegarden Chapter 7: Structural Modeling.
Conceptual Design to Logical Design Lecture 4. Aims  To introduce Business Rules  To identify what a Business Rule is  To Introduce Business Operations.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
CSC 480 Software Engineering PSP Project 2 August 27, 2004.
Detailed Data Modeling. Outline Data Modeling Modeling Constructs –Entities –Relationships –Cardinality Model Basic Rules Advanced Rules Prototyping Process.
Class Diagrams Chapter 3. Classes and Objects Classes are the descriptions –definitions Objects are the things –instances.
McGraw-Hill/Irwin© 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 17 Object-Oriented Design and Modeling Using the UML.
McGraw-Hill/Irwin Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 6 Modeling the Data: Conceptual and Logical Data Modeling.
Unified Modeling Language (UML)
1 Database Design Sections 6 & 7 First Normal Form (1NF), Second Normal Form (2NF), Unique Identifiers (UID), Third Normal Form (3NF), Arcs, Hierarchies.
Data Modeling Using the Entity- Relationship (ER) Model
Let try to identify the conectivity of these entity relationship
Chapter 5: Structural Modeling
Sequence Diagrams.
Sequence Diagrams.
Sequence Diagrams.
Copyright 2007 Oxford Consulting, Ltd
Database Management system
Presentation transcript:

Data Modeling 101 UC Berkeley Extension Copyright © 2000 Patrick McDermott

The Answer to Every Data Modeling Question IT DEPENDS

The Sour of Babel

Levels of Analysis

1. Initial List of Entities Brainstorming. Grammatical Analysis. Prototyping. Derive from Use Cases. Derive from Workflow diagrams.

Brainstorming Rules 0. Have Fun!!! 1. No Criticism 2. No Self-Censorship 3. Piggyback Quantity not Quality

Brainstorming 1. Brainstorm 2. Reward 3. Reality Check 4. Fuse & Fission 5. Combine –Categorize 6. Select –Consensus –Multi-Vote Most Fun Most Ideas Most Bizarre, Strange or Ridiculous NOT: the Best idea. RewardSteps

Grammatical Analysis Classes are Nouns Relationships are Verbs Attributes are Adjectives Methods are Phrases –Including an action and a C,R,A

2. CRC Cards A ResponsibilityCollaborator Another ResponsibilityCollaborator A Great ResponsibilityCollaborator NAME

Entity Class A Business Object A Thing the Business needs to know about. At this stage, a business person should be able to understand every one of them. “Class” is best defined by examples…

Examples of Classes People Places Things Events Roles Organizations Other Systems Tangible Intangible Collections of Other Objects Conceptual: Cost Center, Account Interface: Screen Infrastructure: Date, Money, Address Persistence: Database Control

There must be a Class if… There’s a form There’s a file There’s a number There are several copies It’s Important NOTE— –Sections and boxes on Forms –The name might not be obvious

Classes have Responsibilities Know Things –Invoice: Know the Customer Do Things –Invoice: Compute Total Obligation or Contract

A Responsibility might need a Collaborator Another class that assists in performing the Responsibility –Has information (knows) –Helps Do It No need to List Both Directions Personification, or messaging, can help

3. Make a Rough Diagram Only Major Classes or Subject Areas and major relationships need to be detailed at this stage. Show Plain Old Relationships –Just draw a line from each class to its collaborators without trying to discriminate types of relationships or multiplicity. –Give relationships names that are verbs. You may list any key attributes or methods (responsibilities) identified. After playing, transfer to paper or tool.

STUDENT Name Address Telephone Enroll() Party() Flunk() DropOut() TEACHER Class STUDENT Name Address Telephone Enroll() Party() Flunk() DropOut() Name Attributes Methods Collaboration

4. Defining Details Descriptions for Entities Names for Relationships Count Entities & Relationships Define Primary Keys Attributes need not be detailed yet, but the major, defining or forgettable attributes can be recorded.

5. Add Cardinality 1-to-1 1-to-Many M2M –Many-to-Many relationships are okay at this point.

Cardinality 1 to 1 1 to Many Many to Many 11 1 ** *

6. Distinguish Generalizations For each relationship, ask, –“Is this a kind-of relationship?” If necessary, distinguish Aggregations, –And if so inclined, compositions. –Bill of Materials

Types of Relationship USES: Association –Default; those that aren’t one of the others IS-A: Generalization HAS-A: Aggregation IS-Made-From: Composition –“A form of aggregation with strong ownership and coincident lifetime of parts by the whole.” – Rumbaugh, Reference, p. 226 –I don’t bother distinguishing from Aggregation

Employee EMPLOYEE Name Address Telephone GetHired() GetPaid() ChangeJobs() Quit() BlueCollar HourlyRate Union GetPaid() PayUnion() Grieve() WhiteCollar Salary GetStock()

Inheritance Symbology EMPLOYEE WhiteCollarBlueCollar

7. Add Optionality For each relationship ask: “Is this mandatory?” Many-to-Many relationships are suspect at this point and most of them should be resolved.

Multiplicity Is it Mandatory or Optional Is zero a number??? Hottentots: 1, 2, Many Programmers: 1,  Analysts: 0, 1, Many UML: Exact Count –Car has 4 wheels, triplets 3; 2 areas for Tennessee IS degree

Optionality Optional 1 to Mandatory 1 Mandatory 1 to Optional Many Optional Many to Mandatory Many * * 0.. * O O O

8. List all Attributes Class by class, in excruciating detail, you must discover all attributes. Use brainstorming, forms analysis, interviews, whatever. Detail any Attributive Classes, and any look-up tables. Attributes are facts about classes

9. State or Object Diagrams Consider State Diagrams for critical classes that have important or confusing transitions or structural aspects. Consider Interaction Diagrams (sequence and/or collaboration) if the structural construction of classes is complex or confusing.

Coke Machine Nothing WorksCoin Return Works Coin Return, Selection Work No Money Some Money Enough Money I Feel Coke!

B/L vs Invoice Customer –B/L 2 –Invoice 1 Vessel –B/L Yes –Invoice No Multiple # –B/L Yes –Invoice No B/L # Obligation CustomerVoyage 1 * 1.. * * * 0..1

:B/L # :Obligation :Customer:Voyage 1 * 1.. * * * 1 B/LInvoice :B/L # :Obligation :Customer:Voyage 1 1 * * 0 1

10. Resolve Many-to-Many 1Stick a Box in the Middle 2Flip the Asterisks (Arrows) In 3Migrate the Keys 4Find a Name 5Add attributes 6See if it’s already there

Order to Product ORDER PRODUCT ORDER PRODUCT ITEM Quantity Price # # # # # # * * * *

11. Painstaking Review Normalize: The Key, the Whole Key and Nothing but the Key, so help me Codd. Actually, just a means to a painstakingly careful review.

12. Define all Variables Class by class, in excruciating detail, you must fully define all variables needed to support your attributes. –Data type –Valid values –Required or optional

13. Define all Methods Using use cases or sequence diagrams. Class by class, in excruciating detail, you must fully define all methods. –Return type –Parameters –Required or optional

14. De-Normalize Determine Implementational Multiplicity. –You might have to modify your ideals for practical reasons. –You might have to modify your ideals for performance reasons. BUT, force proof of the necessity You usually go too far before you’ve gone far enough.

Party!