Contents
Chapter 3 · SoftwarePractice

LEARN WITH HARU

Video Lesson တွေက Haru အတန်းသားတွေအတွက်ပါ

Haru ရဲ့ ITPEC FE Full Course မှာ ယခု သင်ခန်းစာတွေကို တစ်ခုချင်း တစ်ကြောင်းချင်း အသေးစိတ်ရှင််ရှင်းပြထားပါတယ်

အခြေခံ မရှိတဲ့ ကျောင်းသားများစွာဟာလည်း ဒီ Course နဲ့ ပဲ အောင်မြင်ကုန်ကြပါပြီ

အတန်းမအပ်သေးပဲ Haru ဆီမှာ အစမ်းသင်ကြည့်ချင်ပါသလား?

သင်တန်းသားတွေရဲ့ စကားသံများ

သင်တန်းသားတွေရဲ့ စကားသံများ

Highlighted text? Practice this concept. Highlighted passages and figures open related questions.

Practice related questions (3)Progress & bookmarks

Current section

4-3 File Organization Formats

p. 231

Practice this section 3 linked exam questions with default filters

Progress

Not marked complete

Related questions in this lesson 5

Partitioned program libraries1Sequential collision handling1Folding and adding record keys1Hash functions and record addresses1Hash division remainder calculation1
Progress and bookmarks

p. 231

4 - 3 File Organization Formats

A file organization format defines the order of records to be recorded in a file and the structure. The user must consider specifically how the file is to be used and consider which organization format is appropriate.

4-3-1 Sequential Organization

Sequential organization file has a dedicated organization format for sequential access, which writes records sequentially on storage media. Its usage of storage media is efficient because the records are written sequentially, but it cannot insert records in the middle of a file. Since records are always processed in order, it is effective to read records in advance by using a buffer. This organization can be implemented on all storage media including DASD (Direct Access Storage Devices). However, on magnetic tape, only sequential organization can be implemented.

4-3-2 Relative Organization

Relative organization file has a format that writes records in order as in a sequential organization file, and then assigns a relative number (i.e., relative address) to each record from the top of records. Since the records are written sequentially, it uses storage media efficiently, and direct access with the relative number of a record is also possible.

4-3-3 Indexed Sequential Organization

An indexed sequential organization file (or indexed sequential file) is composed of two areas: an area for data, and an area in which information (i.e., index) for direct access to a specific record is stored. Its usage of storage media is efficient, and it can create large files.

Original textbook callout or table. Source text: • Prime area This is an area in which records are stored. Records in this area are stored in logically ascending order, and sequential access is possible. • Index area
p. 231 · Enlarge

p. 232

Original textbook callout or table. Source text: This is an area in which index records that match record keys with record addresses are stored. Types of indexes include a master index, a cylinder index and a track index. • Overflow area This is an area in which records ejected from the prime area are stored. If many records are stored in this area, the efficiency of access decreases and reorganization is required. Types of overflow areas include a cylinder overflow area and an independent overflow area.
p. 232 · Enlarge

4-3-4 Partitioned Organization

In a partitioned organization file, a file is divided into multiple units called members to store it. The information from each member is managed with a directory. Members are subfiles into which a sequential organization is divided, and update management can be performed in units of members. However, deletion of members only removes the members from the directory and the corresponding members in the memory area remain as is. As a result, the number of waste areas in which unused members are stored increases, and storage efficiency decreases, so it is necessary to periodically reorganize memory areas. Partitioned organization files are generally used as a program library. · 1 question

4-3-5 Direct Organization

A direct organization file has a dedicated format for direct access that enables access to a specific record by the specification of an address. The location of records is not sequential, so it does not use storage media efficiently. It can only be implemented on DASD (Direct Access Storage Devices) such as hard disks. In order to specify a specific record, direct addressing and indirect addressing are available as methods to calculate the address by using the key item of a record.

(1) Direct addressing

Direct addressing uses the value of a record key as the record address. No processing is required to calculate the address, but depending on the record key, there may be many variations of addresses, so it is not practical.

p. 233

Record key 4065 points directly to record address 4065 among the adjacent numbered addresses. Source text: Figure 3-13 Direct addressing
p. 233 · Enlarge

