Vous êtes sur la page 1sur 55

File Processing and Data Management Concepts

Chapter 12

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 1

Learning Objective 1

Define the basic terms used in database technology.

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 2

Introductory Terminology

Field Data items Attribute Elements

These are used interchangeably to denote the smallest block of data that will be stored and retrieved.
12 3

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

Introductory Terminology

A field may be a single character or number, or it may be composed of many characters or numbers. Customer name Employee social security number Customer account number

Purchase order number

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 4

Introductory Terminology

Logical grouping of fields are called records. An employee A customer

A vendor

An invoice

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 5

Data Occurrences

A record occurrence is a specific set of data values for the record.

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 6

Data Occurrences
For the record EMPLOYEE (NAME, NUMBER, AGE) we might have the occurrence EMPLOYEE (Brown, 111222333, 33)

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 7

Fixed- and Variable-Length Records


In a fixed-length record, both the number of fields and the length (character size) of each field are fixed.
In variable-length records, the width of the field can be adjusted to each data occurrence. A trailer record is an extension of a master record.
2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood 12 8

Several Suppliers and Warehouses Example


PART_NO PNAME TYPE COST

PVEND the name of the vendor or supplier


WARHSE where the part is stored LOC the last two digits of the zip code
2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood 12 9

One Storage Location Example


