12
FILOR FILE ORGANIZATION INTRODUCTION

Lecture #1 Introduction

  • Upload
    rico

  • View
    1.103

  • Download
    1

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Lecture #1 Introduction

FILOR

FILE ORGANIZATIONINTRODUCTION

Page 2: Lecture #1 Introduction

FILE DESIGN

The study of file structures involves the investigation of the data structures used to organize a large collection of data into one or more external files that are stored on secondary storage devices.

FILE

- is a collection of related data

Example:payroll file

Page 3: Lecture #1 Introduction

FILE ORGANIZATION

-refers to the way in which records are stored in an external file- refers to the data structures used for organizing the data

FOUR COMMON FILE ORGANIZATIONS

1. Sequential2. Random3. Indexed sequential4. Multikey

Page 4: Lecture #1 Introduction

SEQUENTIAL FILE ORGANIZATION

- records are written consecutively - file are stored in ascending or descending order according to a key field.

ADVANTAGE:- easier to maintain than other organizations – especially in terms of adding and deleting records

RANDOM FILE ORGANIZATION

- implies a predictable relationship between the key used to identify an individual record and that record's location in an external file.

Page 5: Lecture #1 Introduction

INDEXED SEQUENTIAL FILE ORGANIZATION

combines sequential access and ordering with the capabilities of random access.

TWO PARTS OF INDEXED SEQUENTIAL FILE:

1. A collection of records stored in contiguous locations within blocks in a relative file and ordered by a key field.

2. An index (a hierarchical structure of record keys and relative block numbers) to the file of ordered records.

Page 6: Lecture #1 Introduction

MULTIKEY FILE ORGANIZATION

allows access to a data file by several different key fields.

Example:Library file that requires access by author and by subject matter and title.

Multikey organization is being implemented using B-trees.

Page 7: Lecture #1 Introduction

DATA FILE TYPES

1. Master file2. Transaction file3. Table file4. Report file5. Control file6. History file

Page 8: Lecture #1 Introduction

MASTER FILE

contains records of permanent data that are updated by adding, deleting, or changing

Example: Payroll master file contains an employee's social security number, the rate pay, marital status, number of exemptions claimed, and year-to-date deductions and earnings.

TRANSACTION FILE

contains records of changes, additions, and deletions made to a master file.

Page 9: Lecture #1 Introduction

TABLE FILE

consists of a table of data, such as a price list, a tax rate table, or some other form or reference data that is static and is referenced by one of the other type of files.

REPORT FILE

contains information that has been prepared for the user.

CONTROL FILE

is small and contains information concerning a particular maintenance run, such as the date of the run; the number of master records read, added, deleted, and written; and the number of transaction records read, processed and in error

Page 10: Lecture #1 Introduction

HISTORY FILE

consists of all the backup master files, transaction files, and control files from past runs.

Page 11: Lecture #1 Introduction

FILE CHARACTERISTICS

1. Activity of a file

is a measure of the percentage of existing master records changed during a maintenance run.

2. Volatility of a file

is a measure of the number of records added and deleted compared to the original number of records.

Page 12: Lecture #1 Introduction

FILE MANIPULATION

1. Queries

involve searching a file for records containing certain values in particular key fields.

2. Merging