Sie sind auf Seite 1von 12

DATA STORAGE

AG N I B E S H S AM A N TA MBA-FINAL YEAR

Data storage
Data storage can refer to Computer data storage; memory, components, devices and media that retain digital computer data used for computing for some interval of time. Primary storage is data in random access memory (RAM) and other "built-in" devices. Secondary storage is data on hard disk, tapes, and other external devices.

Operations on Files
Allocate file Scan operations
Grab each records one after one
Can be used to step through all records

Insert record
Adds a new record to the file
Each record as a unique identifier called the record id (rid)

Update record Find record with a given rid Delete record with a given rid

File Types
Heap File - Unordered collection of records Records within a page a not ordered Pages are not ordered Simple to use and implement

Heap File
123 8387 121 Bob Ned Jil NY SJ NY $102 $73 $5595 Page 0

81982 2381 4882

Tim Bill Al

MIA LA SF

$4000 $500 $52303

Page 1

9403

Ned

NY

$3333 Page 2

1237

Pat

WI

$30
5

File Types
Heap File - Unordered collection of records Records within a page a not ordered Pages are not ordered Simple to use and implement Sorted File sorted collection or records Within a page, records are ordered Pages are ordered based on record contents Efficient access to data, but expensive to maintain

Sorted File
121 123 1237 Jil Bob Pat NY NY WI $5595 $102 $30 Page 0

2381 4882 8387

Bill Al Ned

LA SF SJ

$500 $52303 $73

Page 1

9403 81982

Ned Tim

NY MIA

$3333 $4000 Page 2

File Types
Heap File - Unordered collection of records
Records within a page a not ordered Pages are not ordered Simple to use and implement

Sorted File sorted collection or records


Within a page, records are ordered Pages are ordered based on record contents Efficient access to data, but expensive to maintain

Index File A file which stores keys and an index


into another file.

Hashing technique
Efficient method in the searching to the exact data item in a very short time Place the each and every data item at the index of the memory location Types Internal hashing External hashing

Internal Hashing
The hash table is in memory, where each slot holds only one entry Use an internal structure within a program whenever a group of records is accessed exclusively by using the value of one field Applicable to smaller files

External Hashing
Hashing for disk files is called external hashing. Address space is made of buckets, each of which holds multiple records A bucket is either one disk block or a cluster of contiguous blocks A table maintained in the file header converts the bucket number into the corresponding disk block addres

THANK YOU

Das könnte Ihnen auch gefallen