SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Downloaden Sie, um offline zu lesen
FILES ORGANIZATION
PRESENTED BY :
KU MAN YI B031210161
MOHAMMAD SAFAR A/L SHARIFF MOHAMED B031210227
ADAM RIDHWAN BIN SUKIMAN B031210083
SOO BOON JIAN B031210199
MUHAMMAD ZULKHAIRI BIN ZAINI B031210140
FILE ORGANIZATION
For understanding
 File/Table
 Record/Row
 Field/Column/Attribute
THE PILE
 A form of file organization where data are collected in
the same order they arrived
 This organization simply accumulate mass of data and
save it
 Each field is self-describing, includes a field name and a
value. Length of each field is determined as shown
 Implicitly indicated by delimiters
 Explicitly included as subfield or
 Done by default for that particular field type
 Records may have different fields and there is no visible
structure. Hence, record access is through exhaustive
search where all record or the entire file is examined
 This type of file uses space efficiently and is updated
easily. However, retrieval of a single record could be
tedious
THE PILE ORGANIZATION
Variable-length records Delimiter
Delimiter
Delimiter
Delimiter
Delimiter
Delimiter
Variable-length records
Variable-length records
Variable-length records
Variable-length records
THE SEQUENTIAL FILE
 Most common form of file structure
 Fixed format are used for records and records are of the
same length
 Field names and lengths are attributes of the file
 One particular field (usually first field) is referred to as
the key field :-
 Uniquely identifies the record
 Records are stored in key sequence
 Alphabetical order or numerical order depending on the key field
 It is the simplest structure and easy to implement in any
device. However, in the worst case scenario, accessing
a single record takes a long time.
THE SEQUENTIAL FILE ORGANIZATION
1
2
…….
n-1
n
Key Field Attributes
THE SEQUENTIAL FILE ORGANIZATION
 To enable a sequential form of records, new
records are placed in a log file or transaction file.
Then, a batch update is performed to merge the log
file with the master file to produce a new file with
the correct key sequence
1 2 n-1 n
…
Record
Terminators
THE INDEXED SEQUENTIAL FILE
 A file management system that allows records to be
accessed either sequentially (in the order they were
entered) or randomly (with an index)
 A secondary set of hash tables known as indexes is
created that contains pointers to the main file
 In indexed sequential file, records are organized in
sequence based on key fields
 Each file has an index to support random search
 Overflow file is added such as each record in
overflow file is located by following a pointer from
its predecessor record in main file
DESCRIPTION
 As an example:-
 Firstly, a single level of indexing is used. Hence, the
index is a simple sequential file.
 Each record in the index file consists of:-
 Key field(same as key field in the main file)
 Pointer to the main file
 To find a specific field, the index file is searched for
matching key values
 Then, the pointer indicates the record having the
matching key values as depicted by figure below
 This reduces the average search length
 There is an addition to the organization where each record in
the main file contains an additional field which is a pointer to
the overflow file
 When a new record is added, it is added into the overflow file.
The record in main file which is immediately before the new
record in a logical sequence to be inserted is updated to
contain a pointer to the new record in the overflow file
 However, if the record before the new record in logical
sequence is itself in the overflow file, then the pointer in that
record is updated
 The processing of entire file sequentially involves processing
of records of main files sequentially until the pointer to the
overflow file is found, then accessing is continued in the
overflow file until a null pointer is encountered
 Secondly, we visualize the organization using multiple levels
of indexes
 The lowest level of index points to the main file, whereas the
index files sitting on the level above points to the index file
below it
 Hence, the efficiency in access is greatly increased and
average length of search is greatly reduced as conveyed in
figure below
THE INDEXED FILE
 Uses multiple indexes for different key fields which
may be the subject of a search
 Record accessibility are through their indexes
 May contain an exhaustive index that contains one
entry for every record in the main file. The index
itself is organized in the sequential form for ease of
searching
 May contain a partial index. It contains entries to
records where the desired field exists
THE INDEXED FILE ORGANIZATION
Primary file
Exhaustive PartialExhaustive
Index Attributes
Pointer
Indicator
THE DIRECT/HASHED FILE
 This file management system that access directly any
block of a known address.
 A key field is required for each record.
 Uses hashing on the key value.
 No concept of sequential ordering implemented.
 Such examples are:-
 Directories
 Pricing table
 Schedules
 Name lists
 It is used where rapid access is required, where fixed-
