Data Modeling: Understanding Entities, Relationships, and Business Rules, Summaries of Business

An introduction to data modeling, explaining its importance and the basic building blocks. It covers entities, attributes, relationships, and constraints, as well as business rules and their role in database design. The historical evolution of data models is also discussed.

Typology: Summaries

2021/2022

Uploaded on 08/05/2022

nguyen_99
nguyen_99 🇻🇳

4.2

(80)

1K documents

1 / 13

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Chapter 2
Objectives: to understand
Data modeling and why data models are
important
The basic data-modeling building blocks
What business rules are and how they influence
database design
How the major data models evolved historically
How data models can be classified by level of
abstraction
CS275 Fall 2010 1
Introduction to Data Modeling
Data modeling reduces complexities of database
design
Designers, programmers, and end users see data
in different ways
Different views of same data lead to designs that
do not reflect organization’s operation
Various degrees of data abstraction help
reconcile varying views of same data
CS275 Fall 2010 2
Data Modeling and Data Models
Model: an abstraction of a real-world object or
event
Useful in understanding complexities of the real-
world environment
Data models
Relatively simple representations of complex real-
world data structures
Often graphical
Creating a Data model is iterative and progressive
CS275 Fall 2010 3
The Importance of Data Models
Facilitate interaction among the designer, the
applications programmer, and the end user
End users have different views and needs for data
Data model organizes data for various users
Data model is a conceptual model - an abstraction
It’s a graphical collection of logical constructs
representing the data structure and relationships
within the database.
Cannot draw required data out of the data model
An implementation model would represent how
the data are represented in the database.
CS275 Fall 2010 4
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Data Modeling: Understanding Entities, Relationships, and Business Rules and more Summaries Business in PDF only on Docsity!

Chapter 2

Objectives: to understand

  • Data modeling and why data models are important
  • The basic data-modeling building blocks
  • What business rules are and how they influence database design
  • How the major data models evolved historically
  • How data models can be classified by level of abstraction

CS275 Fall 2010 1

Introduction to Data Modeling

  • Data modeling reduces complexities of database design
  • Designers, programmers, and end users see data in different ways
  • Different views of same data lead to designs that do not reflect organization’s operation
  • Various degrees of data abstraction help reconcile varying views of same data

CS275 Fall 2010 2

Data Modeling and Data Models

  • Model: an abstraction of a real-world object or event - Useful in understanding complexities of the real- world environment
  • Data models
    • Relatively simple representations of complex real- world data structures - Often graphical
  • Creating a Data model is iterative and progressive

CS275 Fall 2010 3

The Importance of Data Models

  • Facilitate interaction among the designer, the applications programmer, and the end user
  • End users have different views and needs for data
  • Data model organizes data for various users
  • Data model is a conceptual model - an abstraction
  • It’s a graphical collection of logical constructs representing the data structure and relationships within the database. - Cannot draw required data out of the data model - An implementation model would represent how CS275 Fall 2010the data are represented in the database. 4

Data Model Basic Building Blocks

Terminology

  • Entity: anything about which data are to be collected and stored
  • Attribute: a characteristic of an entity
  • Relationship: describes an association among entities - One-to-many (1:M) relationship - Many-to-many (M:N or M:M) relationship - One-to-one (1:1) relationship
  • Constraint: a restriction placed on the data

CS275 Fall 2010 5

Business Rules

  • Descriptions of policies or principles within an organization
  • Description of operations or procedures, to create/enforce actions within an organization’s environment - Must be in writing and kept up to date - Must be easy to understand and widely disseminated - Sometimes externally defined, i.e. government regulations.
  • These describe characteristics of data as viewed by the company CS275 Fall 2010 6

Discovering Business Rules

  • Sources of business rules:
    • Company managers
    • Policy makers
    • Department managers
    • Written documentation
      • Procedures
      • Standards
      • Operations manuals
    • Direct interviews with end users
  • CS275 Fall 2010 Always verify sources of information 7

Importance of Business Rules

  • Standardize company’s view of data
  • Useful as a communications tool between users and designers
  • Allows the designer to
    • understand the nature, role, and scope of data
    • understand business processes
    • develop appropriate relationship participation rules and constraints
  • Promotes the creation of an accurate data model

CS275 Fall 2010 8

Hierarchical Structure

CS275 Fall 2010 13

Hierarchical Structure

  • Each parent can have many children
  • Each child has only one parent
  • Tree is defined by path that traces parent segments to child segments, beginning from the left
  • Hierarchical path
    • Ordered sequencing of segments tracing hierarchical structure
  • Preorder traversal or hierarchic sequence
    • “Left-list” path CS275 Fall 2010 14

The Hierarchical Model

  • GUAM (Generalized Update Access Method)
    • Based on the recognition that the many smaller parts would come together as components of still larger components
  • Information Management System (IMS)
    • World’s leading mainframe hierarchical database system in the 1970s and early 1980s
  • TCDMS/ADABAS – jointly developed by IBM and Lane County

CS275 Fall 2010 15

The Hierarchical Model

  • Advantages
    • Conceptual simplicity
    • Database security
    • Data independence
    • Database integrity
    • Efficiency
      • Disadvantages
        • Complex implementation
        • Difficult to manage
        • Lacks structural independence
        • Complex applications programming and use
        • Implementation limitations
        • Lack of standards CS275 Fall 2010 16

The Network Model

  • The network model was created to represent complex data relationships more effectively than the hierarchical model - Improves database performance - Imposes a database standard - Represent complex data relationships more effectively – such as child w/ multiple parents
  • Conference on Data Systems Languages (CODASYL)
  • American National Standards Institute (ANSI)
  • Database Task Group (DBTG) CS275 Fall 2010 17