There are also methods that use a correspondence table for record keys and record addresses. However this requires a large number of elements equal to the records to be stored, so its usage is limited to a small number of records.

(2) Indirect addressing

Indirect addressing changes the value of a record key in accordance with a rule and calculates the record address. This conversion is called hashing, and the used rule (i.e., function) is called a hash function. Therefore, a direct organization file that uses indirect addressing is sometimes called a hash organization file. · 1 question

Original aligned indirect-address calculation examples. Division: 123456 divided by 97 gives quotient 1272 and remainder 72. Superposition: 123+456=579. Radix-conversion polynomial uses powers of 3 and gives 543, followed by the original qualification on the next page. Source text: [Methods for calculating a record address from a record key with indirect addressing] • Division This is a method that divides a record key by a given value (e.g., generally the closest prime number to the total number of records) and uses the remainder as the address. Example: When the record key is 123456 and the number of records is 100, 123456 ÷ 97 (closest prime number to 100) = 1272 ... 72 => 72 is used as the record address. • Superposition This splits a record key into parts in accordance with a rule, and uses the sum of these parts as the address. Example: When the record key is 123456, it is split into parts comprising the three digits in the first half and the three digits in the second half. 123 + 456 = 579 => 579 is used as the record address. • Radix conversion Record keys are normally handled as decimal values, but this uses the result of conversion to a radix other than decimal (e.g., ternary) as the address. Example: When the record key is 123456, ternary radix conversion is performed 1×35 + 2×34 + 3×33 + 4×32 + 5×31 + 6×30 = 543
p. 233 · Enlarge
Hash division remainder calculation · 1 practice questionsFolding and adding record keys · 1 practice questions

p. 234

Original textbook callout or table. Source text: => 543 is used as the record address. Note: In the case of ternary, the value of each digit normally does not exceed 2, but it is not necessary to consider this here.
p. 234 · Enlarge

With indirect addressing, different keys may be converted to the same record address and this phenomenon is called the occurrence of a synonym. When this happens, the record that can be used with the converted address is called the home record, and the one that cannot be used is called the synonym record.

Keys 234 and 525 both yield remainder 40 when divided by 97, producing a synonym at record address 40. Solid and dashed arrows distinguish the two keys. Source text: Figure 3-14 Occurrence of a synonym (with division by 97)
p. 234 · Enlarge

There are two methods to deal with a synonym. These are described below. In both methods, the subject record cannot be accessed with a record address calculated from the key, so the access efficiency is reduced; in other words, access time increases. Therefore, it is preferable that there be no bias in the distribution of key values, and that the record addresses calculated from key values be close to uniform distribution (i.e., a distribution in which the occurrence of a phenomenon has equal probability).

Original textbook callout or table. Source text: • Sequential method This stores the synonym record in an available area that is close to the calculated record address. Synonyms are prone to occurring in some cases. • Chain method This secures another memory area, and stores the synonym record in it. In this case, a pointer is required to indicate the address in which the synonym record is stored.
p. 234 · Enlarge
Sequential collision handling · 1 practice questions

4-3-6 VSAM Organization

VSAM organization files can be used with an OS that uses a virtual memory system. This can also be described as a way of implementing conventional file organization format virtually. In VSAM organization, a file is called a data set. The table and diagram below show the correspondence between data sets and file organizations, and data set structure, respectively.

p. 235

Original textbook callout or table. Source text: Data set name Corresponding file organization ESDS (Entry Sequence Data Set) Sequential organization file KSDS (Key Sequence Data Set) Indexed sequential organization file RRDS (Relative Record Data Set) Direct organization file/relative organization file
p. 235 · Enlarge
Original data-set structure: Data set contains control areas CA; a control area contains control intervals CI; a control interval contains logical records. Dotted branches and ellipses show repeated units. Source text: [Data set structure] • CA (Control Area) This is a logical control area that manages partitioned memory areas. • CI (Control Interval) This is a logical input/output unit that groups multiple logical records.
p. 235 · Enlarge

Original chapter exercises

Original chapter exercises →

New FE Textbook Vol.1 · IT Fundamentals · First Edition, April 2015