length records are used and where records are
accessed one-at-a-time.
 The concept of hashing can be shown as below.
THE DIRECT/HASHED FILE IMPLEMENTATION
HASHING METHODS
 Direct method
 The key is the address
 a key value might be between 1-100. The address of a certain
records will be the same as the key.
 Subtraction method
 Subtract certain amount of numbers from the key
 a key value might start with 1001 and ends with 1100. A simple
hashing function could subtract 1000 from the key to determine
the address.
 Modulo-division method
 Key value is divided by the size of records.
 the remainder becomes the address of the key.
 Digit-extraction method
 Selected digits are extracted from the key
 As an example:- a field has 10 digits. The hashing function only
extracts the first 2 digits and the last digit and use them as
address.

Weitere ähnliche Inhalte

Was ist angesagt?

File organization and introduction of DBMS
File organization and introduction of DBMSFile organization and introduction of DBMS
File organization and introduction of DBMSVrushaliSolanke
 
Data Structures- Part5 recursion
Data Structures- Part5 recursionData Structures- Part5 recursion
Data Structures- Part5 recursionAbdullah Al-hazmy
 
Searching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data StructureSearching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data StructureBalwant Gorad
 
Searching techniques in Data Structure And Algorithm
Searching techniques in Data Structure And AlgorithmSearching techniques in Data Structure And Algorithm
Searching techniques in Data Structure And Algorithm03446940736
 
Breadth First Search & Depth First Search
Breadth First Search & Depth First SearchBreadth First Search & Depth First Search
Breadth First Search & Depth First SearchKevin Jadiya
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraintsmadhav bansal
 
Binary search tree in data structures
Binary search tree in  data structuresBinary search tree in  data structures
Binary search tree in data structureschauhankapil
 
Indexing and Hashing
Indexing and HashingIndexing and Hashing
Indexing and Hashingsathish sak
 
1.5 binary search tree
1.5 binary search tree1.5 binary search tree
1.5 binary search treeKrish_ver2
 
Distributed Database Management System
Distributed Database Management SystemDistributed Database Management System
Distributed Database Management SystemAAKANKSHA JAIN
 

Was ist angesagt? (20)

Files
FilesFiles
Files
 
File organization and introduction of DBMS
File organization and introduction of DBMSFile organization and introduction of DBMS
File organization and introduction of DBMS
 
File organisation
File organisationFile organisation
File organisation
 
Indexing Data Structure
Indexing Data StructureIndexing Data Structure
Indexing Data Structure
 
Distributed database
Distributed databaseDistributed database
Distributed database
 
Data Structures- Part5 recursion
Data Structures- Part5 recursionData Structures- Part5 recursion
Data Structures- Part5 recursion
 
Searching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data StructureSearching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data Structure
 
Searching techniques in Data Structure And Algorithm
Searching techniques in Data Structure And AlgorithmSearching techniques in Data Structure And Algorithm
Searching techniques in Data Structure And Algorithm
 
Breadth First Search & Depth First Search
Breadth First Search & Depth First SearchBreadth First Search & Depth First Search
Breadth First Search & Depth First Search
 
File organization
File organizationFile organization
File organization
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
Database, Lecture-1.ppt
Database, Lecture-1.pptDatabase, Lecture-1.ppt
Database, Lecture-1.ppt
 
Binary search tree in data structures
Binary search tree in  data structuresBinary search tree in  data structures
Binary search tree in data structures
 
Directory structure
Directory structureDirectory structure
Directory structure
 
Tree - Data Structure
Tree - Data StructureTree - Data Structure
Tree - Data Structure
 
Indexing and Hashing
Indexing and HashingIndexing and Hashing
Indexing and Hashing
 
File organization
File organizationFile organization
File organization
 
1.5 binary search tree
1.5 binary search tree1.5 binary search tree
1.5 binary search tree
 
Data structure ppt
Data structure pptData structure ppt
Data structure ppt
 
Distributed Database Management System
Distributed Database Management SystemDistributed Database Management System
Distributed Database Management System
 

Ähnlich wie File Organization

File System in Operating System
File System in Operating SystemFile System in Operating System
File System in Operating SystemMeghaj Mallick
 
File organization in database
File organization in databaseFile organization in database
File organization in databaseAfrasiyab Haider
 
File organization in database
File organization in databaseFile organization in database
File organization in databaseAfrasiyab Haider
 
