SlideShare una empresa de Scribd logo
1 de 46
MINIMIZE      MAXIMIZE
ACCESS TIME   SPACE USAGE
    ???           ???
One trip
Minimum
  trips
Sending
Related
  data
Why not Data
Structures???
So when we have a huge data,
 We can use file structures to
access them quickly , thereby
 making it more efficient than
       data structures.
Data Management in Files




       USN : 1MS10ISO34
      Name : Dileep Kodira
         College : MSRIT
        Place : Bangalore
FIXED LENGTH FIELDS - force the
   fields into predicable (fixed) length
     FOUR MOST
LENGTH INDICATOR FIELDS -begin
     COMMON WAYS
each field with the length indicator
     OF STRUCTURING at the
DELIMITED FIELDS - place delimiter
     FIELDS ARE
end of each field to separate the fields
  SELF-DESCRIBING FIELDS- use
  “keyword=value” expression to identify
  each field and its contents
Fixing the Length of Fields
• This method relies on creating fields of
  predictable fixed size.
• E.G. One may define the following class:
        class Person {
        public:
          char last[11];
          char first[11];
          char address[16];
          char city[16];
          char state[3];
          char zip[10];
        }
Fixing the Length of Fields
• Disadvantages:
     • a lot of wasted space due to “padding” of fields
       with “blanks”
     • data values may not fit into the field sizes:
            » e.g. Michalopoulos is too long to fit in the array
              char last[11]

• Thus the fixed-size field approach is
  inappropriate for data that inherently
  contains a large amount of variability in the
  length of fields such as names or addresses.
Beginning Each Field with a
         Length Indicator
• This method requires that each field data
  be preceded with an indicator of its length
  (in bytes).
E.G.
 04Ames04Mary09123 Maple10StillWater02OK0574075
• One of the disadvantages of this method is that it
  is more complex since it requires extracting of
  numbers and strings from a single string
  representing a record.
Separating Fields with
            Delimiters
• This method requires that the fields be
  separated by a selected special character or
  a sequence of characters called a delimiter.
• E.G. If “|” is used as a delimiter then a
  sample record would look like this:
  Ames|Mary|123Maple|StillWater|OK|574075|
Separating Fields with
            Delimiters
• The method of separating fields with a
  delimiter is often used. However choosing a
  right delimiter is very important.

• In many cases white-space characters
  (blanks) are excellent delimiters because
  they provide a clean separation between
  fields when we list them on the console.
Using a “keyword = value” expression
• This method requires that each field data be
  preceded with the field identifier (keyword).
E.G.
  last=Amesfirst=Maryaddress=123
  Maplecity=StillWaterstate=OKzip=574075
• Can be used with the delimiter method to
  mark the field ends.
  last=Ames|first=Mary|address=123
  Maple|City=StillWater|state=OK|zip=574075
Using a “keyword = value” expression

• Advantages:
     • each field provides information about itself
     • good format for dealing with missing fields


• Disadvantages:
     • In some application a lot of space may be wasted on
       field keywords (up 50%).
Record Structures
• Files may be viewed as collections of records
  which are sets of fields
• Some of the most often used methods for
  organizing the records of a file are:
   – require that the records be a predictable (fixed)
     number of bytes in length
   – require that the records be a predicable
     number of fields in length
Organizing the Records of a File
 – begin each record with its length indicator
   (count of the of bytes in the record)
 – use a second file to keep track of the beginning
   byte address for each record
 – place a delimiter at the end of each record to
   separate it from the next record
Fixed-Length Records
• This method is a counterpart of is
  analogous method for organizing files with
  fix length fields.
• Fixing the sizes of fields in a record will
  produce a fixed-size record.
Fixed-Length Records
• E.G.
         class Person {
         public:
           char last[11];
           char first[11];
           char address[16];
           char city[16];
           char state[3];
           char zip[10];
         }
         Will produce a fixed size record of size 67 bytes.
Fixed-Length Records
• The fixed length record structure, however,
  does NOT imply, the fixed -length field
  structure.
• Fixed-length records are frequently used as
  “containers” to hold variable numbers of
  variable-length fields.
