mid range concepts l.
Skip this Video
Loading SlideShow in 5 Seconds..
Mid Range Concepts PowerPoint Presentation
Download Presentation
Mid Range Concepts

Loading in 2 Seconds...

play fullscreen
1 / 10

Mid Range Concepts - PowerPoint PPT Presentation

  • Uploaded on

Mid Range Concepts. Chapter 11 Logical Files. Defining Keys. File Access: Direct Access : the storage device can go directly to the location and read the information stored there. Primary Key: Field whose value is unique for each record.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

Mid Range Concepts

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
mid range concepts

Mid Range Concepts

Chapter 11

Logical Files

defining keys
Defining Keys
  • File Access:
    • Direct Access: the storage device can go directly to the location and read the information stored there.
      • Primary Key: Field whose value is unique for each record.
    • Sequential Access: storage device must go through all storage locations that physically precede the storage location being sought.
      • Relative Record Number: Each record is given a number based on it relative position within the file.
defining keys3
Defining Keys
  • Key Fields: DDS provides the ability to define key fields.
    • KSAP (Keyed sequence access path): Provides the programmer the ability to access the records in both arrival sequence and keyed sequence.
  • Key Fields can be Primary or Secondary
    • Primary: unique
    • Secondary: not unique
defining keys4
Defining Keys
  • Primary Keys:
    • Place the word UNIQUE prior to any file references in DDS.
    • AFTER record specifications reenter the field name of the key with a K in position 17.
  • Secondary Keys:
    • Same as above but DO NOT specify unique.
logical files
Logical Files
  • Logical Files: usually created to satisfy different user access requirements.
    • They offer a different view of the data than supplied by the physical file.
    • They do not contain any data.
    • They are based on a physical file and cannot exist independently.
    • Utilize DDS to define the record layout.
logical files6
Logical Files
  • Record level keyword PFILE is required to specify the physical file they are based on.
  • Would you want to perform updates to logical files?
    • Be careful when not all the fields of the physical file are present.
logical files7
Logical Files
  • Can add or delete records of a physical file and the logical file will automatically see the adjustments.
  • Cannot delete an entire physical file if logical files exist using it.
    • Command: DSPDBR (Display Database relations) will display all dependent files for a specified file.
logical files8
Logical files
  • Logical files are much easier to change than physical files.
    • Can use the command FNDSTRPDM to find all programs that use the logical file because they will need to be recompiled.
logical files9
Logical Files
  • Joining logical file: Can contain information from multiple physical files.
    • Up to 32 files can be joined in a logical file.
    • JFILE keyword is used to specify file names.
    • JOIN keyword is used to specify files joined.
    • JFLD keyword is used to specify fields used to join the files.