lecture 2 notes indexing in application of database systems.pptx
lecture 2 notes indexing in application of database systems.pptxlecture 2 notes indexing in application of database systems.pptx
lecture 2 notes indexing in application of database systems.pptxpeter1097
 
File Types in Data Structure
File Types in Data StructureFile Types in Data Structure
File Types in Data StructureProf Ansari
 
File organisation in system analysis and design
File organisation in system analysis and designFile organisation in system analysis and design
File organisation in system analysis and designMohitgauri
 
Lecture #1 Introduction
Lecture #1 IntroductionLecture #1 Introduction
Lecture #1 IntroductionDon Bosco BSIT
 
Lecture #1 Introduction
Lecture #1 IntroductionLecture #1 Introduction
Lecture #1 IntroductionRico
 
MARUTHI_INVERTED_SEARCH_presentation.pptx
MARUTHI_INVERTED_SEARCH_presentation.pptxMARUTHI_INVERTED_SEARCH_presentation.pptx
MARUTHI_INVERTED_SEARCH_presentation.pptxMaruthiRock
 
Unit ivos - file systems
Unit ivos - file systemsUnit ivos - file systems
Unit ivos - file systemsdonny101
 
FIle Organization.pptx
FIle Organization.pptxFIle Organization.pptx
FIle Organization.pptxSreenivas R
 
DATA PROCESSING NOTE ON INDEXING
DATA PROCESSING NOTE ON INDEXINGDATA PROCESSING NOTE ON INDEXING
DATA PROCESSING NOTE ON INDEXINGdavid22266
 

Ähnlich wie File Organization (20)

File System in Operating System
File System in Operating SystemFile System in Operating System
File System in Operating System
 
File organization in database
File organization in databaseFile organization in database
File organization in database
 
File organization in database
File organization in databaseFile organization in database
File organization in database
 
File organisation
File organisationFile organisation
File organisation
 
lecture 2 notes indexing in application of database systems.pptx
lecture 2 notes indexing in application of database systems.pptxlecture 2 notes indexing in application of database systems.pptx
lecture 2 notes indexing in application of database systems.pptx
 
Files
FilesFiles
Files
 
Files
FilesFiles
Files
 
DBMS (UNIT 5)
DBMS (UNIT 5)DBMS (UNIT 5)
DBMS (UNIT 5)
 
File Types in Data Structure
File Types in Data StructureFile Types in Data Structure
File Types in Data Structure
 
Storage struct
Storage structStorage struct
Storage struct
 
File organisation in system analysis and design
File organisation in system analysis and designFile organisation in system analysis and design
File organisation in system analysis and design
 
Lecture #1 Introduction
Lecture #1 IntroductionLecture #1 Introduction
Lecture #1 Introduction
 
Lecture #1 Introduction
Lecture #1 IntroductionLecture #1 Introduction
Lecture #1 Introduction
 
Ardbms
ArdbmsArdbms
Ardbms
 
MARUTHI_INVERTED_SEARCH_presentation.pptx
MARUTHI_INVERTED_SEARCH_presentation.pptxMARUTHI_INVERTED_SEARCH_presentation.pptx
MARUTHI_INVERTED_SEARCH_presentation.pptx
 
Unit ivos - file systems
Unit ivos - file systemsUnit ivos - file systems
Unit ivos - file systems
 
Chapter 12.pptx
Chapter 12.pptxChapter 12.pptx
Chapter 12.pptx
 
FIle Organization.pptx
FIle Organization.pptxFIle Organization.pptx
FIle Organization.pptx
 
File System Implementation
File System ImplementationFile System Implementation
File System Implementation
 
DATA PROCESSING NOTE ON INDEXING
DATA PROCESSING NOTE ON INDEXINGDATA PROCESSING NOTE ON INDEXING
DATA PROCESSING NOTE ON INDEXING
 

Kürzlich hochgeladen

4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sectoritnewsafrica
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFMichael Gough
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...itnewsafrica
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 

Kürzlich hochgeladen (20)

4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDF
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 