• Fixed-length record structures are among
  the most commonly used methods for
  organizing files.
Records with a Predicable
         Number of Fields
• The method specifies the number of fields
  in each record.
• Regardless of the method for storing fields,
  this approach allows for relatively easy
  means for calculating record boundaries.
Records with a Length Indicator

• This method requires that each record
  begin with a length indicator.

• This method is commonly used for handling
  variable-length records.
Index File to Keep Track of
        Record Addresses

• This method uses an index file (or an index
  block) to keep a byte offset for each record
  in the original data file. The byte offsets
  (record addresses) allow us to find the
  beginning of each successive record and
  compute the length of each record.
Records Separated with
            Delimiters
• This method is analogous to the use of
  delimiters to separate fields.
• As with fields the delimiter must be well
  chosen and it cannot be a part of data.
• Common delimiter is the end-of-line
  character ‘n’, since records often are read
  directly to the console.
A Record Structure that Uses a
       Length Indicator
• Use a memory buffer to store the data that
  is going to be written to the disk.
• Write down the size of the record at the
  beginning of it.
• Write down the buffer contents after
  writing the size.
Name : Dileep
                 FIELDS
                RECORDS


                 USN : 1MS10IS034
                 USN : 1MS10ISO34
                    Name : Dileep
                  USN : 1MS10IS034
                   College Dileep
                    Name : : MSRIT
                     Name : Dileep
                        Kodira
                  Place : Bangalore
                    College : MSRIT
                   College : MSRIT
                   Place : Bangalore
                  Place : Bangalore
USN : 1MS10IS034
Name : Dileep Kodira
  College : MSRIT
 Place : Bangalore
USN :
  1MS10IS034
 Name : Dileep
     Kodira
College : MSRIT
     Place :
   Bangalore
UNPACKING



        Name : Dileep
     USN : 1MS10IS034
       Name : Dileep
      College : MSRIT
     Place : Bangalore
RUN LENGTH ENCODING
 – Represents data using value and run length
 – Run length defined as number of consecutive equal
   values

              RLE
 1110011111         130215

                                Run Lengths

                       Values
RUN LENGTH ENCODING
Applications
• Useful for compressing data that contains
  repeated values
  – e.g. output from a filter, many consecutive values are
    0.
• Very simple compared with other compression
  techniques
• Reversible (Lossless) compression
  – decompression is just as easy
MORSE CODING

 REPRESENTS ANY ALPHA-NUMERICAL
  CHARACTER USING TWO SYMBOLS
AND VERIETY OF SPACES BETWEEN THEM
HUFFMAN CODING
• Suppose we have a message consisting of 5 symbols, e.g.
  [                   ]
• How can we code this message using 0/1 so the coded
  message will have minimum length (for transmission or
  saving!)

• 5 symbols  at least 3 bits
• For a simple encoding,
 length of code is 10*3=30 bits
HUFFMAN CODING
• Intuition: Those symbols that are more frequent should have
  smaller codes, yet since their length is not the same, there
  must be a way of distinguishing each code

• For Huffman code,
length of encoded message
will be
=3*2 +3*2+2*2+3+3=24bits
Thank you




            Dileep Kodira

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Lecture optimal binary search tree
Lecture optimal binary search tree Lecture optimal binary search tree
Lecture optimal binary search tree
 
Insertion sort bubble sort selection sort
Insertion sort bubble sort  selection sortInsertion sort bubble sort  selection sort
Insertion sort bubble sort selection sort
 
Trees, Binary Search Tree, AVL Tree in Data Structures
Trees, Binary Search Tree, AVL Tree in Data Structures Trees, Binary Search Tree, AVL Tree in Data Structures
Trees, Binary Search Tree, AVL Tree in Data Structures
 
Cost estimation for Query Optimization
Cost estimation for Query OptimizationCost estimation for Query Optimization
Cost estimation for Query Optimization
 
12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS
 
Asymptotic Notation
Asymptotic NotationAsymptotic Notation
Asymptotic Notation
 
Bfs and Dfs
Bfs and DfsBfs and Dfs
Bfs and Dfs
 
