4.3.8 Minimizing Database I/Os

4.3.8.1 Initial Example

4.3.8.2 First Improved Example

4.3.8.3 Second Improved Example

Files Involved

Physical file TRANS (transactions file) has the following fields:

Field

Type

Length

Description

TRANNUM

S

5

Transaction number

TRANTIME

S

6

Transaction time

TRANDATE

S

6

Transaction date

TRANTYPE

A

2

Transaction type

TRANUSER

A

10

Transaction user

TRANSTATE

A

3

Transaction state

 

and a file called TRNTYP (transaction types/descriptions) has the following fields:

Field

Type

Length

Description

TRANTYPE

A

2

Transaction type

TRANDESC

A

20

Transaction full description

 

and a file called STATES (state codes/descriptions) has the following fields:

Field

Type

Length

Description

STATCODE

A

3

State code

STATDESC

A

20

State full description