PART (PART_NO, PNAME, TYPE, COST, PVEND #1, WARHSE #1, LOC#1, PVEND #2, WARHSE #2, LOC#2)

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 10

Repeated Groups
Repeated groups are related groups of fields that repeat themselves in variable-length records. Segments Groups Nodes

PART, SUPPLIER, and LOCATION can be written as follows:


PART (PART_NO, PNAME, TYPE, COST)
2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood 12 11

Tree Diagram for PART, SUPPLIER and LOCATION

PART

SUPPLIER

LOCATION

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 12

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 Tertiary sort keys Secondary sort key Relative random order
12 13

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

Learning Objective 2

Identify the three levels of database architecture.

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 14

Database Management Systems and Their Architecture

Conceptual level

Database contents Uses of database Desired reports Information to be reviewed

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 15

Database Management Systems and Their Architecture

Logical level

Logical data structures: Tree (hierarchical) Network Relational

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 16

Database Management Systems and Their Architecture

Physical level

Access methods: Sequential Indexed-sequential Direct

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 17

Conceptual Architecture

The Entity-Relationship (E-R) data model is a conceptual model for depicting the relationships between segments in a database.

Attribute refers to individual fields or data items.


2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood 12 18

Conceptual Architecture
The object-oriented modeling technique (OMT) views the components of the system being modeled as object classes. Object class corresponds to a segment. Object corresponds to a particular instance.

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 19

Example of Object-Oriented Data Modeling Technique


PLANT_EQUIPMENT ACCOUNT_NO COST DEPRECIATION

HEAVY_EQUIPMENT MAINTENANCE_FREQ DATE_PURCHASED

HAND_TOOLS USAGE

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 20

Learning Objective 3

Compare and contrast the different logical models of databases.

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 21

Logical Data Structures

The relationships that exist between the segments in the database are determined by the logical data structure, also called the schema or database model.

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 22

Logical Data Structures


What are the three major models of logical data structure? 1. Tree or hierarchical structures

2. Network structures
3. Relational models
2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood 12 23

Logical Data Structures


Tree (hierarchical) model (4 levels and 13 nodes) A B C D E

J
L

K
M
12 24

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

Logical Data Structures


Network model (3 levels and 11 nodes)

G
J

H
K

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 25

Logical Data Structures

Both trees and networks are implemented with imbedded pointer fields.

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 26

Implementing Tree and Network Structures


In a list organization, each record contains one or more pointers (fields) indicating the address of the next logical record with the same attribute(s). A ring structure differs from a list in that the last record in the ring list points back to the first record.
2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood 12 27

Implementing Tree and Network Structures


What is a multiple ring structure?

In this type of structure several rings pass through individual records.

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 28

List Structure
Location of first record Attribute
2 1 Red Blue

Index

Pointer field to next record

End of list indicator

Records

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 29

Ring Structure
Location of first record Attribute
2 3 Va Ky

Index

Pointer field to next record

Pointer field to first record

Records

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 30

Relational Data Structures

What is the relational model? It is a logical data structure that views the database as a collection of two-dimensional tables. There are no complicated pointers or lists.
2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood 12 31

Relational Data Structures

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 32

Relational Data Structures

What are the three normal forms? First normal form

Second normal form


Third normal form
2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood 12 33

Learning Objective 4

Explain the different methods of accessing files.

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 34

Database Architecture: The Physical Level


Sequentially accessed files Indexed files Directly accessed files

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 35

Sequentially Accessed Files

In a sequential access file, records can only be accessed in their predefined sequence. Sequential file organization is useful when batch processing is required.

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 36

File File

Disc o nn e c t Disc o n ne c t

Te ln e t - sunn y Ed it Se ttin g Ne two rk Te lne t - V AX Ed it Se tting Ne two rk

He lp He lp

Indexed Files

File

Disc o nn e c t

Te ln e t - sunn y Ed it Se ttin g Ne two rk

He lp

6 4 b yte s fro m p s2 (1 0 0 .1 0 0 .1 0 0 .5 ) : ic m p _se q = 9 1 , ----p s2 PING Sta tistic ---9 2 p a c ke ts tra n sm itte d , 9 2 p a c ke ts re c e ive d , 0% ro u n d -trip (m s) m in /a u g /m a x = 0 /0 /2 0 </h /h e /zu [< oo mm e /zu i> i> ]

File

Ho st

O p tio ns

Pin g - IBM He lp

6 4 b yte s re c e ive d , ic m p _ 6 4 b yte s re c e ive d , ic m p _

An index file is one where an attribute has been extracted from the records and used to build a new file whose purpose is to provide an index to the original file. One important type of indexed file is an indexed-sequential file.
2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood 12 37

File File

Disc o nn e c t Disc o n ne c t

Te ln e t - sunn y Ed it Se ttin g Ne two rk Te lne t - V AX Ed it Se tting Ne two rk

He lp He lp

Indexed Files

File

Disc o nn e c t

Te ln e t - sunn y Ed it Se ttin g Ne two rk

He lp

6 4 b yte s fro m p s2 (1 0 0 .1 0 0 .1 0 0 .5 ) : ic m p _se q = 9 1 , ----p s2 PING Sta tistic ---9 2 p a c ke ts tra n sm itte d , 9 2 p a c ke ts re c e ive d , 0% ro u n d -trip (m s) m in /a u g /m a x = 0 /0 /2 0 </h /h e /zu [< oo mm e /zu i> i> ]

File

Ho st

O p tio ns

Pin g - IBM He lp

6 4 b yte s re c e ive d , ic m p _ 6 4 b yte s re c e ive d , ic m p _

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. These files are frequently referred to as ISAM files.

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 38

File File

Disc o nn e c t Disc o n ne c t

Te ln e t - sunn y Ed it Se ttin g Ne two rk Te lne t - V AX Ed it Se tting Ne two rk

He lp He lp

Indexed Files

File

Disc o nn e c t

Te ln e t - sunn y Ed it Se ttin g Ne two rk

He lp

6 4 b yte s fro m p s2 (1 0 0 .1 0 0 .1 0 0 .5 ) : ic m p _se q = 9 1 , ----p s2 PING Sta tistic ---9 2 p a c ke ts tra n sm itte d , 9 2 p a c ke ts re c e ive d , 0% ro u n d -trip (m s) m in /a u g /m a x = 0 /0 /2 0 </h /h e /zu [< oo mm e /zu i> i> ]

File

Ho st

O p tio ns

Pin g - IBM He lp

6 4 b yte s re c e ive d , ic m p _ 6 4 b yte s re c e ive d , ic m p _

An ISAM file structurally consists of three distinct areas: The index The prime area The overflow area

How would a computer locate a file record whose key is 1002?


2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood 12 39

Structure of an ISAM File


Highest key Track index address

Master Index 1500 0300


Track address

Track Index
0300 Prime Area
Track address Track address

1005
Key

0301
Data Highest key on track

1002

--------

Record found

0301

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 40

Directly Accessed Files


Direct-access files allow individual records to be almost instantly retrieved without the use of an index. Each record is assigned to a storage location that bears some relationship to the records key values. Most direct-access file systems convert a key to a storage location address.
2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood 12 41

Use of a Direct-Access File

Data records

Randomizing computation ( 7)

Add remainder to displacement address (10)

File storage area


12 42

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

Use of a Direct-Access File

Remainder Displacement after factor + = Record division (initial address storage Record Key by seven of file area) address 1 15 1 10 11 2 17 3 10 13 3 11 4 10 14 4 22 1 10 11

Overflow

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 43

Use of a Direct-Access File

Address 10 11 Range of 12 randomizing 13 computation 14 15 16 Storage allocated for 17 overflow 18 records

Contents Record 1 KEY 15* Record 2 KEY 17 Record 3 KEY 11 Record 4 KEY 22

Overflow indicator

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 44

Economic Relations between File Organization Techniques


The basic economics of file processing are largely determined by the activity ratio. What is the activity ratio? It is the number of accessed records divided by the number of records in the file. The second economic consideration concerns response time.
2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood 12 45

Economic Relations between File Organization Techniques


What is response time? It is the length of time the user must wait for the system to complete an operation. Response time is affected by the physical access time. Another factor that can affect response time is how data records are physically distributed on the disk.
2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood 12 46

Learning Objectives 5 and 6 Explain the benefits of database management systems.

Describe the considerations that are appropriate to the design of computer-based files and databases.
2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood 12 47

Database Management Systems and Databases in Practice


Database Management Systems (DBMS) are computer programs that enable a user to create and update files, to select and retrieve data, and to generate various outputs and reports. All DBMS contain three common attributes for managing and organizing data.
2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood 12 48

Database Management Systems and Databases in Practice


What are these attributes? Data description language (DDL)

Data manipulation language (DML)


Data query language (DQL)
2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood 12 49

Why Database Management Systems are Needed


DBMS 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 separate, independent data files and computer programs.
2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood 12 50

Database Management Concepts

Application One X Y A B

Application Two X Y C D

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 51

Database Management Concepts

X
Database dictionary and access codes Data manipulation routines

D X Y A B
Logical file 1 Application one

Database system

X Y A D

X Y C D

Logical file 3 Logical file 2 Security screened inquiry file Application two
12 52

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

Database Documentation and Administration


Database dictionaries are used both alone and with DBMS to centralize, document, control, and coordinate the use of data within an organization.
The data dictionary is simply another file, sort of file of files, whose record occurrences consist of data item descriptions.
2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood 12 53

Data Dictionary Format

Specifications Name Definition Aliases

Characteristics Size Range of values Encoding Editing data

Utilization Owner Where used Security code Last update

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 54

End of Chapter 12

2004 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, by Bodnar/Hopwood

12 55

Vous aimerez peut-être aussi