Math1003 1.10 - Binary to Hex Conversion
Math1003 1.10 - Binary to Hex ConversionMath1003 1.10 - Binary to Hex Conversion
Math1003 1.10 - Binary to Hex Conversion
 
Relational database
Relational database Relational database
Relational database
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
 
Merge sort algorithm power point presentation
Merge sort algorithm power point presentationMerge sort algorithm power point presentation
Merge sort algorithm power point presentation
 
Graph in data structure
Graph in data structureGraph in data structure
Graph in data structure
 
Shadow paging
Shadow pagingShadow paging
Shadow paging
 
Tree - Data Structure
Tree - Data StructureTree - Data Structure
Tree - Data Structure
 
Disjoint sets
Disjoint setsDisjoint sets
Disjoint sets
 
Tree in data structure
Tree in data structureTree in data structure
Tree in data structure
 
Selection sorting
Selection sortingSelection sorting
Selection sorting
 
Quick sort-Data Structure
Quick sort-Data StructureQuick sort-Data Structure
Quick sort-Data Structure
 
Linear Search Presentation
Linear Search PresentationLinear Search Presentation
Linear Search Presentation
 
AVL Tree
AVL TreeAVL Tree
AVL Tree
 

Destacado

Discussion : File structure of Meteor Apps
Discussion : File structure of Meteor AppsDiscussion : File structure of Meteor Apps
Discussion : File structure of Meteor AppsSangwon Lee
 
Ie Storage, Multimedia And File Organization
Ie   Storage, Multimedia And File OrganizationIe   Storage, Multimedia And File Organization
Ie Storage, Multimedia And File OrganizationMISY
 
Disk structure & File Handling
Disk structure & File HandlingDisk structure & File Handling
Disk structure & File HandlingMomina Idrees
 
Gps file structure explained
Gps file structure explainedGps file structure explained
Gps file structure explainedJaap Oosterhoff
 
OS - File Handling
OS - File HandlingOS - File Handling
OS - File Handlingvinay arora
 
04.01 file organization
04.01 file organization04.01 file organization
04.01 file organizationBishal Ghimire
 
storage and file structure
storage and file structurestorage and file structure
storage and file structureSheshan Sheniwal
 
register file structure of PIC controller
register file structure of PIC controllerregister file structure of PIC controller
register file structure of PIC controllerNirbhay Singh
 
File organization and processing
File organization and processingFile organization and processing
File organization and processingburhan123456
 
Ch 1-final-file organization from korth
Ch 1-final-file organization from korthCh 1-final-file organization from korth
Ch 1-final-file organization from korthRupali Rana
 
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
 
File organization techniques
File organization techniquesFile organization techniques
File organization techniquesMeghlal Khan
 

Destacado (20)

File structures
File structuresFile structures
File structures
 
Discussion : File structure of Meteor Apps
Discussion : File structure of Meteor AppsDiscussion : File structure of Meteor Apps
Discussion : File structure of Meteor Apps
 
CS215 - Lec 2 file organization
CS215 - Lec 2   file organizationCS215 - Lec 2   file organization
CS215 - Lec 2 file organization
 
Ie Storage, Multimedia And File Organization
Ie   Storage, Multimedia And File OrganizationIe   Storage, Multimedia And File Organization
Ie Storage, Multimedia And File Organization
 
Disk structure & File Handling
Disk structure & File HandlingDisk structure & File Handling
Disk structure & File Handling
 
Gps file structure explained
Gps file structure explainedGps file structure explained
Gps file structure explained
 
CS215 - Lec 9 indexing and reclaiming space in files
CS215 - Lec 9  indexing and reclaiming space in filesCS215 - Lec 9  indexing and reclaiming space in files
CS215 - Lec 9 indexing and reclaiming space in files
 
File structure
File structureFile structure
File structure
 
OS - File Handling
OS - File HandlingOS - File Handling
OS - File Handling
 
File structure
File structureFile structure
File structure
 
04.01 file organization
04.01 file organization04.01 file organization
04.01 file organization
 
