0% found this document useful (0 votes)
3 views18 pages

Lecture 2 Data Model

The document discusses the importance of data modeling in database design, emphasizing the need for different views of data to align with organizational operations. It outlines the basic building blocks of data models, including entities, attributes, relationships, and constraints, as well as the significance of business rules in defining data characteristics. Additionally, it introduces the Entity Relationship Model as a standard for representing entities and their relationships in a database structure.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views18 pages

Lecture 2 Data Model

The document discusses the importance of data modeling in database design, emphasizing the need for different views of data to align with organizational operations. It outlines the basic building blocks of data models, including entities, attributes, relationships, and constraints, as well as the significance of business rules in defining data characteristics. Additionally, it introduces the Entity Relationship Model as a standard for representing entities and their relationships in a database structure.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 18

NATIONAL INSTITUTE OF

TRANSPORT

DEPARTMEN
T
CCT

Basic Database Management System–


ITT 04205

R . Mero
Prepared
By:
10/02/2023

Dat
e:
Introduction

• 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
• Data modeling reduces complexities of
database design
• Various degrees of data abstraction help
reconcile varying views of same data

Database Systems 2
Data Modeling and Data Models

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

Database Systems 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 an abstraction
– Cannot draw required data out of the data
model

Database Systems 4
Database Systems 5
Database Systems 6
Data Model Basic Building Blocks
• 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

Database Systems 7
Business Rules
• Data becomes meaningful only when it reflects properly
defined business rules.
• Business Rule is a Descriptions of policies, procedures,
or principles within a specific organization
– It Apply to any organization that stores and uses data
to generate information
• Derived from Description of operations 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
• Describe characteristics of data as viewed by the
company

Database Systems 8
Discovering Business Rules

• Sources of business rules:


– Company managers
– Policy makers
– Department managers
– Written documentation
• Procedures
• Standards
• Operations manuals
– Direct interviews with end users

Database Systems 9
Discovering Business Rules (cont’d.)
• The process of identifying and documenting
business rules is essential to database
design for several reasons:
– Standardize company’s view of data
– Communications 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
Database Systems 10
Translating Business Rules into
Data Model Components
• Nouns translate into entities
• Verbs translate into relationships among entities
• Relationships are bidirectional
• Two questions to identify the relationship type:
– How many instances of B are related to one
instance of A?
– How many instances of A are related to one
instance of B?

Database Systems 11
1
2

Business Rules Example 1

a) A company operates many departments.

b) Each department employs one or more employees.

c) Each of the employees might or might not have one or


more dependents.

d) Each employee might or might not have an


employment history.

Database Systems 12
1
3

Business Rules Example 2

a) A department employs many employees, but each employee is


employed by one department.
b) Some employees, known as “rovers,” are not assigned to any
department.
c) A division operates many departments, but each department is
operated by one division.
d) An employee may be assigned many projects, and a project may
have many employees assigned to it.
e) A project must have at least one employee assigned to it.
f) One of the employees manages each department, and each
department is managed by only one employee.
g) One of the employees runs each division, and each division is run by
only one employee.
13
1
4

Business Rules Example 3


a) An INVOICE is written by a SALESREP. Each sales
representative can write many invoices, but each
invoice is written by a single sales representative.
b) The INVOICE is written for a single CUSTOMER.
However, each customer can have many invoices.
c) An INVOICE can include many detail lines (LINE),
each of which describes one product bought by the
customer.
d) The product information is stored in a PRODUCT
entity.
e) The product’s vendor information is found in a
VENDOR entity
Database Systems 14
Naming Conventions

• Naming occurs during translation of business


rules to data model components
• Names should make the object unique and
distinguishable from other objects
• Names should also be descriptive of objects in
the environment and be familiar to users
• Proper naming:
– Facilitates communication between parties
– Promotes self-documentation

Database Systems 15
The Entity Relationship Model

• Widely accepted standard for data modeling


• Introduced by Peter 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

Database Systems 16
The Entity Relationship Model
(cont’d.)
• 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

Database Systems 17
Database Systems 18

You might also like