Documente Academic
Documente Profesional
Documente Cultură
Environment
Mr. JEFFERSON I. CAADA
Instructor
Objectives
Definition of terms
Explain growth and importance of databases
Name limitations of conventional file
processing
Identify categories of databases
Explain advantages of databases
Identify costs and risks of databases
List components of database environment
Describe evolution of database systems
Chapter 1
Definitions
Database: organized collection of logically
related data
Data: stored representations of meaningful
objects and events
Structured: numbers, text, dates
Unstructured: images, video, documents
Chapter 1
Chapter 1
Duplicate Data
Chapter 1
10
Chapter 1
11
SOLUTION:
The DATABASE Approach
12
Invoicing
System
Payroll
System
DBMS
Central database
Contains employee,
order, inventory,
pricing, and
customer data
Chapter 1
13
Chapter 1
14
Program-data independence
Planned data redundancy
Improved data consistency
Improved data sharing
Increased application development
productivity
Enforcement of standards
Improved data quality
Improved data accessibility and
responsiveness
Reduced program maintenance
Improved decision support
Chapter 1
15
Chapter 1
16
Chapter 1
17
software
storehouse
of
18
19
entities
and
Relational Databases
Database
technology
involving
tables
(relations)
representing
entities
and
primary/foreign
keys
representing relationships
Database Applications
Chapter 1
20
Chapter 1
21
Chapter 1
22
Chapter 1
23
Chapter 1
24
Chapter 1
25
26
Client/server system
architecture
Chapter 1
27
28
Chapter 1
29
Chapter 1
30
Chapter 1
31
Chapter 1
32
Evolution of DB Systems
Chapter 1
33
Chapter 1
34
Planning
Planning
Analysis
Logical Design
Physical Design
Database activity
early conceptual data
modeling
Chapter 1
Implementation
Maintenance
35
Planning
Analysis
Analysis
Logical Design
Physical Design
Database activity
thorough conceptual data
modeling
Chapter 1
Implementation
Maintenance
36
Planning
Analysis
Logical Design
Logical
Design
Physical Design
Database activity
logical database
design
Chapter 1
Implementation
Maintenance
37
Planning
Analysis
Logical Design
Deliverableprogram/data
structures, technology
purchases, organization
redesigns
Physical
Design
Physical Design
Database activity
physical database design
(physical data
organization, database
processing programs)
Chapter 1
Implementation
Maintenance
38
Planning
Analysis
Logical Design
Deliverableoperational
programs, documentation,
training materials
Physical Design
Database activity
database implementation,
including coded programs,
documentation, installation
and conversion
Chapter 1
Implementation
Implementation
Maintenance
39
Planning
Deliverableperiodic audits
Analysis
Logical Design
Physical Design
Database activity
database
maintenance,
performance
analysis and tuning,
error corrections
Chapter 1
Implementation
Maintenance
Maintenance
41
Chapter 1
42
43
people
management
using
project
management tools (Gantt charts, etc.)
Events and points in time (when processes are
performed)
Reasons for events and rules (e.g. decision tables)
Chapter 1
IT500: INFORMATION TECHNOLOGY
44
Information Engineering
A data-oriented methodology to create and
maintain information systems
Top-down planning: a generic IS planning
methodology
for
obtaining
a
broad
understanding of the IS needed by the entire
organization
Four steps to Top-Down planning:
Planning
Analysis
Design
Implementation
Chapter 1
45
Chapter 1
46
goals
what
we
hope
to
Chapter 1
47
48
Chapter 1
49
50
Planning Matrixes
Describe relationships between planning
objects in the organization
Types of matrixes:
Function-to-data entity
Location-to-function
Unit-to-function
IS-to-data entity
Supporting function-to-data entity
IS-to-business objective
Chapter 1
Data Entity
Types
Business
Function (users)
Customer
Product
Raw Material
Order
Work Center
Work Order
Invoice
Equipment
Employee
51
Business Planning
Product Development
Materials Management
Order Fulfillment
Order Shipment
Sales Summarization
Production Operations
Finance and Accounting
X X
X
X
X
X
X X
X
X X X X
X X X X X
X
X X
X
X
X X X X X
X X X X
X
X
X
X
X
X X
X
X
X X
X
X
X X
X X
52
Prototyping
Chapter 1
53
Project Initiation
and Planning
Analysis
Logical Design
Physical Design
Implementation
Maintenance
Chapter 1
54
Chapter 1
55
Chapter 1
56
CASE
Computer-Aided Software Engineering (CASE)
software tools providing automated support for
systems development
Three database features:
Data modeling entity-relationship diagrams
Code generation SQL code for table creation
Repositories knowledge base of enterprise
information
Chapter 1
57
Managing Projects
Project a planned undertaking of related activities
to reach an objective that has a beginning and an
end
Involves use of review points for:
Validation of satisfactory progress
Step back from detail to overall view
Renew commitment of stakeholders
Incremental commitment review of systems
development project after each development phase
with rejustification after each phase
Chapter 1
58
Systems analysts
Database analysts
Users
Programmers
Database/data administrators
Systems programmers, network administrators,
testers, technical writers
Chapter 1
59
Gantt Chart
Shows time estimates of tasks
Chapter 1
60
PERT Chart
Shows dependencies between tasks
Chapter 1
62
Business Rules
Statements that define or constrain some
aspect of the business
Assert business structure
Control/influence business behavior
Expressed in terms familiar to end users
Automated through DBMS software
Chapter 1
63
Chapter 1
64
Chapter 1
65
Data Definitions
Explanation of a term or fact
Term word or phrase with specific meaning
Fact association between two or more terms
Guidelines for good data definition
Gathered in conjunction with systems requirements
Accompanied by diagrams
Iteratively created and refined(developing data
model test your understanding of the meaning of
data)
Achieved by consensus
Chapter 1
66
Chapter 1
67
Attribute
symbols
A special entity
that is also a
relationship
Relationship
symbols
Relationship
degrees
specify number
of entity types
involved
Chapter 1
Relationship
cardinalities
specify how
many of each
entity type is
allowed
68
Chapter 1
69
Inappropriate entities
ystem user
Chapter 1
System output
70
Appropriate entities
Chapter 1
71
Identifiers (Keys)
Identifier (Key) an attribute (or combination
of attributes) that uniquely identifies individual
instances of an entity type
Simple vs. Composite Identifier
Chapter 1
72
Characteristics of Identifiers
Will not change in value
Will not be null
No intelligent identifiers (e.g. containing
locations or people that might change)
Substitute new, simple keys for long, composite
keys
Chapter 1
73
The identifier
is boldfaced
and
underlined
Chapter 1
74
75
Strong entity
Chapter 1
Weak entity
76
Relationships
Relationship Types vs. Relationship Instances
The relationship type is modeled as lines
between entity typesthe instance is between
specific entity instances
Two entities can have more than one type of
relationship between them (multiple relationships)
Chapter 1
77
b)
Relationship
instances
Chapter 1
78
Degree of Relationships
Degree of a relationship is the number of entity
types that participate in it
Unary Relationship
Binary Relationship
Ternary Relationship
Chapter 1
79
Degree of relationships
One entity
related to
another of
the same
entity type
Chapter 1
Entities of
two
different
types
related to
each other
Entities of
three
different
types related
to each other
80
Cardinality of Relationships
One-to-One: Each entity instance in the
relationship will have exactly one related entity
instance
One-to-Many: An entity instance on one side
of the relationship can have many related entity
instances, but an entity instance on the other
side will have a maximum of one related entity
instance
Many-to-Many: An entity instance on either
side of the relationship can have many related
entity instances on the other side
Chapter 1
81
Unary Relationship
Chapter 1
82
Binary Relationship
Chapter 1
83
Ternary Relationship
84
Cardinality Constraints
Cardinality Constraintsthe number of
instances of one entity that can or must be
associated with each instance of another entity
Minimum Cardinality
If zero, then optional
If one or more, then mandatory
Maximum Cardinality
The maximum number
Chapter 1
85
Chapter 1
86
Mandatory Cardinalities
A patient history is
recorded for one and
only one patient
Chapter 1
87
A project must be
assigned to at least
one employee, and
may be assigned to
many
Chapter 1
An employee can be
assigned to any number
of projects, or may not be
assigned to any at all
88
Optional Cardinalities
A person is
married to at
most one other
person, or may
not be married
at all
Chapter 1
89
Chapter 1
90
Associative Entities
An entity has attributes
A relationship links entities together
Chapter 1
91
Attributes
Attributeproperty or characteristic of an
entity or relationship type.
Classifications of attributes:
Simple versus Composite Attribute
Single-Valued versus Multivalued Attribute
Stored versus Derived Attributes
Identifier Attributes
Chapter 1
92
A composite attribute
An attribute
broken into
component
parts
Chapter 1
93
Chapter 1
94
Chapter 1
95
A composite attribute
An attribute
broken into
component parts
Multivalued
an employee can have
more than one skill
Chapter 1
Derived
from date
employed
and current
date
IT500: INFORMATION TECHNOLOGY
96
97
An associative entity
99
Relation
Definition: A relation is a named, twodimensional table of data
Table: relation
Row: record
Column: attribute, field
Chapter 1
100
Properties of Relation
It must have a unique name
Every attribute value must be atomic (not multivalued)
Every row must be unique (cant have two rows with
exactly the same values for all their fields)
Attributes (columns) in tables must have unique names
The order of the columns is irrelevant
The order of the rows is irrelevant
Chapter 1
101
Key Fields
Primary key: attribute(s) that
identifies each record
Ex: employee numbers, social
numbers, etc.
uniquely
security
field)
or
102
Primary Key
Foreign Key
103
Chapter 1
104
Integrity Constraints
Domain Constraints
Allowable values for an attribute.
Entity Integrity
No primary key attribute may be null.
All primary key fields MUST have data
Chapter 1
105
Chapter 1
106
Chapter 1
107
Referential
integrity
constraints are
drawn via
arrows from
dependent to
parent table
108
Well-Structured Relations
A
relation
that
contains
minimal
data
redundancy and allows users to insert, delete,
and update rows without causing data
inconsistencies
Goal is to avoid anomalies
Insertion Anomaly adding new rows forces
user to create duplicate data
Deletion Anomaly deleting rows may cause
a loss of data that would be needed for other
future rows
Modification Anomaly changing data in a
row forces changes to other rows because of
duplication
Chapter 1
109
Chapter 1
110
Chapter 1
111
Attributes
Attributeproperty or characteristic of an
entity or relationship type.
Classifications of attributes:
Simple versus Composite Attribute
Single-Valued versus Multivalued Attribute
Stored versus Derived Attributes
Identifier Attributes
Chapter 1
112
A composite attribute
An attribute
broken into
component
parts
Chapter 1
113
Chapter 1
114
Chapter 1
115
A composite attribute
An attribute
broken into
component parts
Multivalued
an employee can have
more than one skill
Chapter 1
Derived
from date
employed
and current
date
IT500: INFORMATION TECHNOLOGY
116
117
An associative entity
Logical Database
Design
119
Use
only
their
simple,
Chapter 1
120
Chapter 1
121
(A)
(B)
122
Chapter 1
123
Chapter 1
124
Chapter 1
125
Chapter 1
126
Foreign
key
Figure 8 Example of mapping
a 1:M relationship
Chapter 1
127
Chapter 1
128
Composite primary
key
Foreign
key
Foreign
key
New
intersectio
n relation
129
Chapter 1
130
B) Resulting relations
Chapter 1
131
Chapter 1
132
Chapter 1
133
Chapter 1
134
Chapter 1
135
Chapter 1
136
Chapter 1
137
138
139
(AND
N-ARY)
Chapter 1
140
141
It would be
But this
This is why
better to
makes a very
treatment
create a
cumbersome
date and
surrogate
key
time are
key like
included in
Treatment#
the
composite
primary key
Figure 14: Mapping a ternary relationship (cont.)
Chapter 1
Remember
that the
primary
key MUST
be unique
142
Chapter 1
143
Chapter 1
144
Chapter 1
-end of Lecture-