SlideShare une entreprise Scribd logo
1  sur  19
Files Mukund Trivedi
WHAT ARE FILES ? A  computer file  is a block of arbitrary information, or resource for storing information, which is available to a  computer program  and is usually based on some kind of durable  storage
FILE CONTENTS   ,[object Object]
  The twin  disk files  of an  IBM 305  system
Organising the data in the file   ,[object Object]
FILE MANAGEMENT ,[object Object],[object Object]
FILE ACCESS METHODS   ,[object Object],[object Object],[object Object]
Sequential access  vs random access  .  ,[object Object]
Sequential access  is sometimes the only way of accessing the data, for example if it is on a tape. It may also be the access method of choice, for example if we simply want to process a sequence of data elements in order. 1 In  data structures , a data structure is said to have sequential access if one can only visit the values it contains in one particular order. The canonical example is the  linked list . Indexing into a list that has sequential access requires  O ( k ) time, where  k  is the index. As a result, many algorithms such as  quicksort  and  binary search  degenerate into bad algorithms that are even less efficient than their naïve alternatives; these algorithms are impractical without  random access . On the other hand, some algorithms, typically those that don't index, require only sequential access, such as  mergesort , and face no penalty.
Example of  Random Access File Storage How you use it is up to you- you could for example have a file full of equal size records. If these records have a size of 100 then record 0 occupies bytes 0-99, record 1 occupies bytes 100-199 etc. More generally record n starts at (n-1)*sizeof(record).
In  data structures ,  Random access  implies the ability to access any entry in a  list  of numbers in constant (i.e. independent of its position in the list and of list's size, i.e. ) time. Very few data structures can guarantee this, other than  arrays  (and related structures like  dynamic arrays ). Random access is critical to many algorithms such as  binary search ,  integer sorting  or  sieve of Eratosthenes . Other data structures, such as  linked lists , sacrifice random access to make for efficient inserts, deletes, or reordering of data.  Self-balancing binary search trees  may provide an acceptable compromise, where access time is equal for any member of a collection and only grows logarithmically with its size.
DIFFERENCES ,[object Object]
INDEX FILE   ,[object Object]
The Importance of Index Files ,[object Object],[object Object]
[object Object],[object Object]
How does an Index work ?  ,[object Object]
Value Rick  Jim  Bill  jill Data file   Rec num  1 2 3 4 Value  3 4 2 1 Index file Rec num  1 2 3 4
Index file  is just made up of numbers, and the records in the index file are arranged such that they indicate the record of the data file that should hold this position. For instance, if we want to find the first person alphabetically in our data file we would go to the index file and get the first index record. We find the index value to be 3. So we then Get the 3rd record from the data file, and determine that the first record alphabetically is "Bill." The index record value 3 can be thought of as a  pointer  to the data file record.
THANK YOU

Contenu connexe

Tendances

File Organization
File OrganizationFile Organization
File OrganizationManyi Man
 
Indexing structure for files
Indexing structure for filesIndexing structure for files
Indexing structure for filesZainab Almugbel
 
Lecture #1 Introduction
Lecture #1 IntroductionLecture #1 Introduction
Lecture #1 IntroductionRico
 
File handling in qbasic
File handling in qbasicFile handling in qbasic
File handling in qbasicSmritiGurung4
 
Concept of computer files for Grade 12 learners
Concept of computer files for Grade 12 learnersConcept of computer files for Grade 12 learners
Concept of computer files for Grade 12 learnerswellingtonoboh
 
Fundamental file structure concepts & managing files of records
Fundamental file structure concepts & managing files of recordsFundamental file structure concepts & managing files of records
Fundamental file structure concepts & managing files of recordsDevyani Vaidya
 
File organization
File organizationFile organization
File organizationGokul017
 
Introduction to file systems
Introduction to file systemsIntroduction to file systems
Introduction to file systemsAbadala Ali
 
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
 
A basic course on Reseach data management, part 2: protecting and organizing ...
A basic course on Reseach data management, part 2: protecting and organizing ...A basic course on Reseach data management, part 2: protecting and organizing ...
A basic course on Reseach data management, part 2: protecting and organizing ...Leon Osinski
 
Data carving using artificial headers info sec conference
Data carving using artificial headers   info sec conferenceData carving using artificial headers   info sec conference
Data carving using artificial headers info sec conferenceRobert Daniel
 

Tendances (18)

File organization
File organizationFile organization
File organization
 
File organisation
File organisationFile organisation
File organisation
 
File organization
File organizationFile organization
File organization
 
File Organization
File OrganizationFile Organization
File Organization
 
Indexing structure for files
Indexing structure for filesIndexing structure for files
Indexing structure for files
 
Lecture #1 Introduction
Lecture #1 IntroductionLecture #1 Introduction
Lecture #1 Introduction
 
File handling in qbasic
File handling in qbasicFile handling in qbasic
File handling in qbasic
 
Concept of computer files for Grade 12 learners
Concept of computer files for Grade 12 learnersConcept of computer files for Grade 12 learners
Concept of computer files for Grade 12 learners
 
Fundamental file structure concepts & managing files of records
Fundamental file structure concepts & managing files of recordsFundamental file structure concepts & managing files of records
Fundamental file structure concepts & managing files of records
 
File organization
File organizationFile organization
File organization
 
Introduction to file systems
Introduction to file systemsIntroduction to file systems
Introduction to file systems
 
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
 
Cap 233 info retrieval
Cap 233 info retrievalCap 233 info retrieval
Cap 233 info retrieval
 
B tree
B treeB tree
B tree
 
Dbms1
Dbms1Dbms1
Dbms1
 
Files
FilesFiles
Files
 
A basic course on Reseach data management, part 2: protecting and organizing ...
A basic course on Reseach data management, part 2: protecting and organizing ...A basic course on Reseach data management, part 2: protecting and organizing ...
A basic course on Reseach data management, part 2: protecting and organizing ...
 
Data carving using artificial headers info sec conference
Data carving using artificial headers   info sec conferenceData carving using artificial headers   info sec conference
Data carving using artificial headers info sec conference
 

En vedette

En vedette (7)

Sveriges vattenverk och vattentäkter ALcontrol Magnus Berglund
Sveriges vattenverk och  vattentäkter ALcontrol Magnus BerglundSveriges vattenverk och  vattentäkter ALcontrol Magnus Berglund
Sveriges vattenverk och vattentäkter ALcontrol Magnus Berglund
 
Session 28 Christel Carlsson
Session 28 Christel CarlssonSession 28 Christel Carlsson
Session 28 Christel Carlsson
 
C++ file
C++ fileC++ file
C++ file
 
C
CC
C
 
Process of design
Process of designProcess of design
Process of design
 
Successfully Selling HUD Homes
Successfully Selling HUD HomesSuccessfully Selling HUD Homes
Successfully Selling HUD Homes
 
System development life cycle (sdlc)
System development life cycle (sdlc)System development life cycle (sdlc)
System development life cycle (sdlc)
 

Similaire à Files

3620121datastructures.ppt
3620121datastructures.ppt3620121datastructures.ppt
3620121datastructures.pptSheejamolMathew
 
Introduction to File System
Introduction to File SystemIntroduction to File System
Introduction to File SystemSanthiNivas
 
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
 
Degonto file management
Degonto file managementDegonto file management
Degonto file managementDegonto Islam
 
fileorganizationandintroductionofdbms-210313163900.pdf
fileorganizationandintroductionofdbms-210313163900.pdffileorganizationandintroductionofdbms-210313163900.pdf
fileorganizationandintroductionofdbms-210313163900.pdfFraolUmeta
 
Module03
Module03Module03
Module03susir
 
Unit ivos - file systems
Unit ivos - file systemsUnit ivos - file systems
Unit ivos - file systemsdonny101
 
File organization in database
File organization in databaseFile organization in database
File organization in databaseAfrasiyab Haider
 
File Management – File Concept, access methods, File types and File Operation
File Management – File Concept, access methods,  File types and File OperationFile Management – File Concept, access methods,  File types and File Operation
File Management – File Concept, access methods, File types and File OperationDhrumil Panchal
 
File Types in Data Structure
File Types in Data StructureFile Types in Data Structure
File Types in Data StructureProf Ansari
 
358 33 powerpoint-slides_16-files-their-organization_chapter-16
358 33 powerpoint-slides_16-files-their-organization_chapter-16358 33 powerpoint-slides_16-files-their-organization_chapter-16
358 33 powerpoint-slides_16-files-their-organization_chapter-16sumitbardhan
 
Bba203 unit 2data processing concepts
Bba203   unit 2data processing conceptsBba203   unit 2data processing concepts
Bba203 unit 2data processing conceptskinjal patel
 
Week 1 Before the Advent of Database Systems & Fundamental Concepts
Week 1 Before the Advent of Database Systems & Fundamental ConceptsWeek 1 Before the Advent of Database Systems & Fundamental Concepts
Week 1 Before the Advent of Database Systems & Fundamental Conceptsoudesign
 

Similaire à Files (20)

3620121datastructures.ppt
3620121datastructures.ppt3620121datastructures.ppt
3620121datastructures.ppt
 
DBMS (UNIT 5)
DBMS (UNIT 5)DBMS (UNIT 5)
DBMS (UNIT 5)
 
Introduction to File System
Introduction to File SystemIntroduction to File System
Introduction to File System
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
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
 
Degonto file management
Degonto file managementDegonto file management
Degonto file management
 
File organisation
File organisationFile organisation
File organisation
 
fileorganizationandintroductionofdbms-210313163900.pdf
fileorganizationandintroductionofdbms-210313163900.pdffileorganizationandintroductionofdbms-210313163900.pdf
fileorganizationandintroductionofdbms-210313163900.pdf
 
Module03
Module03Module03
Module03
 
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 in database
File organization in databaseFile organization in database
File organization in database
 
File Management – File Concept, access methods, File types and File Operation
File Management – File Concept, access methods,  File types and File OperationFile Management – File Concept, access methods,  File types and File Operation
File Management – File Concept, access methods, File types and File Operation
 
File Types in Data Structure
File Types in Data StructureFile Types in Data Structure
File Types in Data Structure
 
File Systems
File SystemsFile Systems
File Systems
 
Files
FilesFiles
Files
 
358 33 powerpoint-slides_16-files-their-organization_chapter-16
358 33 powerpoint-slides_16-files-their-organization_chapter-16358 33 powerpoint-slides_16-files-their-organization_chapter-16
358 33 powerpoint-slides_16-files-their-organization_chapter-16
 
Bba203 unit 2data processing concepts
Bba203   unit 2data processing conceptsBba203   unit 2data processing concepts
Bba203 unit 2data processing concepts
 
Week 1 Before the Advent of Database Systems & Fundamental Concepts
Week 1 Before the Advent of Database Systems & Fundamental ConceptsWeek 1 Before the Advent of Database Systems & Fundamental Concepts
Week 1 Before the Advent of Database Systems & Fundamental Concepts
 
Dude.pptx
Dude.pptxDude.pptx
Dude.pptx
 

Plus de Mukund Trivedi (20)

New file and form 2
New file and form 2New file and form 2
New file and form 2
 
Evaluation
EvaluationEvaluation
Evaluation
 
Database
DatabaseDatabase
Database
 
Case tools
Case toolsCase tools
Case tools
 
Evaluation
EvaluationEvaluation
Evaluation
 
Dfd final
Dfd finalDfd final
Dfd final
 
Sad
SadSad
Sad
 
Ff40fnatural resources (1)
Ff40fnatural resources (1)Ff40fnatural resources (1)
Ff40fnatural resources (1)
 
Ff40fnatural resources
Ff40fnatural resourcesFf40fnatural resources
Ff40fnatural resources
 
F58fbnatural resources 2 (1)
F58fbnatural resources 2 (1)F58fbnatural resources 2 (1)
F58fbnatural resources 2 (1)
 
F58fbnatural resources 2
F58fbnatural resources 2F58fbnatural resources 2
F58fbnatural resources 2
 
F6dc1 session6 c++
F6dc1 session6 c++F6dc1 session6 c++
F6dc1 session6 c++
 
Ee2fbunit 7
Ee2fbunit 7Ee2fbunit 7
Ee2fbunit 7
 
E212d9a797dbms chapter3 b.sc2 (2)
E212d9a797dbms chapter3 b.sc2 (2)E212d9a797dbms chapter3 b.sc2 (2)
E212d9a797dbms chapter3 b.sc2 (2)
 
E212d9a797dbms chapter3 b.sc2 (1)
E212d9a797dbms chapter3 b.sc2 (1)E212d9a797dbms chapter3 b.sc2 (1)
E212d9a797dbms chapter3 b.sc2 (1)
 
E212d9a797dbms chapter3 b.sc2
E212d9a797dbms chapter3 b.sc2E212d9a797dbms chapter3 b.sc2
E212d9a797dbms chapter3 b.sc2
 
C96e1 session3 c++
C96e1 session3 c++C96e1 session3 c++
C96e1 session3 c++
 
B1ce9 assignmentbsc
B1ce9 assignmentbscB1ce9 assignmentbsc
B1ce9 assignmentbsc
 
Af7ff syllabuslablist
Af7ff syllabuslablistAf7ff syllabuslablist
Af7ff syllabuslablist
 
106da session5 c++
106da session5 c++106da session5 c++
106da session5 c++
 

Dernier

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 

Dernier (20)

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 

Files

  • 2. WHAT ARE FILES ? A computer file is a block of arbitrary information, or resource for storing information, which is available to a computer program and is usually based on some kind of durable storage
  • 3.
  • 4. The twin disk files of an IBM 305 system
  • 5.
  • 6.
  • 7.
  • 8.
  • 9. Sequential access is sometimes the only way of accessing the data, for example if it is on a tape. It may also be the access method of choice, for example if we simply want to process a sequence of data elements in order. 1 In data structures , a data structure is said to have sequential access if one can only visit the values it contains in one particular order. The canonical example is the linked list . Indexing into a list that has sequential access requires O ( k ) time, where k is the index. As a result, many algorithms such as quicksort and binary search degenerate into bad algorithms that are even less efficient than their naïve alternatives; these algorithms are impractical without random access . On the other hand, some algorithms, typically those that don't index, require only sequential access, such as mergesort , and face no penalty.
  • 10. Example of Random Access File Storage How you use it is up to you- you could for example have a file full of equal size records. If these records have a size of 100 then record 0 occupies bytes 0-99, record 1 occupies bytes 100-199 etc. More generally record n starts at (n-1)*sizeof(record).
  • 11. In data structures , Random access implies the ability to access any entry in a list of numbers in constant (i.e. independent of its position in the list and of list's size, i.e. ) time. Very few data structures can guarantee this, other than arrays (and related structures like dynamic arrays ). Random access is critical to many algorithms such as binary search , integer sorting or sieve of Eratosthenes . Other data structures, such as linked lists , sacrifice random access to make for efficient inserts, deletes, or reordering of data. Self-balancing binary search trees may provide an acceptable compromise, where access time is equal for any member of a collection and only grows logarithmically with its size.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. Value Rick Jim Bill jill Data file Rec num 1 2 3 4 Value 3 4 2 1 Index file Rec num 1 2 3 4
  • 18. Index file is just made up of numbers, and the records in the index file are arranged such that they indicate the record of the data file that should hold this position. For instance, if we want to find the first person alphabetically in our data file we would go to the index file and get the first index record. We find the index value to be 3. So we then Get the 3rd record from the data file, and determine that the first record alphabetically is "Bill." The index record value 3 can be thought of as a pointer to the data file record.