Professional Documents
Culture Documents
Chapter 6: Data-Base
Modeling and Applications
Introduction
We use the term Data Base to mean the
collected data sets that are organized and
stored as an integral part of a firms computerbased information system
Data Sets are flexible data structures that
include groupings of data that are logically
related
Characteristics of the
Database Approach
Data Independence - the separation of the data from
the various application programs and other accesses
by users
Data Standardization - data elements within a
database have standard definitions, thus stored data
are compatible with every application program that
accesses the data
One-Time Data Entry and Storage - individual data
values are entered into the database only once;
consequently, redundancy is reduced and
inconsistencies between data elements are eliminated
Characteristics of the
Database Approach
Data Integration - data sets integrate the data,
which enables all affected data sets to be updated
simultaneously
Shared Data Ownership - all data within a
database are owned in common by the users. The
portion of the database that is of interest to each user
is known as the sub-schema
Centralized Data Management - the database
management system stands guard over the database
and presents the logical view to users and
application programs
Program-Data
Independence
Application
Program A
Database
Management
System
Application
Program B
Figure 6-1
Database
Cost-benefit Analysis
Effective usage Analysis
Analysis
Enterprise Diagram
User Requirements
Data requirements
Report Layouts
Data Flows
Screen Layouts
DBMS Selection
Data Definition Language (DDL)
Data Manipulation language (DML)
Query language [Structured Query Language (SQL) and/or
Query by Example (QBE)]
Data-base Control System (DBCS)
DBMS
Many DBMS packages allow users to:
Analyze Data
Prepare ad hoc or customized Reports
Create and Display Graphs
Create Customized Applications via
Programming Languages
Import and Export Data
Perform On-line Editing
Purge or Archive Obsolete Data
Backup data
Maintain Security Measures
Interface with Communication Networks
Maintenance
Entity-Relationship Model
Relative to the detailed nature of Record layouts and
data dictionaries, Entity-Relationship (E-R) Models
provide a broader and more conceptual view of the
firms data
A Data Model documents the key entities in a firm
and the relationships or associations among those
entities
An Entity is an object that exists and is identifiable.
e.g., an agent, event, or a resource
Entity-Relationship Model
Conventions
Rectangles represent entities and diamonds represent
relationships.
Each rectangle is usually denoted by the attributes of
the entity.
E-R Diagrams can easily model the information
needs of the entire enterprise or segments of the
enterprise such as divisions or departments, and even
detailed data issues such as detailed data repositories
such as records and/or tables.
Database Relationships
In a database, relationships occur among data
elements for two reasons:
Because of the nature of the elements themselves.
e.g., the relationship between a customer no. and a
customer name
Because of the need to retrieve
information from a database in
some prescribed manner. e.g.,
customers and invoices.
Kinds of Relationships
A Many-to-Many Relationship:
Variation of Figure 6-6
Customers
April
June
Summers
y
Bu
Product A
n
Products
Figure 6-6
Product B
Product C
Product D
Relational Databases
In a relational database, data are perceived by
users to be structured in the form of simple flat
files or tables
Each table consists of records that are
comprised of a key and associated data
elements
In order to lay claim as a relational database, it
must do the following:
Select
Cust
No.
1000
Adam
Smith
3-12-62 1000
CA
1010
Lord
2-29-64 2000
Keynes
TX
Student_Major
Estudiante Garcia
French
Madeleine Notallbright
International Relations
Student_Major
Latin
Greek
Tibetan
Student_Name Student_Major
Penny Pasta
Latin
Student_Status
Senior
Freshman
Junior
Join
Customer_Name
Customer_Code
John Doe
1001
Customer_Code
Credit_Limit
1001
10,000
Customer_ Customer_
Name
Code
Credit_Limit
10,000
FROM PROJ.TABL
WHERE CLIENT_NO = 531
Query-by-Example (QBE)
Use of Dynasets
Relational Databases:
Advantages & Disadvantages
Advantages
Ease of use for nontechnical users
Flexible structure
English-like commands
or menus
Easy structural changes
Disadvantages
Relative inefficiency
Huge storage space
required
More redundancy than
other data base
structures
Not suitable for highvolume applications
Hierarchical Database
Structure
The hierarchical data structure (or tree structure)
expresses hierarchical relationships among stored data.
The root node is at the top and for
any
two adjacent records, the elder
or
higher-level record is called the
parent
record.
record
The younger or lower-level record
is
called the child record and any
two
records on the same level are called sibling records.
records
Salesperson
Invoice
Salesperson
Line
Item 1
Line
Item 2
Hierarchical Conceptual
Model - III
In this model, pointers must
be stored either within the
records or in separate index
files
Customer A
Rec.
Address
Rec.
Content
Forward
Pointer
1
2
3
Cust A
Cust B
Inv 10
4
6
0
Inv 9
Inv 16
Inv 8
Inv 12
Invoice 10 7
Rec.
Content
Forward
Pointer
1
2
3
Cust A
Cust B
Inv 10
4
6
0
Inv 9
Inv 16
Inv 8
Inv 12
Network Database
Structure
The network data structure handles complex
relationships among records by linking related
records together with pointer fields
Pointer fields are embedded in each record
and contain disk addresses of related records
The pointers maintain the data relationships,
thereby enabling an AIS to prepare familiar
reports
Network Conceptual
Model - I
In this model there is no distinct data hierarchy.
This enables network models to handle all types of
relationships
complexity
Simple networks contain one-to-many relationships
Complex networks contain many-to-many
relationships. Usually these are reduced to numerous
one-to-many relationships through intersection
records
Network Conceptual
Model - II
Products
Customer
Product
Cust-Prod
Object-Oriented
Database Structure - I
The object-oriented database (OODB) is
a new type of database that stores objects
with (non-textual) information in them
These unstructured objects may be
graphic images, still photographs,
animated visual, music and speeches
Objects are grouped into object classes,
classes
with each member of the class having the
same set of attributes, which can be
manipulated
Object-Oriented
Database Structure - II
Object Classes feature class hierarchies
Super-classes are at the top of the hierarchies,
with classes and sub-classes linked below
Movement within class hierarchies is
downward from super-class to class to
subclass
Classes may also form sidewise associations,
associations
e.g., association of university person with
university; faculty with academic dept
Characteristics of Objects
Attributes
Make
Model
Year
Object
Drive
Operations
Engine
Size
Mileage
Car
Park
Lock
Wash
Color
Characteristics of Objects
Attributes
Part No.
Description
Qty
on Hand
Object
Reduce
Operations
Reorder
Point
Order
Qty
Supplier
No.
Inventory
Review
Qty
Reorder
Replace
Object-Oriented
Database Structure - III
OODBs feature:
Encapsulation:
Encapsulation Storing procedures or operations
called methods with the data to which the methods relate.
This brings together the data attributes and operations pertaining
to objects and object classes
Because of encapsulation, the application programs that access
the data base can be greatly simplified, thereby reducing
programming errors
Inheritance Between
CONTROL
Classes
Operations:
Object
Class
Verify key
before Update
*
Other
*
operations
*
Object
Subclasses
ACCT-PAY
ACCT-REC
INVENTORY
Attributes:
Ven-Num (key)
*
Other
*
Attributes
*
Attributes:
Cust-Num (key)
*
Other
*
Attributes
*
Attributes:
Part-Num (key)
*
Other
*
Attributes
*
Copyright 2000 John Wiley & Sons, Inc. All rights reserved.
Reproduction or translation of this work beyond that permitted in
Section 117 of the 1976 United States Copyright Act without the express
written permission of the copyright owner is unlawful. Request for
further information should be addressed to the Permissions Department,
John Wiley & Sons, Inc. The purchaser may make back-up copies for
his/her own use only and not for distribution or resale. The publisher
assumes no responsibility for errors, omissions, or damages, caused by
the use of these programs or from the use of the information contained
herein.