Prepared for MIS 6326 by Dr. Sumit Sarkar
File Organizations
Sequential
Indexed sequential
Hashed
SEQUENTIAL
Records stored in Sequence
PRODUCT
Record # Product No Description Finish Room Price
1 0100 Table Oak DR 500
2 0350 Table Maple DR 625
3 0625 Chair Oak DR 100
4 0975 Wall Unit Pine FR 750
5 1000 Dresser Cherry BR 800
6 1250 Chair Maple LR 400
7 1425 Bookcase Pine LR 250
8 1600 Stand Birch BR 200
9 1775 Dresser Pine BR 500
10 2000 Wall Unit Oak LR 1200
Prepared for MIS 6326 by Dr. Sumit Sarkar
INDEXED SEQUENTIAL
What is an Index?
A File / Data Structure Used to Locate One or More Rows in a Table
I. Row Index
PROD_INDEX
Product No Record #
0100 1
0350 2
0625 3
0975 4
1000 5
1250 6
1425 7
1600 8
1775 9
2000 10
PRODUCT
Record # Product No Description Finish Room Price
1 0100 Table Oak DR 500
2 0350 Table Maple DR 625
3 0625 Chair Oak DR 100
4 0975 Wall Unit Pine FR 750
5 1000 Dresser Cherry BR 800
6 1250 Chair Maple LR 400
7 1425 Bookcase Pine LR 250
8 1600 Stand Birch BR 200
9 1775 Dresser Pine BR 500
10 2000 Wall Unit Oak LR 1200
Prepared for MIS 6326 by Dr. Sumit Sarkar
II. Block Index
PROD_INDEX
Product No Block #
0975 1
1600 2
2000 3
PRODUCT
Record # Product No Description Finish Room Price
1 0100 Table Oak DR 500
2 0350 Table Maple DR 625
3 0625 Chair Oak DR 100
4 0975 Wall Unit Pine FR 750
5 1000 Dresser Cherry BR 800
6 1250 Chair Maple LR 400
7 1425 Bookcase Pine LR 250
8 1600 Stand Birch BR 200
9 1775 Dresser Pine BR 500
10 2000 Wall Unit Oak LR 1200
Prepared for MIS 6326 by Dr. Sumit Sarkar
B+-TREE Index
1250
0625 0975 1425 2000
0100 0350 0625 0975 1000 1250 1300 1425 1600 2000
0100 0350 0625 0975 1000 1250 1300 1425 1600 2000
An index block can have multiple entries, all in sorted order
Each entry in an index has two pointers associated with it, one to its left and the other to its right.
The pointer PL to the left of an entry (say E) points to an index block which has index values = E
Prepared for MIS 6326 by Dr. Sumit Sarkar
HASHED FILES
Hash Table
Product No Modulo 17
0100 15
0350 10
0625 13
0975 6
1000 14
1250 9
1425 14
1600 2
1775 7
2000 11
PRODUCT
Record # Product No Description Finish Room Price
0
1
2 1600 Stand Birch BR 200
3
4
5
6 0975 Wall Unit Pine FR 750
7 1775 Dresser Pine BR 500
8
9 1250 Chair Maple LR 400
10 0350 Table Maple DR 625
11 2000 Wall Unit Oak LR 1200
12
13 0625 Chair Oak DR 100
14 1000 Dresser Cherry BR 800
15 0100 Table Oak DR 500
16 1425 Bookcase Pine LR 250
Prepared for MIS 6326 by Dr. Sumit Sarkar
Data Volume Analysis
• Estimate Occurrences of Entity Instances
Location
Treatment Patient Physician
Charge Item
Prepared for MIS 6326 by Dr. Sumit Sarkar
Hospital Database
ROOM
Location Accomodation
… …
PHYSICIAN
Physician_Id Physician_Phone
… …
ITEM
Item_Code Description
… …
PATIENT
Patient# Patient_Name Location Extension Date_Admitted Date_Disch
… … … … … …
CHARGES
Patient# Item_Code Charge
… … …
TREATMENT
Patient# Physician_Id Procedure
… … …