storage and file structure
storage and file structurestorage and file structure
storage and file structure
 
register file structure of PIC controller
register file structure of PIC controllerregister file structure of PIC controller
register file structure of PIC controller
 
File organization and processing
File organization and processingFile organization and processing
File organization and processing
 
Ch 1-final-file organization from korth
Ch 1-final-file organization from korthCh 1-final-file organization from korth
Ch 1-final-file organization from korth
 
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
 
File organization techniques
File organization techniquesFile organization techniques
File organization techniques
 
Handling computer files
Handling computer filesHandling computer files
Handling computer files
 
Digital Search Tree
Digital Search TreeDigital Search Tree
Digital Search Tree
 
File organization
File organizationFile organization
File organization
 

Similar a Maximizing Efficiency with File Structures

embedded system-Memory_Organization_final.pdf
embedded system-Memory_Organization_final.pdfembedded system-Memory_Organization_final.pdf
embedded system-Memory_Organization_final.pdfSarveshPandey64
 
cache memory introduction, level, function
cache memory introduction, level, functioncache memory introduction, level, function
cache memory introduction, level, functionTeddyIswahyudi1
 
Dremel interactive analysis of web scale datasets
Dremel interactive analysis of web scale datasetsDremel interactive analysis of web scale datasets
Dremel interactive analysis of web scale datasetsCarl Lu
 
04_Cache Memory.ppt
04_Cache Memory.ppt04_Cache Memory.ppt
04_Cache Memory.pptShiva340703
 
3-Application Layer.pptx
3-Application Layer.pptx3-Application Layer.pptx
3-Application Layer.pptxSachinDUpadhye
 
Unit v memory & programmable logic devices
Unit v   memory & programmable logic devicesUnit v   memory & programmable logic devices
Unit v memory & programmable logic devicesKanmaniRajamanickam
 
Cache Memory for Computer Architecture.ppt
Cache Memory for Computer Architecture.pptCache Memory for Computer Architecture.ppt
Cache Memory for Computer Architecture.pptrularofclash69
 
INT 222.pptx
INT 222.pptxINT 222.pptx
INT 222.pptxSaunya2
 
16119 - Get to Know Your Data Sets (1).pdf
16119 - Get to Know Your Data Sets (1).pdf16119 - Get to Know Your Data Sets (1).pdf
16119 - Get to Know Your Data Sets (1).pdf3operatordcslipiPeng
 
Microcontroller.pptx
Microcontroller.pptxMicrocontroller.pptx
Microcontroller.pptxSaba651353
 

Similar a Maximizing Efficiency with File Structures (20)

embedded system-Memory_Organization_final.pdf
embedded system-Memory_Organization_final.pdfembedded system-Memory_Organization_final.pdf
embedded system-Memory_Organization_final.pdf
 
MySql
MySqlMySql
MySql
 
cache memory introduction, level, function
cache memory introduction, level, functioncache memory introduction, level, function
cache memory introduction, level, function
 
Dremel interactive analysis of web scale datasets
Dremel interactive analysis of web scale datasetsDremel interactive analysis of web scale datasets
Dremel interactive analysis of web scale datasets
 
CS215 - Lec 6 record index
CS215 - Lec 6  record indexCS215 - Lec 6  record index
CS215 - Lec 6 record index
 
CAO-Unit-III.pptx
CAO-Unit-III.pptxCAO-Unit-III.pptx
CAO-Unit-III.pptx
 
FS Mod2@AzDOCUMENTS.in.pdf
FS Mod2@AzDOCUMENTS.in.pdfFS Mod2@AzDOCUMENTS.in.pdf
FS Mod2@AzDOCUMENTS.in.pdf
 
Application layer : DNS
Application layer : DNSApplication layer : DNS
Application layer : DNS
 
Application Layer.pptx
Application Layer.pptxApplication Layer.pptx
Application Layer.pptx
 
04_Cache Memory.ppt
04_Cache Memory.ppt04_Cache Memory.ppt
04_Cache Memory.ppt
 
3-Application Layer.pptx
3-Application Layer.pptx3-Application Layer.pptx
3-Application Layer.pptx
 
