You are on page 1of 17

Course Code: Comp 324

Course Name: Database Management System II

Lecture 2: Data Storage Media, and Files.

Lecturer Name: Laura Limo


Devotional Meditation

Philippians 4:6-7

Do not be anxious about anything, but in every
situation, by prayer and petition, with thanksgiving,
present your requests to God. 7 And the peace of
God, which transcends all understanding, will
guard your hearts and your minds in Christ Jesus.
Lecture Outline
1. Recap from last class
2. Data Storage Media
3. Internal Components of DBMS
4. File and File Operations
5. Class Activity (Moodle)
Recap
Recap
Physical Database Design Phase
Data Storage Media

Primary Storage High Speed

Secondary Storage

High Capacity
Tertiary Storage
Primary Storage Media
• Can be accessed by the CPU directly
• Fast, expensive and limited in capacity
• Volatile
• Examples include: Main memory, cache
Secondary Storage Media
• Data cannot be processed by CPU directly
• Slow, larger capacity, less expensive
• Non-volatile
• Examples include: Hard disk, Magnetic disks, Flash memory
Tertiary Storage Media
• Data cannot be processed by CPU directly
• Slowest of all the categories, larger capacity than both
primary and secondary storage media, least expensive of all
the categories
• Non-volatile
• Examples include: Magnetic Tapes, optical disks
Database on external media storage
Reasons for external media Implications for storing
storage: database on external media
• Economic storage:
• Security • Data will be transferred
• Capacity from disk to main memory
• Portability (Read) for information
• Persistent storage processing.
• Back-up • Data will be transferred
• What other reasons? from main memory to disk
(WRITE), for persistent
storage.
Terminologies
Overview
DBMS Physical System Structure
Files
• Databases are stored physically as Types of files:
files of records, which are typically • Master file: It is a file of relatively
permanent information about entities. They
stored on magnetic disks.
are used as a source of reference data for
• A file is a collection of records processing transactions. E.g Account
stored on external media storage. Number, balance, name, date of opening
• A file is a sequence of records etc.
stored in a binary format. Each file • Transaction file: It is a collection of records
consists of one or more pages. describing activities or transactions by the
organization. E.g deposits, transfers etc.
• A page is a unit of information read •
Report file: It is created by extracting data
from or written to disk. A page is a to prepare a report. E.g a report on all
unit of exchange between the disk accounts sorted in ascending order.
and the main memory.
Operations on files
• There are mainly two kinds of file operations: retrieval and update operations.
• Retrieval operations do not change the contents of the file. It only locates
records in the file matching certain criteria.
• Update operations change the contents of the file.
• Other operations on files include:
- Open
- Locate/find/search
- Read/get
- Modify/update
- Write
- Close
Conclusion

Database storage media

Files, File operations

Types of files

Dbms internal Structure

You might also like