Presentation is loading. Please wait.

Presentation is loading. Please wait.

Data files ? ? ? ?.  Data processing: in main memory  Economic problems -> big size data -> stored in external memory  Organization (identification,

Similar presentations


Presentation on theme: "Data files ? ? ? ?.  Data processing: in main memory  Economic problems -> big size data -> stored in external memory  Organization (identification,"— Presentation transcript:

1 Data files ? ? ? ?

2  Data processing: in main memory  Economic problems -> big size data -> stored in external memory  Organization (identification, classification, description, representation etc.)  internal  external: logical / physical  transformation (during I/E operations)  Concepts  file and record  organization methods and access types  processing operations

3  Logical level  File: external data structure ▪ linear, ordered, homogeneous (meaning and processing) ▪ composed of records (equal or varied length)  Record: data structure concerning one entity ▪ inhomogeneous, ordered ▪ composed of fields  Physical level  File: OS records, actual data: flow of bytes, no inherent meaning  Representation: text, binary File and record Text files: CR/LF (13, 10) Binary files: nothing Text files: EOF (27, CTRL-Z) Binary files: nothing

4 File and record  Transfer between external storage and internal memory  read / write  record level: adequate descriptions and operations  Internal record structure  fixed structurestruct  variable structureunion  fixed part + variable part struct + union

5 Organization methods and access types  Organization method  Principles and rules  protection and retrieval ▪ sequential ▪ relative ▪ indexed ▪ etc. (selective, reversed, linked, multi-indexed …)  Access types  A way of finding records inside a file ▪ sequential ▪ direct (by relative number / key)

6 Sequential access

7 Direct access by relative number

8 Direct access by key

9 Detection of end of file  Direct influence on design of algorithms  By reading (Fortran, Cobol, C)  Depicted position IS NOT considered end of file  Read-independent (Basic, Pascal/Delphi)  Depicted position IS considered end of file

10 Sequential organization  Sequentially organized file  same / varied length records  records are stored in the order they were added  access types: sequential, direct (depending on file support)  examples: text file (varied length records), binary data files (same length records)

11 Relative organization  Relative organized file  same length records  relative key: numerical, domain of values  records are stored at the position indicated by the key  biunivocal relationship ▪ free spaces, valid records  access types: sequential, direct (relative key  relative number)  examples: binary data files

12 Indexed organization  Indexed file  two physical files: index file, data file (sequential)  same length records  alphanumerical keys  records are stored in the data file in the order they were added  Access types: sequential, direct (key)

13 Processing operations  File level  gain access (open)  end acces (close)  File must be closed  delete  rename  etc.  Record level  File must be open  populate  add record(s)  retrieve record(s)  modify record(s)  delete record(s)  Basic operations  read / write  with / without conversion  Homework: subchapters 2.1,2.2,2.3, 2.4

14 Spor la înv ă ţat!


Download ppt "Data files ? ? ? ?.  Data processing: in main memory  Economic problems -> big size data -> stored in external memory  Organization (identification,"

Similar presentations


Ads by Google