Patterns of Data Modeling
eBook - ePub

Patterns of Data Modeling

  1. 261 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Patterns of Data Modeling

About this book

Best-selling author and database expert with more than 25 years of experience modeling application and enterprise data, Dr. Michael Blaha provides tried and tested data model patterns, to help readers avoid common modeling mistakes and unnecessary frustration on their way to building effective data models. Unlike the typical methodology book, Patterns of Data Modeling provides advanced techniques for those who have mastered the basics.

Recognizing that database representation sets the path for software, determines its flexibility, affects its quality, and influences whether it succeeds or fails, the text focuses on databases rather than programming. It is one of the first books to apply the popular patterns perspective to database systems and data models. It offers practical advice on the core aspects of applications and provides authoritative coverage of mathematical templates, antipatterns, archetypes, identity, canonical models, and relational database design.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Patterns of Data Modeling by Michael Blaha in PDF and/or ePUB format, as well as other popular books in Computer Science & Data Mining. We have over one million books available in our catalogue for you to explore.

Information

1

Introduction

Models provide the means for building quality software in a predictable manner. Models let developers think deeply about software and cope with large size and complexity. Developers can think abstractly before becoming enmeshed in the details of writing code. Although models are beneficial, they can be difficult to construct. That is where patterns come in. Patterns provide building blocks that help developers construct models faster and better.
This chapter starts with a discussion of models and then introduces the topic of patterns.

1.1 What Is a Model?

A model is an abstraction of some aspect of a problem. Most software models are expressed as graphical diagrams and by their form appeal to human intuition. Developers must understand a problem before attempting a solution. Models let developers express their understanding of a problem and communicate it to others — technologists, business experts, users, managers, and other project stakeholders. Developers can focus on the essence of an application and defer implementation details. Chapter 8 of [Blaha-2001] lists additional reasons for building models.
There are various kinds of models (such as data models, state-transition models, and data-flow models) that are used for databases, programming, and other purposes. This book concerns data models and the focus is on databases.

1.2 Modeling Notation

Data modeling has no widely-accepted, dominant notation. To appeal to a broad audience, this book uses two notations—UML (Unified Modeling Language) and IDEF1X—and presents most patterns and models with both notations. These notations largely express the same content, so you can readily understand this book as long as you are fluent with either one. The Appendix summarizes both notations and gives references for further details.

1.2.1 UML

The UML’s data structure notation specifies entities and their relationships. This sets the scope and level of abstraction for subsequent development. The UML encompasses about a dozen notations of which one (the class model) concerns data structure.
The UML data structure notation derives from the original Chen notation [Chen-1976]. The Chen notation and its derivatives have been influential in the database community, but there are many dialects and a lack of consensus. This UML data structure model is just another Chen dialect, but one that has the backing of a standard. The Object Management Group has been actively working towards standardizing all of the UML notations.
The UML is normally used in conjunction with object-oriented jargon which I avoid. Object-oriented jargon connotes programming which I do not intend. This book’s focus is on data modeling.

1.2.2 IDEF1X

The IDEF1X notation [Bruce-1992] specifies tables, keys, and indexes. IDEF1X also is a standard language and has been in use for many years. IDEF1X is closer to database design than the UML and more clearly shows the details of patterns.

1.2.3 Using Both Notations

In my consulting practice, I use both notations. I start with the UML to conceive the abstractions of an application. Then I translate the ideas into IDEF1X and add database details. From IDEF1X I generate database code. The UML is good for abstract modeling and not for database design. IDEF1X is good for database design and not for abstract modeling. Both notations are useful, but each has its place.

1.3 What Is a Pattern?

