2. Managing Files: Basic Concepts
Data can be grouped into categories
The data storage hierarchy consists of the
levels of data
Bits
Bytes
Fields
Records
Files
Databases
stored in a computer
4
3. Managing Files: Basic Concepts
Characters: A character (byte) is a letter,
number, or special character
Examples : A, B, C, 1, 2, 3, #, $, %
Field: A field is a unit of data consisting
one or more characters (bytes).
Examples: your name, address
of
5
4. Managing Files: Basic Concepts
Record: A
fields.
Examples
:
record is a collection of related
Student code, name and
address
File: A file is a collection of related records.
Examples: file of students grade
information
6
5. Managing Files: Basic Concepts
Database: is an organized collection
related files.
of
Example
s
: Student informatio
n
7
6. Managing Files: Basic Concepts
Type of data Contains Example
Database Several files Student database
Address, Grade, Fee
File Several records Name Address
Jack Bangkok
Rocky Chiangmai
Record Several fields Name Address
Jack Bangkok
Field Several Characters Name
Jack
Character Bits (0 or 1) S
1110 0010 8
8. Types of Files
File is the collection of data or information
The user gives
for future use
The file names
Example –
a name to each file to save
have an extension name.
Microsoft
Microsoft
Microsoft
Word
Excel
PowerPoint
.doc
.xls
.ppt
12
9. Types of Files
There are many types of files but the
most important
Program files
types are –
Data files
13
10. Program Files
Program files
instructions.
The program
by a program
are files containing software
files are instruction files written
for a particular application
They have a file extension. For example –
.bas for BASIC, .pas for Pascal or .jav for Java
For the processor to use a source file at first it
must be converted to an executable file,
.exe file
14
11. Data files
Data files are files that contain data –
words, numbers, pictures, sounds, etc.
Data files are created by the users.
15
13. Data Access Methods
Sequential Storage: means
in
that data is
in
stored and retrieved sequence,
alphabetically
order
– ascending or descending
Example: A tape cassette
Advantage: less expensive
Disadvantage: file searching is slow
21
14. Data Access Methods
Direct Access Storage: means that
computer can go directly to
as
the information
you want. It is also known
Example: A CD Player
Advantage: faster
random.
Disadvantage: more expensive
23
15. Offline Storage
Offline storage means that data is not in
the direct control on the CPU. It maybe
saved in a CD.
The data
device.
has to be loaded onto an input
25
16. Online Storage
Online storage means that data is
immediately accessible by the CPU.
You need not wait for a CD.
(direct
Storage is on the disk access storage)
26
17. Database Management
DBMS
Systems
A database is an organized collection
There are many types of databases
of related files
To manage the information a database
management system is used
The DBMS is a program that controls the structure
of a database and access to the data
27