Sie sind auf Seite 1von 16

<Insert Picture Here>

Data Models
By
Rajesh Kumar

Data Model Basic Building


Blocks

Entity

Anything about which data will be collected/stored

Attribute
Characteristic of an entity

Relationship
Describes an association among entities
One-to-one (1:1) relationship
One-to-many (1:M) relationship
Many-to-many (M:N or M:M) relationship

Constraint
A restriction placed on the data
2

Business Rules

Brief, precise and unambiguous descriptions of


policies, procedures or principles within the
organization

Describe characteristics of the data as viewed by the


company

Translating Business Rules


to Data Model Components
Standardize companys view of data
Communication tool between users and designers
Allow designer to understand the nature, role and scope
of data
Allow designer to understand business processes
Allow designer to develop appropriate relationship
participation rules and constraints

Promote creation of an accurate data model


Nouns translate into entities
Verbs translate into relationships among entities
Relationships are bi-directional
4

The Relational Model

Conceptually simple Linked Tables


Developed by Edgar F. Codd (IBM 1970 )
Considered ingenious but impractical in 1970
Computers lacked power to implement the relational model

Todays PCs run sophisticated relational databases


5

Relational Model Tables

Also called relations


Matrix of row and column intersections
Stores a collection of similar entities
Resembles a file or spreadsheet

Purely logical structure


How data are physically stored is of no concern to
the user or the designer
The source of a real database revolution
6

Relational Model Relational


Diagram
Representation of
relational databases
Entities (Tables)
Attributes within those
entities (Fields)
Relationships between
those entities (Links)

The Relational Model SQL

Structured Query Language (SQL)


Allows ad hoc queries questions of the data

User can specify what must be done without


specifying how it must be done
Dominance due in great part to its powerful and
flexible query language
SQL-based relational database application:
User interface
A set of tables stored in the database
SQL engine
8

Entity Relationship Model (ERM)

Introduced by Peter Chen in 1976


Widely accepted and adapted graphical tool for
data modeling
Graphical representation of entities and their
relationships in a database structure
9

The External Model

Each end users view of the data environment


Modeler subdivides requirements and constraints into
functional (Business units) modules

These can be examined within the framework of their


external models
10

External Model Advantages

Easy to identify specific data required to


support each business units operations
Facilitates designers job by providing
feedback about the models adequacy
Creation of external models helps to identify
and ensure security constraints in the
database design
Simplifies application program development

11

The Conceptual Model (1

of 2)

Global view of the entire database


Representation of data as viewed by the entire
organization
Basis for identification and high-level description of
main data objects, avoiding details
12

The Conceptual Model (2

of 2)

Software and hardware independent


Independent of DBMS software
Independent of hardware to be used
Changes in either hardware or DBMS
software have no effect on the database
design at the conceptual level

Most widely used conceptual model is


the Entity Relationship (ER) model
Provides a relatively easily understood
macro level view of data environment

13

The Internal Model

The database as seen by the DBMS


Maps the conceptual model to the DBMS
Depicts a specific representation of an internal model
Logical independence
Can change the internal model without affecting the conceptual
model
14

The Physical Model

Lowest level of abstraction


Describes the way data are saved on
storage media such as disks or tapes

Software and hardware dependent


Requires database designers to have a
detailed knowledge of the hardware and
software used to implement database
design

Physical independence
Can change the physical model without
affecting the internal model

15

Degrees of Data Abstraction - Summary

16