Introduction To File Structures
Introduction To File Structures
Contents
3 File Basics
4 File Management
7 LOGO
7
Introduction to
File Structures
8 LOGO
8
1
1/8/23
File Structure
v A File Structure is a combination of
representations for data in files and
of operations for accessing the data.
9 LOGO
9
Data Processing
v Data processing from a computer science perspective
involves:
§ Storage of data
§ Organization of data
§ Access to data
10 LOGO
10
2
1/8/23
v Difference:
§ Data Structures deal with data in main memory
§ File Structures deal with data in secondary storage device (File)
Main Storage
(Memory) Secondary Storage
11 LOGO
11
Computer Architecture
12 LOGO
12
3
1/8/23
v Secondary Storage
§ Slow (since electronic and mechanical)
§ Large (since cheap)
§ Stable, persistent (information is preserved longer)
13 LOGO
13
How Fast …?
v Typical times for getting information
14 LOGO
14
4
1/8/23
Memory Hierarchy
CPU
Cache
Data
Request
Main Memory satisfying
for data request
Magnetic Disks
Tapes
15 LOGO
15
16 LOGO
16
5
1/8/23
17 LOGO
17
History of File
Structures Design
18 LOGO
18
6
1/8/23
19 LOGO
19
7
1/8/23
File Basics
21 LOGO
21
Computer File
v A computer file, or simply a file, is defined as a named
collection of data that exists on a storage medium, such
as a hard disk, CD, DVD, or USB flash drive.
22 LOGO
22
8
1/8/23
v When you save a file, you must provide a valid file name
that adheres to specific rules, referred to as file-naming
conventions.
23 LOGO
23
24 LOGO
24
9
1/8/23
25 LOGO
25
File Extension
v A file extension (sometimes referred to as a file name
extension) is an optional file identifier that is separated from
the main file name by a period, as in Paint.exe.
26 LOGO
26
10
1/8/23
File’s Location
27 LOGO
27
File’s Location
v To determine a file’s location, you must first specify the
device where the file is stored.
11
1/8/23
File’s Location
v A disk partition is a section of a hard disk drive that is
treated as a separate storage unit.
29 LOGO
29
File’s Location
v A computer file’s location is defined by a file path
(sometimes called a file specification), which on a PC
includes the drive letter, folder(s), file name, and extension.
30 LOGO
30
12
1/8/23
File Format
v The term file format refers to the organization and layout
of data that is stored in a file.
v The format of a
file usually
includes a header,
data, and possibly
an end-of-file
marker.
File Format
v Music files are stored differently than text files or graphics
files; but even within a single category of data, there are
many file formats.
32 LOGO
32
13
1/8/23
33 LOGO
33
34 LOGO
34
14
1/8/23
35 LOGO
35
File Management
36 LOGO
36
15
1/8/23
File Management
v File management encompasses any procedure that helps
you organize your computer-based files so that you can find
and use them more efficiently.
37 LOGO
37
38 LOGO
38
16
1/8/23
39 LOGO
39
40 LOGO
40
17
1/8/23
41 LOGO
41
42 LOGO
42
18
1/8/23
43 LOGO
43
44 LOGO
44
19
1/8/23
20