Compression techniques
Compression techniquesCompression techniques
Compression techniques
 
Unit v memory & programmable logic devices
Unit v   memory & programmable logic devicesUnit v   memory & programmable logic devices
Unit v memory & programmable logic devices
 
The Internet Protocol version 4 (IPv4)
The Internet Protocol version 4 (IPv4)The Internet Protocol version 4 (IPv4)
The Internet Protocol version 4 (IPv4)
 
Cache mapping
Cache mappingCache mapping
Cache mapping
 
Cache Memory for Computer Architecture.ppt
Cache Memory for Computer Architecture.pptCache Memory for Computer Architecture.ppt
Cache Memory for Computer Architecture.ppt
 
INT 222.pptx
INT 222.pptxINT 222.pptx
INT 222.pptx
 
16119 - Get to Know Your Data Sets (1).pdf
16119 - Get to Know Your Data Sets (1).pdf16119 - Get to Know Your Data Sets (1).pdf
16119 - Get to Know Your Data Sets (1).pdf
 
IPV4 addresses
IPV4 addressesIPV4 addresses
IPV4 addresses
 
Microcontroller.pptx
Microcontroller.pptxMicrocontroller.pptx
Microcontroller.pptx
 

Último

Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxPoojaSen20
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 

Último (20)

Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 

