3. •
•
•
•
•
Fastest
Most Costly Media
Small & is managed by System H/W
Generally is inbuilt on-chip memory
For storage of important & critical
instructions
• If size of cache is increased –
cost increased
benefits of cache is lost
DBMS, JVP
4. • Machine instructions are stored in main
memory
• Its is quite small for storing Database
• Its Volatile i.e. data is lost on power failure or
system crash
DBMS, JVP
5. •
•
•
•
•
EEPROM
Read is Faster
Write is very slow & complicated
4-10 microsec to write, can’t be overwritten
To overwrite, has to erase entire data of
memory
• Used generally for hand-held & digital
electronics devices
DBMS, JVP
6. • Stores the Database, data moves between Main
Memory & Disk
• Size – Few GB upto 80GB
• Size of Magnetic Disk needs increases as we
have requirement for larger capacity disks
• Can survive power failure & system crash, is
non-volatile storage media
• Disk Failure results in loss of data stored on
disk.
DBMS, JVP
7. • CD – holds about 640MB
• DVD – holds 4.7 or 8.5GB per side to 17GB for
two-sided disk
• Data is stored optically on a disk, is read by laser
• WORM-write once read many CDs & DVDs
• CD-RW & DVD-RW : For multiple writes & read
• CDs are magnetic-optical storage devices that use
optical means to read magnetically encoded data.
• DBMS, JVP archival storages
Used for
8. •
•
•
•
•
Used for Backup Storage
Cheaper & Slower Access
Sequential-access Storage
Not direct access like CDs
Used for holding large backup data of large
organization
DBMS, JVP
10. • Access Time :
Read Req. Issued – Actual Data Transfer Begin
• Seek Time : Avg. Seek Time
Time For Repositioning the arm
• Rotational Latency Time : Avg. RLT
Time waiting for sector to appear under head
• A T = S T + RL T
• Data Transfer Rate : rate of data read/write to disk
• Mean Time To Failure (MTTF)
Amount of time on avg. we expect system to work w/o
DBMS, JVP
failure, measure of reliability of disk
11. • Reliability of Disk : 1,00,000/100 = 1000 hours
• Disk Failure leads to loss of data
• So keep redundancy i.e. Mirroring of Disk
• MTTF of mirrored disk depends on MTTR, time to
replace failed disk & restore data
• First write to one copy them to other so on power
failure, blocks have complete data.
DBMS, JVP
12. • Parallel access to disks
• Improve the transfer rate by ‘Striping’
• Bit-level striping : splitting bits of each byte
across multiple disks, array of 4,8,16… disks,
increase R/W at 8 times
• Block-level striping : divide data into blocks,
each block in a disk.
• ith block is in (i mod n + 1)th disk, n=total no. of
disks in array.
• Balances load across multiple disks so access
is fast & o/p is high
DBMS, JVP
18. •
•
•
•
Monetary Cost of extra disk
Performance – no. of I/O Operations
Performance when Disk fails
Performance to rebuild the Data
RAID 0, 1, 5 are currently in use
DBMS, JVP
19. • File is organized logically as a sequence of
records. The records are stored in disk blocks.
Fixed Length Records
Variable Length Records
DBMS, JVP
20. • Deposit = record
acc_no:char(10);
br_nm:char(22);
bal:real;
end
Acc_n Br_nm
o
Bal
R-1
A-104 Bombay
500
R-2
A-121 Delhi
781
R-3
A-393 Pune
900
R-4
A-129 Bombay
400
R-5
A-214 Chennai 164
Total = 40 bytes
DBMS, JVP
22. • Records has varying length
• Account_list : record
Br_nm:char(22);
accounts :- array(1---infinite)
acc_no:char(10);
bal:real;
end
end
DBMS, JVP
23. • Dis. Adv. –
- Not easy to occupy space left by deleted record
Leads to small fragments on disk
- No space for records to grow
Header has info :
- No. of records
- Free space pointer
- Size of each record block
DBMS, JVP
24. • Reserved Space
• List Representation
– Anchor Block
– Over Flow Block
DBMS, JVP
26. • A database that maintains data about
relations, stores information about the
tables of the database.
• E.g. Name of relations
Names of Attributes
Domains & Length
Constraints
DBMS, JVP
28. • Ordered Indices
• Hash Indices
Aspects :- Access Type : by value or range
- Access Time
- Insertion Time
- Deletion Time
- Space Overhead
DBMS, JVP
29. • Primary Index
– Dense Index
– Sparse Index
Multilevel Indices
Secondary Indices
DBMS, JVP
30. • Hash File Organization
- Hash Function
Uniform Distribution
Random Distribution
- Bucket
Bucket Overflow & Skew
Overflow Chining
• Hash Indices
• Comparison of Indexing & Hashing
DBMS, JVP