This book defines a pattern as a model fragment that is profound and recurring. A pattern is a proven solution to a specified problem that has stood the test of time. Here are some other definitions from the literature.
• A pattern solves a problem in a context. [Alexander-1979]
• “A pattern for software architecture describes a particular recurring design problem that arises in specific design contexts, and presents a well-proven generic scheme for its solution.” [Buschmann-1996]
• “A pattern is a template. It’s a template that is an example worthy of emulation, and something observed from things in actuality. It’s a template to a solution, not a solution. It’s a template that has supporting guidelines (not so much that it keeps one from seeing how it might be used in novel ways).” [Coad-1994]
“A pattern is a template of interacting objects, one that may be used again and again by analogy.” [Coad-1995]
• “A pattern … provides a proven solution to a common problem individually documented in a consistent format and usually as part of a larger collection.” [Erl-2009]
• “A pattern is an idea that has been useful in one practical context and will probably be useful in others.” [Fowler-1997]
• “A design pattern systematically names, motivates, and explains a general design that addresses a recurring design problem… It describes the problem, the solution, when to apply the solution, and its consequences.” [Gamma-1995]
• “A pattern describes a problem to be solved, a solution, and the context in which that solution works. It names a technique and describes its costs and benefits. Developers who share a set of patterns have a common vocabulary for describing their designs, and also a way of making design trade-offs explicit. Patterns are supposed to describe recurring solutions that have stood the test of time.” [Johnson-1997]
• “A pattern is a recurring solution to a standard problem… Patterns have a context in which they apply.” [Schmidt-1996]
• A pattern is “a form or model proposed for imitation.” [Webster’s dictionary]
• “In general, a pattern is a problem-solution pair in a given context. A pattern does not only document ‘how’ a solution solves a problem but also ‘why’ it is solved, i.e. the rationale behind this particular solution.” [Zdun-2005]
Since this book is about data modeling, the patterns focus on data structure (entities and relationships). I de-emphasize attributes as they provide fine details that can vary for applications.

1.4 Why Are Patterns Important?

Patterns have many benefits.
Enriched modeling language. Patterns extend a modeling language—you need not think only in terms of primitives; you can also think in terms of frequent combinations. Patterns provide a higher level of building blocks than modeling primitives. Patterns are prototypical model fragments that distill the knowledge of experts.
Improved documentation. Patterns offer standard forms that improve modeling uniformity. When you use patterns, you tap into a language that is familiar to other developers. Patterns pull concepts out of the heads of experts and explicitly represent them. Development decisions and rationale are made apparent.
Reduce modeling difficulty. Many developers find modeling difficult because of the intrinsic abstraction. Patterns are all about abstraction and give developers a better place to start. Patterns identify common problems and present alternative solutions along with their trade-offs.
Faster modeling. With patterns developers do not have to create everything from scratch. Developers can build on the accomplishments of others.
Better models. Patterns reduce mistakes and rework. Each pattern has been carefully considered and has already been applied to problems. Consequently, a pattern is more likely to be correct and robust than an untested, custom solution.
Reuse. You can achieve reuse by using existing patterns, rather than reinventing solutions. Patterns provide a means for capturing and transmitting development insights so that they can be improved on and used again.

1.5 Drawbacks of Patterns

Even though patterns have much to offer, they are not a panacea for the difficulties of software development.
Sporadic coverage. You cannot build a model by merely combining patterns. Typically you will use only a few patterns, but they often embody core insights.
Pattern discovery. It can be difficult to find a pertinent pattern, especially if the idea in your mind is ill-formed. Nevertheless, this difficulty does not detract from the benefits when you find a suitable pattern.
Complexity. Patterns are an advanced topic and can be difficult to fully understand.
Inconsistencies. There has been a real effort in the literature to cross reference other work and build on it. However, inconsistencies still happen.
Immature technology. The patterns literature is active but the field is still evolving.

1.6 Pattern vs. Seed Model

It is important to differentiate between patterns and seed models. The programming pattern books, such as [Gamma-1995], have true patterns that are abstract and stand apart from any particular application. In contrast most of the database literature ([Arlow-2004], [Fowler-1997], [Hay-1996], [Silverston-2001a,b]) confuses patterns with seed models.
A seed model is a model that is specific to a problem domain. A seed model provides a ...

Table of contents

  1. Cover
  2. Half Title
  3. Title Page
  4. Copyright Page
  5. Dedication
  6. Table of Contents
  7. Preface
  8. Chapter 1 Introduction
  9. Part I: Mathematical Templates
  10. Part II: Antipatterns
  11. Part III: Archetypes
  12. Part IV: Identity
  13. Part V: Canonical Models
  14. Part VI: Relational Database Design
  15. Appendix A Explanation of the UML Notation
  16. Appendix B Explanation of the IDEF1X Notation
  17. Appendix C Glossary
  18. Index