You are previewing Mastering Data Modeling: A User-Driven Approach.
O'Reilly logo
Mastering Data Modeling: A User-Driven Approach

Book Description

Data modeling is one of the most critical phases in the database application development process, but also the phase most likely to fail. A master data modeler must come into any organization, understand its data requirements, and skillfully model the data for applications that most effectively serve organizational needs.

Mastering Data Modeling is a complete guide to becoming a successful data modeler. Featuring a requirements-driven approach, this book clearly explains fundamental concepts, introduces a user-oriented data modeling notation, and describes a rigorous, step-by-step process for collecting, modeling, and documenting the kinds of data that users need.

Assuming no prior knowledge, Mastering Data Modeling sets forth several fundamental problems of data modeling, such as reconciling the software developer's demand for rigor with the users' equally valid need to speak their own (sometimes vague) natural language. In addition, it describes the good habits that help you respond to these fundamental problems. With these good habits in mind, the book describes the Logical Data Structure (LDS) notation and the process of controlled evolution by which you can create low-cost, user-approved data models that resist premature obsolescence. Also included is an encyclopedic analysis of all data shapes that you will encounter. Most notably, the book describes The Flow, a loosely scripted process by which you and the users gradually but continuously improve an LDS until it faithfully represents the information needs. Essential implementation and technology issues are also covered.