The Network Model

  • Collection of records in 1:M relationships
  • A Set is a relationship and composed of two record types: - Owner: Equialent to the hierarchical model’s parent - Member: Equivalent to the hierarchical model’s child

CS275 Fall 2010 18

The Network Model Components

  • Concepts still used today:
    • Schema: Conceptual organization of entire database as viewed by the database administrator
    • Subschema : Database portion “seen” by the application programs
    • Data management language (DML): Defines the environment in which data can be managed
    • Data definition language (DDL): Enables the administrator to define the schema components

CS275 Fall 2010 19

The Network Model

  • Advantages:
    • Conformance to standards
    • Handled more relationship types
    • Data access flexibility
      • Disadvantages of the network model: - System complexity - Lack of ad hoc query capability placed burden on programmers to generate code for reports - Structural change in the database could produce havoc in all CS275 Fall 2010 application programs 20

The Relational DBMS Application

  • SQL-based relational database application involves three parts: - User interface - Allows end user to interact with the data - Set of tables stored in the database - Each table is independent from another - Rows in different tables are related based on common values in common attributes - SQL “engine” - Executes all queries

CS275 Fall 2010 25

The Relational Implementation Model

  • Advantages
    • Structural independence
    • Improved conceptual simplicity
    • Easier database design, implementation, management, and use
    • Ad hoc query capability (SQL)
    • Powerful database management system - Disadvantages - Substantial hardware and system software overhead - Can facilitate poor design and implementation - May promote “islands of information” problems

CS275 Fall 2010 26

Logical/Conceptual Model

The Entity Relationship Model

  • Widely accepted standard for data modeling
  • Introduced by Chen in 1976
  • Graphical representation of entities and their relationships in a database structure
  • Entity relationship diagram (ERD)
    • Uses graphic representations to model database components
    • Entity is mapped to a relational table

CS275 Fall 2010 27

The Entity Relationship Model

  • Entity instance (or occurrence) is row in table
  • Entity set is collection of like entities
  • Connectivity labels types of relationships
  • Relationships are expressed using Chen notation
    • Relationships are represented by a diamond
    • Relationship name is written inside the diamond
  • Crow’s Foot notation used as design standard in this book

CS275 Fall 2010 28

CS275 Fall 2010

Logical/Conceptual Model

The Object-Oriented (OO) Model

  • Models both data and relationships contained in a single structure known as an object
  • OODM (object-oriented data model) is the basis for OO-DBMS (Semantic data model)
  • An object is described by its factual content:
    • Are self-contained: a basic building-block for autonomous structures
    • Is an abstraction of a real-world entity
    • Contains information about relationships between facts within the object and with other objects. CS275 Fall 2010 30

The Object-Oriented (OO) Model

  • An Object is the logical abstraction or basic building block for autonomous structures - Attributes describe the properties of an object - Objects that share similar characteristics are grouped in classes - Classes are organized in a class hierarchy - Inheritance: an object inherits methods and attributes of parent class - UML - Unified Modeling Language is used to graphically model a system - based on OO concepts that describe diagrams and CS275 Fall 2010 symbols 31 CS275 Fall 2010

The Development of Data Models

CS275 Fall 2010

Data Models: A Summary

  • Each new data model capitalized on the shortcomings of previous models
  • Common characteristics:
    • Conceptual simplicity with semantic completeness
    • Represent the real world as closely as possible
    • Real-world transformations (behavior) must comply with consistency and integrity characteristics
  • Some models better suited for some tasks

CS275 Fall 2010 38

SPARC Framework :

Degrees of Data Abstraction

  • Database designer starts with abstracted view, then adds details
  • ANSI Standards Planning and Requirements Committee (SPARC) - Defined a framework for data modeling based on degrees of data abstraction (1970s): 1. External 2. Conceptual 3. Internal

CS275 Fall 2010 39

The SPARC External Model

  • Represents the End users’ view of the data environment
  • ER diagrams represent external views
  • External schema: specific representation of an external view - Entities - Relationships - Processes - Constraints

CS275 Fall 2010 40

The External Model

  • End users’ view of the data environment
  • Requires that the modeler subdivide set of requirements and constraints into functional modules that can be examined within the framework of their external models
  • Advantages:
    • Easy to identify specific requirements to support each business unit’s operations
    • Facilitates designer’s job by providing feedback about the model’s adequacy
    • Ensures security constraints in database design

CS275 Fall 2010– Simplifies application program development 41

External Models showing two different Users Conceptual Model

CS275 Fall 2010 42

The SPARC Conceptual Model

  • Represents global view of the entire database
    • All external views integrated into single global view: conceptual schema
  • Representation of data as viewed by high-level managers
  • ER Diagram graphically represents the conceptual schema - ER model most widely used conceptual model
  • Basis for identification and description of main data objects, avoiding details

CS275 Fall 2010 43

The Conceptual Model

Advantages

  • Provides a relatively easily understood macro level view of data environment
  • Independent of both software and hardware
    • Does not depend on the DBMS software used to implement the model
    • Does not depend on the hardware used in the implementation of the model
    • Changes in hardware or software or do not affect database design at the conceptual level

CS275 Fall 2010 44

Summary

  • Hierarchical model
    • Set of one-to-many (1:M) relationships between a parent and its children segments
  • Network data model
    • Uses sets to represent 1:M relationships between record types
  • Relational model
    • Current database implementation standard
    • ER model is a tool for data modeling
      • Complements relational model

CS275 Fall 2010 49

Summary

  • Object-oriented data model: object is basic modeling structure
  • Relational model adopted object-oriented extensions: extended relational data model (ERDM)
  • OO data models depicted using UML
  • Data-modeling requirements are a function of different data views and abstraction levels - Three SPARC abstraction levels: external, conceptual, internal

CS275 Fall 2010 50