Maximizing Efficiency with File Structures

  • 1.
  • 2.
  • 3.
  • 4.
  • 5. MINIMIZE MAXIMIZE ACCESS TIME SPACE USAGE ??? ???
  • 9.
  • 10.
  • 11.
  • 12.
  • 14.
  • 15. So when we have a huge data, We can use file structures to access them quickly , thereby making it more efficient than data structures.
  • 16. Data Management in Files USN : 1MS10ISO34 Name : Dileep Kodira College : MSRIT Place : Bangalore
  • 17. FIXED LENGTH FIELDS - force the fields into predicable (fixed) length FOUR MOST LENGTH INDICATOR FIELDS -begin COMMON WAYS each field with the length indicator OF STRUCTURING at the DELIMITED FIELDS - place delimiter FIELDS ARE end of each field to separate the fields SELF-DESCRIBING FIELDS- use “keyword=value” expression to identify each field and its contents
  • 18. Fixing the Length of Fields • This method relies on creating fields of predictable fixed size. • E.G. One may define the following class: class Person { public: char last[11]; char first[11]; char address[16]; char city[16]; char state[3]; char zip[10]; }
  • 19. Fixing the Length of Fields • Disadvantages: • a lot of wasted space due to “padding” of fields with “blanks” • data values may not fit into the field sizes: » e.g. Michalopoulos is too long to fit in the array char last[11] • Thus the fixed-size field approach is inappropriate for data that inherently contains a large amount of variability in the length of fields such as names or addresses.
  • 20. Beginning Each Field with a Length Indicator • This method requires that each field data be preceded with an indicator of its length (in bytes). E.G. 04Ames04Mary09123 Maple10StillWater02OK0574075 • One of the disadvantages of this method is that it is more complex since it requires extracting of numbers and strings from a single string representing a record.
  • 21. Separating Fields with Delimiters • This method requires that the fields be separated by a selected special character or a sequence of characters called a delimiter. • E.G. If “|” is used as a delimiter then a sample record would look like this: Ames|Mary|123Maple|StillWater|OK|574075|
  • 22. Separating Fields with Delimiters • The method of separating fields with a delimiter is often used. However choosing a right delimiter is very important. • In many cases white-space characters (blanks) are excellent delimiters because they provide a clean separation between fields when we list them on the console.
  • 23. Using a “keyword = value” expression • This method requires that each field data be preceded with the field identifier (keyword). E.G. last=Amesfirst=Maryaddress=123 Maplecity=StillWaterstate=OKzip=574075 • Can be used with the delimiter method to mark the field ends. last=Ames|first=Mary|address=123 Maple|City=StillWater|state=OK|zip=574075
  • 24. Using a “keyword = value” expression • Advantages: • each field provides information about itself • good format for dealing with missing fields • Disadvantages: • In some application a lot of space may be wasted on field keywords (up 50%).
  • 25. Record Structures • Files may be viewed as collections of records which are sets of fields • Some of the most often used methods for organizing the records of a file are: – require that the records be a predictable (fixed) number of bytes in length – require that the records be a predicable number of fields in length
  • 26. Organizing the Records of a File – begin each record with its length indicator (count of the of bytes in the record) – use a second file to keep track of the beginning byte address for each record – place a delimiter at the end of each record to separate it from the next record
  • 27. Fixed-Length Records • This method is a counterpart of is analogous method for organizing files with fix length fields. • Fixing the sizes of fields in a record will produce a fixed-size record.
  • 28. Fixed-Length Records • E.G. class Person { public: char last[11]; char first[11]; char address[16]; char city[16]; char state[3]; char zip[10]; } Will produce a fixed size record of size 67 bytes.
  • 29. Fixed-Length Records • The fixed length record structure, however, does NOT imply, the fixed -length field structure. • Fixed-length records are frequently used as “containers” to hold variable numbers of variable-length fields. • Fixed-length record structures are among the most commonly used methods for organizing files.
  • 30. Records with a Predicable Number of Fields • The method specifies the number of fields in each record. • Regardless of the method for storing fields, this approach allows for relatively easy means for calculating record boundaries.
  • 31. Records with a Length Indicator • This method requires that each record begin with a length indicator. • This method is commonly used for handling variable-length records.
  • 32. Index File to Keep Track of Record Addresses • This method uses an index file (or an index block) to keep a byte offset for each record in the original data file. The byte offsets (record addresses) allow us to find the beginning of each successive record and compute the length of each record.
  • 33. Records Separated with Delimiters • This method is analogous to the use of delimiters to separate fields. • As with fields the delimiter must be well chosen and it cannot be a part of data. • Common delimiter is the end-of-line character ‘n’, since records often are read directly to the console.
  • 34. A Record Structure that Uses a Length Indicator • Use a memory buffer to store the data that is going to be written to the disk. • Write down the size of the record at the beginning of it. • Write down the buffer contents after writing the size.
  • 35. Name : Dileep FIELDS RECORDS USN : 1MS10IS034 USN : 1MS10ISO34 Name : Dileep USN : 1MS10IS034 College Dileep Name : : MSRIT Name : Dileep Kodira Place : Bangalore College : MSRIT College : MSRIT Place : Bangalore Place : Bangalore
  • 36. USN : 1MS10IS034 Name : Dileep Kodira College : MSRIT Place : Bangalore
  • 37.
  • 38. USN : 1MS10IS034 Name : Dileep Kodira College : MSRIT Place : Bangalore
  • 39. UNPACKING Name : Dileep USN : 1MS10IS034 Name : Dileep College : MSRIT Place : Bangalore
  • 40.
  • 41. RUN LENGTH ENCODING – Represents data using value and run length – Run length defined as number of consecutive equal values RLE 1110011111 130215 Run Lengths Values
  • 42. RUN LENGTH ENCODING Applications • Useful for compressing data that contains repeated values – e.g. output from a filter, many consecutive values are 0. • Very simple compared with other compression techniques • Reversible (Lossless) compression – decompression is just as easy
  • 43. MORSE CODING REPRESENTS ANY ALPHA-NUMERICAL CHARACTER USING TWO SYMBOLS AND VERIETY OF SPACES BETWEEN THEM
  • 44. HUFFMAN CODING • Suppose we have a message consisting of 5 symbols, e.g. [ ] • How can we code this message using 0/1 so the coded message will have minimum length (for transmission or saving!) • 5 symbols  at least 3 bits • For a simple encoding, length of code is 10*3=30 bits
  • 45. HUFFMAN CODING • Intuition: Those symbols that are more frequent should have smaller codes, yet since their length is not the same, there must be a way of distinguishing each code • For Huffman code, length of encoded message will be =3*2 +3*2+2*2+3+3=24bits
  • 46. Thank you Dileep Kodira

Notas del editor

  1. Any writer or designer will tell you that 90% of the creative process…