You will learn about such vital topics as:

  • The fundamental problems of data modeling

  • The good habits that help a data modeler be effective and economical

  • LDS notation, which encourages these good habits

  • How to read an LDS aloud--in declarative English sentences

  • How to write a well-formed (syntactically correct) LDS

  • How to get users to name the parts of an LDS with words from their own business vocabulary

  • How to visualize data for an LDS

  • A catalog of LDS shapes that recur throughout all data models

  • The Flow--the template for your conversations with users

  • How to document an LDS for users, data modelers, and technologists

  • How to map an LDS to a relational schema

  • How LDS differs from other notations and why

  • "Story interludes" appear throughout the book, illustrating real-world successes of the LDS notation and controlled evolution process. Numerous exercises help you master critical skills. In addition, two detailed, annotated sample conversations with users show you the process of controlled evolution in action.

    Table of Contents

    1. Foreword
    2. Preface
      1. Logical Data Structures and Physical Data Storage
      2. Summary
      3. Exercises
      1. Employ the Users’ Language and Vocabulary
      2. Be Rigorous
      3. Don’t Rely on the Opinion of a Single Expert; Ask Several
      4. Ask First About Data, Not About Processing
      5. Master the Shapes of Data
      6. Use a Notation That Helps You Realize These Good Habits
      7. Summary
      8. Exercises
      1. Sentences About What Users Can Remember
      2. Sentences About Differentiating Things from Each Other
      3. Sentences You Should Not Say
      4. Some Complete Examples
      5. Summary
      6. Exercises
      1. Vocabulary Overview
        1. To-be <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">Relationship</em>
        2. Not-to-be <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">Relationship</em>
      2. A Bit More About Entities, Attributes, and Relationships
      3. LDS Reading Rules Revisited
      4. Responsibility for Speaking Well
      5. Summary (and a Chance to Check Your Progress)
      6. Exercises
      1. Show the Data and Say Something About It
      2. Plan Your Notes by Considering Elemental Parts of the LDS
      3. As You Visualize Data, Don’t Lose Sight of the Goal
      4. Exercises
      1. Summary
      2. Exercises
      1. Definition of Shape
      2. Mastering Shapes
      3. Reading a Shape Aloud in Several Ways
      4. Visualizing Sample Data in Several Formats
      5. Discussing and Illustrating Noteworthy Disallowed Data
      6. Finding and Focusing on Shapes Within a Large LDS
      7. Recognizing the Differences Between Shapes That Are Similar but Not Identical
      8. Recognizing the Similarity Between Seemingly Dissimilar Shapes
      9. Distinguishing Between Legitimate Shapes and Syntactically Invalid LDS Fragments
      10. Knowing How Shapes Are Likely to Evolve
      11. Asking Questions That Help Users Choose Between Two Similar Shapes
      12. Knowing When to Ask Questions of Users
      13. Knowing When and How to Modify the LDS to Make a Shape Evolve
      14. Understanding the Relative Frequency of the Various Shapes
      15. Referring to each Fundamental Shape by Its Name
      16. Exercises
      1. Shape: Common Independent Entity
      2. Shape: Lonely-Attribute Independent Entity
      3. Shape: Aggregate Independent Entity
      4. Shape: Dependent Entity
      5. Shape: Intersection Entity
      6. Shape: Subordinate Entity
      7. Shape: One-Many Collection Entity
      8. Shape: Many-Many Collection Entity
      9. Unnamed Possibilities
      10. Exercises
      1. Scale
      2. Shape: Nominal-Scale Attributes
      3. Shape: Numeric-Scale Attributes
      4. Shape: Ordinal-Scale Attributes
      5. Shape: Boolean-Scale Attributes
      6. Scale and Datatype
      7. Scale and Attribute Names
      8. Fine Distinctions of Scale
      9. Scale and Abstract Datatypes
      10. Summary of How Scale Restricts an Attribute
      11. Exercises
      1. Two Entities, One Relationship
      2. One-Many Shapes
      3. One-One Shapes
        1. <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">Shape:</em> To-be To-be <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">One-One Relationship</em>
        2. <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">Shape:</em> Not-to-be Not-to-be <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">One-One Relationship</em>
        3. <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">Shape:</em> To-be To-be <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">One-One Relationship Making a Subordinate Entity</em>
        4. <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">Shape: Plain</em> To-be To-be <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">One-One Relationship</em>
        5. <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">Shape: Plain</em> Not-to-be Not-to-be <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">One-One Relationship</em>
        6. <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">Shape:</em> Not-to-be Not-to-be <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">One-One Relationship Making a Subordinate Entity</em>
      4. Many-Many Shapes
      5. Two Entities, Two Relationships
      6. One-One and One-Many Relationship
      7. Two One-Many Relationships
      8. Two Entities, <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">n</em> Relationships Relationships
      9. Exercises
      1. Shape: Chicken Feet In
      2. Shape: Chicken Feet Out
      3. Shape: Chicken Feet Across
      4. Shape: Subordinates Out
      5. Shape: Subordinates Across
      6. Shape: Multiple Plain <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">To-be</em> Relationships Relationships
      7. Shape: Multiple <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">To-be</em> Relationships Relationships
      8. Shape: Multiple Short Paths
      9. Exercises
      1. Shape: One-One Reflexive Relationship
      2. Sequence Data and Cyclic Sequence Data
      3. Ordered Pairs
      4. Shape: One-Many Reflexive Relationship
      5. Shape: Many-Many Reflexive Relationship
      6. Exercises
      1. Within Any LDS, Each Entity, Attribute, Relationship, and Link Has an Official Name That Is Unique
      2. No Reflexive Relationship Is a <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">To-be</em> Relationship Relationship
      3. Between Any Pair of Entities, There Is at Most One <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">To-be</em> Relationship Relationship
      4. Each Entity Has at Least One Identifier
      5. An Entity Can Have Several Identifiers
      6. No Identifier Can Be a Strict Subset of Another
      7. The LDS Cannot Contain Any Cycles of Identification Dependency
      8. No Link of a Reflexive Relationship Can Contribute to an Identifier
      9. Both Links of a Relationship Cannot Contribute to Identifiers
      10. A Single-Descriptor Identifier Cannot Include the Degree-One Link of a One-Many Relationship
      11. A Multiple-Descriptor Identifier Cannot Include a Link of a One-One Relationship
      12. A Multiple-Descriptor Identifier Cannot Include the Degree-Many Link of a One-Many Relationship
      13. A Relationship Has Either Two Labels or Zero Labels
      14. All One-One Relationships Have Labels
      15. All Reflexive Relationships Have Labels
      16. Between Any Pair of Entities, There Is at Most One Unlabeled Relationship
      17. Valid Relationships
      18. Exercises
      1. Entity Names
      2. Working with Users to Get the Entity Names Right
      3. Naming Attributes
      4. Naming Relationships and Links
      5. Exercises
      1. Official Names Can Be Awkward
      2. A Few Notes About Official Names and <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">To-be</em> Relationships Relationships
      3. Exercise
      1. Exercises
      1. The Audience
      2. Front Matter
      3. Entity Documentation
      4. Attribute Documentation
      5. Link Documentation
      6. Relationship Documentation
      7. Fragment Documentation
      8. Constraint Documentation
      9. Issues List
      10. Supplemental Material for Secondary Audiences
      11. Exercise
      1. Script for The Flow
      2. Discussing a <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">Not-to-be</em> Relationship Relationship
      3. Flow Stage: <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">Not-to-be</em> Relationship Relationship
      4. Flow Investigation: Seek a Chicken Foot
      5. Flow Investigation: Seek a One-Many Relationship
      6. Flow Investigation: Seek a Many-Many Relationship
      7. Flow Stage: One-One, <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">Not-to-be</em> Relationship Relationship
      8. Flow Stage: One-Many Relationship
      9. Flow Stages: Initial Many-Many Relationship and New Intersection Entity
      10. Developing a Chicken-Feet-In Shape
      11. Flow Investigation: Seek Descriptors for Intersection Entity
      12. Flow Investigation: Seek Tiebreaker
      13. Flow Investigation: Consider Overidentification
      14. Flow Investigation: Seek Independent Entity
      15. Discussing a <em xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">To-be</em> Relationship Relationship
      16. Flow Investigation: Consider Synonymy
      17. Flow Investigation: Consider Subordination
      18. Continuing the Discussion
      19. Flow Continuation: Seek Other Relationships
      20. Flow Continuation: Seek Further Evolution for a One-Many Relationship
      21. Flow Continuation: Seek Further Evolution for the Chicken-Feet-Across Shape
      22. Flow Continuation: Seek Further Evolution for the Chicken-Feet-In Shape
      23. Exercises
      1. Discovering Entities
      2. Fixing Identifiers
      3. Seeking Descriptors
      4. Promoting Attributes
      5. Relocating Misplaced Descriptors
      6. Exercises
      1. Redrawing the Diagram
      2. Altering the Overall Style of an LDS
      3. Changing the Level of Abstraction
      4. Exercises
      1. Meeting with Users from the General Offices
      2. Meeting with Veterinary Epidemiologists
      3. Meeting with Economic Analysts
      4. Exercises
      1. Constraint Definition Requires a Stabilized Data Model
      2. Many Candidate Constraints Turn Out to Be False
      3. Many Constraints Subject a Data Model to Premature Obsolescence
      4. Worthy Constraints
      5. Constraints and Shifting the Burden
      6. Summary and Final Thoughts
      7. Exercise
      1. The Meta-LDS
      2. Discussion
      3. Summary
      4. Exercises
      1. Overall Decisions
      2. Decisions About Entities
      3. Decisions About Identifiers
      4. Decisions About Attributes
      5. Decisions About Relationships
      6. Decisions About Links
      7. Decisions About Descriptors
      8. Decisions About Constraints
      9. Summary and Final Thoughts
      10. Exercises
      1. Relational Databases
      2. Mapping an LDS to a Relational Schema
      3. LDS and Normal Forms
      4. Summary
      5. Exercises
      1. Set Recipes
      2. Graph Recipes
      3. Matrix Recipes
      4. Taxonomy and Near Taxonomy Recipes
      5. Exercises