File Organization

  • 1. FILES ORGANIZATION PRESENTED BY : KU MAN YI B031210161 MOHAMMAD SAFAR A/L SHARIFF MOHAMED B031210227 ADAM RIDHWAN BIN SUKIMAN B031210083 SOO BOON JIAN B031210199 MUHAMMAD ZULKHAIRI BIN ZAINI B031210140
  • 2. FILE ORGANIZATION For understanding  File/Table  Record/Row  Field/Column/Attribute
  • 3. THE PILE  A form of file organization where data are collected in the same order they arrived  This organization simply accumulate mass of data and save it  Each field is self-describing, includes a field name and a value. Length of each field is determined as shown  Implicitly indicated by delimiters  Explicitly included as subfield or  Done by default for that particular field type  Records may have different fields and there is no visible structure. Hence, record access is through exhaustive search where all record or the entire file is examined  This type of file uses space efficiently and is updated easily. However, retrieval of a single record could be tedious
  • 4. THE PILE ORGANIZATION Variable-length records Delimiter Delimiter Delimiter Delimiter Delimiter Delimiter Variable-length records Variable-length records Variable-length records Variable-length records
  • 5. THE SEQUENTIAL FILE  Most common form of file structure  Fixed format are used for records and records are of the same length  Field names and lengths are attributes of the file  One particular field (usually first field) is referred to as the key field :-  Uniquely identifies the record  Records are stored in key sequence  Alphabetical order or numerical order depending on the key field  It is the simplest structure and easy to implement in any device. However, in the worst case scenario, accessing a single record takes a long time.
  • 6. THE SEQUENTIAL FILE ORGANIZATION 1 2 ……. n-1 n Key Field Attributes
  • 7. THE SEQUENTIAL FILE ORGANIZATION  To enable a sequential form of records, new records are placed in a log file or transaction file. Then, a batch update is performed to merge the log file with the master file to produce a new file with the correct key sequence 1 2 n-1 n … Record Terminators
  • 8. THE INDEXED SEQUENTIAL FILE  A file management system that allows records to be accessed either sequentially (in the order they were entered) or randomly (with an index)  A secondary set of hash tables known as indexes is created that contains pointers to the main file  In indexed sequential file, records are organized in sequence based on key fields  Each file has an index to support random search  Overflow file is added such as each record in overflow file is located by following a pointer from its predecessor record in main file
  • 9. DESCRIPTION  As an example:-  Firstly, a single level of indexing is used. Hence, the index is a simple sequential file.  Each record in the index file consists of:-  Key field(same as key field in the main file)  Pointer to the main file  To find a specific field, the index file is searched for matching key values  Then, the pointer indicates the record having the matching key values as depicted by figure below  This reduces the average search length
  • 10.
  • 11.  There is an addition to the organization where each record in the main file contains an additional field which is a pointer to the overflow file  When a new record is added, it is added into the overflow file. The record in main file which is immediately before the new record in a logical sequence to be inserted is updated to contain a pointer to the new record in the overflow file  However, if the record before the new record in logical sequence is itself in the overflow file, then the pointer in that record is updated  The processing of entire file sequentially involves processing of records of main files sequentially until the pointer to the overflow file is found, then accessing is continued in the overflow file until a null pointer is encountered  Secondly, we visualize the organization using multiple levels of indexes  The lowest level of index points to the main file, whereas the index files sitting on the level above points to the index file below it  Hence, the efficiency in access is greatly increased and average length of search is greatly reduced as conveyed in figure below
  • 12.
  • 13. THE INDEXED FILE  Uses multiple indexes for different key fields which may be the subject of a search  Record accessibility are through their indexes  May contain an exhaustive index that contains one entry for every record in the main file. The index itself is organized in the sequential form for ease of searching  May contain a partial index. It contains entries to records where the desired field exists
  • 14. THE INDEXED FILE ORGANIZATION Primary file Exhaustive PartialExhaustive Index Attributes Pointer Indicator
  • 15. THE DIRECT/HASHED FILE  This file management system that access directly any block of a known address.  A key field is required for each record.  Uses hashing on the key value.  No concept of sequential ordering implemented.  Such examples are:-  Directories  Pricing table  Schedules  Name lists  It is used where rapid access is required, where fixed- length records are used and where records are accessed one-at-a-time.  The concept of hashing can be shown as below.
  • 16. THE DIRECT/HASHED FILE IMPLEMENTATION
  • 17. HASHING METHODS  Direct method  The key is the address  a key value might be between 1-100. The address of a certain records will be the same as the key.  Subtraction method  Subtract certain amount of numbers from the key  a key value might start with 1001 and ends with 1100. A simple hashing function could subtract 1000 from the key to determine the address.  Modulo-division method  Key value is divided by the size of records.  the remainder becomes the address of the key.  Digit-extraction method  Selected digits are extracted from the key  As an example:- a field has 10 digits. The hashing function only extracts the first 2 digits and the last digit and use them as address.