Data Management Concepts: 2013 Pearson Education, Inc. Publishing As Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Data Management Concepts: 2013 Pearson Education, Inc. Publishing As Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Data Management Concepts: 2013 Pearson Education, Inc. Publishing As Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Chapter 13
13– 1
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Learning Objective 1
13 – 2
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Databases
A database is a structured collection of data
stored in a computer system or network.
The data in a database are manipulated and
retrieved using database software.
A database together with related database
software is called a database management
system (DBMS).
13– 3
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Databases
Databases are frequently connected to
eBusiness software at the “back end.”
DBMS is separate from eBusiness software
product.
Database agnostic – software can
function with any DBMS.
SAP is database agnostic
13– 4
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Database Agnosticism
Permits upgrading or modifying the eBusiness
application without having to reorganize,
restructure, or otherwise modify the data or
database software
Permits multiple applications to share the same
database
Permits the data to be physically stored apart from
the application, which facilitates a client-server,
tiered-architecture environment in which multiple
users access a shared database
13– 5
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Field Basic Database Elements
Data Item
13– 6
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Basic Database Elements
A field may be a single character or number, or it
may be composed of many characters or numbers.
Examples:
Customer name
Employee Social Security Number
Purchase order number
Customer account number
A logical grouping of fields is called a record.
Records are groups of data items that concern an
entity such as an employee, a customer, a vendor, an
invoice, etc.
13– 7
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Data Occurrences
A record structure has occurrences, also
called instances.
A record occurrence is a specific set of data
values for the record.
For the record…
EMPLOYEE (NAME, NUMBER, AGE)
We might have the occurrence…
EMPLOYEE (Brown, 111222333, 33)
13– 8
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Fixed-and Variable-Length
Records
In a fixed-length record, both the number of
fields and the character length (character
size) of each field are fixed.
In variable-length records, the width of the
field can be adjusted for each data
occurrence.
A trailer record is an extension of a master
record.
13– 9
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Variable-Length Records
13– 10
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Variable-Length Records
The following data pertains to the parts inventory:
13– 12
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Variable-Length Records
Repeated groups are related groups of fields that
repeat themselves in variable-length records.
Fields that may give rise to more than one other field
are the parent.
In general the highest-level element in a tree diagram
is the parent; lower-level elements in the tree
diagram that are connected to the parent are called
children.
Nodes in the tree are referred to as repeated groups
(segments, groups, or nodes).
13– 13
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Tree Diagram for PART,
SUPPLIER, and LOCATION
13– 14
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Record Key and File Sequence
A key or record key is a data item or
combination of data items that uniquely
identifies a particular record in a file.
Primary sort key (primary key)
Secondary sort key (secondary key)
Tertiary sort key
Relative random order
13– 15
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Learning Objective 2
13 – 16
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Database Architecture
13– 17
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Conceptual Architecture
The Entity-Relationship (E-R) data model
is a conceptual model for depicting the
relationship between segments.
The term entity is used instead of
segments.
The term attribute refers to individual
fields or data items.
13– 18
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Database Architecture
13– 19
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Conceptual Architecture
The Object-oriented modeling technique
(OMT) views the components of the system
being modeled as object classes.
Object class corresponds to a table or
segment, and an object corresponds to a
particular instance or data record.
An inheritance relationship is created when
an object class is divided into subclasses.
13– 20
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Object-Oriented Data Model
13– 21
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Learning Objective 3
13 – 22
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Logical Data Structures
The relationship that exists between the
segments in the database are determined by the
logical data structure, also called the schema, or
database model.
Three major models of logical data structure:
1. Tree structure
2. Network structure
3. Relational model
13– 23
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Logical Data Structures
13– 24
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Logical Data Structures
Both tree and network structures are
implemented with embedded pointer fields,
which cross-link segments.
In a list organization (list structure), each record
contains one or more pointers (fields) indicating
the address of the next logical record with the
same attribute(s).
When a record is part of several lists it is called
multilist organization.
13– 25
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Logical Data Structures
A ring structure differs from a list structure in that
the last record in the ring points back to the first
record.
In a multiple-ring structure, several rings pass
through individual records.
Hypertext systems are pointer-based that allow users
to browse through databases in random fashion by
selecting key words or objects.
Semantic data networks are similar to hypertext
systems except the cross-linking can include
multimedia objects.
13– 26
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Logical Data Structures
13– 27
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Relational Data Structures
The relational model views the database as a
collection of two-dimensional tables.
The advantage over tree or network structures
is that there are no complicated pointers or
lists.
Using relational algebra information can be
extracted with three basic operations:
Selection
Join
Projection
13– 28
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Relational Data Structures
Certain rules called normal forms govern the
creation of tables.
The process of applying these rules is called
normalization.
Tables that satisfy these rules are said to be
normalized.
Tables that do not satisfy these rules are
unnormalized.
13– 29
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Relational Data Structures
The primary purpose of normalization is to
eliminate unnecessary duplication by dividing
tables:
First normal form – eliminate repeating groups
Second normal form – no key determines the
values of a non-key field
Third normal form – no non-key field determines
the values of another non-key field
13– 30
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Relational Data Structures
Terminology of relational databases:
Relation is synonymous with table.
Tuple refers to a row in a table.
13– 31
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Learning Objective 4
13 – 32
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Database Architecture: The
Physical Level
Three file-access methods:
Sequentially accessed files
Indexed files
Direct access files
13– 33
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Sequentially Accessed Files
In a sequential-access file, records can only
be accessed in their predefined sequence.
Sequential file organization is not a useful
means of storing data when only a small
number of records are accessed in a large
file.
Sequential files are useful in batch
processing, when all the records in the file
are accessed.
13– 34
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Sequentially Accessed Files
13– 35
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Indexed Files
An index file (inverted file) is where an
attribute can be extracted from the records in a
primary file and used to build a new file
whose purpose is to provide an index to the
original file.
A file is fully inverted when indexes exist for all
its fields.
An indexed-sequential file is a sequential file
that is stored on a DASD and is both indexed
and physically sorted on the same field (ISAM
files). 13– 36
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Indexed Files
13– 37
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Direct Access files
Direct-access files allow individual records to
be retrieved almost instantly without the use of
an index.
Each record is assigned to a storage location that
bears some relationship to the record’s key
values.
Most direct-access file systems convert a key to
a storage location address.
A randomizing transformation is a widely used
method for storing and locating records in a
direct-access file. 13– 38
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Direct Access Files
13– 39
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Economic Relations Between File
Organization Techniques
The basic economics of file processing are largely
determined by:
The activity ratio (the number of accessed records
divided by the number of records in the file), and
The desired response time for processing and
inquiries (the length of time the user must wait for
the system to complete an operation). Response
time is affected by:
Physical access time (disk access time)
Physical distribution of data records on the disk
13– 40
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Database Architecture and
Database Development
The classical approach to database design for
eBusiness applications is to use an E-R
(conceptual) model that is translated into a
relational database (logical model), which is
then implemented using ISAM and/or other
methods.
In the case of off-the-shelf, prepackaged
eBusiness applications, the database will
typically be generated automatically.
13– 41
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Database Architecture and
Database Development
A software database driver, also called a
database connector, can be used to connect
a business application to the DBMS.
Using a database driver, it is possible to
make the business application work with a
completely different DBMS by simply
changing the database driver.
13– 42
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Database Architecture and
Database Development
An alternate approach to database design is
the object-oriented (OO) modeling.
Advantage is that OO modeling can be readily
transferred into OO program code.
In practice, relational databases outperform
object-oriented databases and therefore the E-
R approach is the main approach used to
model databases.
13– 43
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Other Types of Logical Structures
and Related Databases
OLAP (OnLine Analytical Processing) is
viewed as a multidimensional
generalization of the two-dimensional
relational table.
The advantage of OLAP is that it provides
lightening fast responses to complicated
queries.
OLAP is used in data mining applications.
13– 44
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Other Types of Logical Structures
and Related Databases
In-Memory databases differ from
conventional databases in that the entire
database is loaded into computer-internal
high-speed RAM or other high-speed
electronic storage device.
The elimination of the relatively slow
physical disk media results in enormous
gains in speed.
13– 45
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
ACID: Reliable Processing of
Database Transactions
Fundamental requirements to ensure the reliability
of processing database transactions:
ACID (Atomicity, Consistency, Isolation, and
Durability):
Atomicity – the entire transaction is completed or no
part of it is completed.
Consistency – only valid data will be written to the
database.
Isolation – other operations cannot interfere with a
transaction that is being processed.
Durability – a transaction is not undone if the system
fails after it is completed.
13– 46
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Learning Objectives 5 & 6
13– 48
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
SQL Data Manipulation Language
SELECT – Retrieves rows from tables
UPDATE – Modifies the rows of tables
DELETE – Removes rows from tables
INSERT – Adds new rows to tables
13– 49
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
High-Level Query Languages
13– 50
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
High-Level Query Languages
Natural Language Database Query
Object Query Language
Java Data Objects Query Language
13– 51
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Why Database Management
Systems Are Needed
DBMSs integrate, standardize, and
provide security for various accounting
applications.
In the absence of integration, each type of
accounting application such as sales,
payroll, and receivables will maintain its
own separate, independent data files.
13– 52
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Data Independence
The solution to the problem with maintaining
independent files lies in separation of the
physical handling of data from their logical use -
it requires two fundamental changes:
Data is integrated into a single database.
All access to the integrated set of files (database)
is through a single software system.
A database dictionary is a collection of all data
item names, description, etc.
13– 53
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Database Management Concepts
13– 54
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Database Documentation and
Administration
Database dictionaries are used both alone
and with DBMSs to centralize, document,
control, and coordinate the use of data
within an organization.
The data dictionary is simply another file, a
sort of file or files, whose record
occurrences consist of data item
descriptions.
13– 55
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
Data Dictionary Format
13– 56
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood
End of Chapter 13
13 – 57
2013 Pearson Education, Inc. Publishing as Prentice Hall, AIS, 11/e, by Bodnar/Hopwood