Computer Science: An Overview (12th Edition)
12th Edition
ISBN: 9780133760064
Author: Glenn Brookshear, Dennis Brylow
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 9, Problem 54CRP
Program Plan Intro
Sequential files:
- A sequential file is a file that has same order of organization of records in which they are entered.
- The order of records does not change in sequential file.
- The information is arranged in a row in sequential files.
- In a sequential file, we can write and read data in a sequence only.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
A file has r=30,000 EMPLOYEE records of fixed-length. Consider a disk with block size B=512 bytes. A block pointer is P=6 bytes long and a record pointer is P R =7 bytes long.
Each record has the following fields: NAME (30 bytes), SSN (9 bytes), DEPARTMENTCODE (9 bytes), ADDRESS (40 bytes), PHONE (9 bytes), BIRTHDATE (8 bytes), SEX (1 byte), JOBCODE (4 bytes), SALARY (4 bytes, real number). An additional byte is used as a deletion marker.
a) Calculate the record size R in bytes.
b) Calculate the blocking factor bfr and the number of file blocks b assuming an unspanned organization.
c) Suppose the file is ordered by the key field SSN and we want to construct a primary index on SSN. Calculate the index blocking factor bfr i.
Suppose a file with 65536 records is organized using multi-level indexing as the file is ordered
on a non-key field. Each record is 48 bytes long and the size of its key field is 4 bytes. The
indexing is built on the key field of the file. The size of the disk block is 2 KB, and the block
pointer size is 12 bytes. The file organization is unspanned. How many blocks will be required
for the inner and outer index respectively in a multi-level index?
512 and 2
b) 512 and 4
e) 1024 and 4
d) 1024 and 8
Q1. One of the major tasks of operating system is to maintain the recently accessed files. There are many algorithms are available to keep the index of the file in a sequence they are accessed, out of which the most common is Last In First Out algorithm. If you are asked to write program to implement that which data structure would you prefer? Why?
Chapter 9 Solutions
Computer Science: An Overview (12th Edition)
Ch. 9.1 - Identify two departments in a manufacturing plant...Ch. 9.1 - Prob. 2QECh. 9.1 - Summarize the roles of the application software...Ch. 9.2 - Prob. 1QECh. 9.2 - Prob. 2QECh. 9.2 - Prob. 4QECh. 9.2 - Prob. 5QECh. 9.2 - Prob. 6QECh. 9.3 - Prob. 1QECh. 9.3 - What is a persistent object?
Ch. 9.3 - Identify some classes as well as some of their...Ch. 9.3 - Prob. 4QECh. 9.4 - Prob. 1QECh. 9.4 - Prob. 2QECh. 9.4 - Prob. 3QECh. 9.4 - Prob. 4QECh. 9.4 - Prob. 5QECh. 9.4 - Prob. 6QECh. 9.5 - Prob. 1QECh. 9.5 - Prob. 2QECh. 9.5 - Prob. 3QECh. 9.5 - Prob. 4QECh. 9.5 - Prob. 5QECh. 9.5 - Prob. 6QECh. 9.5 - Prob. 7QECh. 9.6 - Prob. 1QECh. 9.6 - Give an additional example of a pattern that might...Ch. 9.6 - Prob. 3QECh. 9.6 - How does data mining differ from traditional...Ch. 9.7 - Prob. 1QECh. 9.7 - Prob. 2QECh. 9.7 - Prob. 3QECh. 9.7 - Prob. 4QECh. 9 - Prob. 1CRPCh. 9 - Prob. 2CRPCh. 9 - Prob. 3CRPCh. 9 - Prob. 4CRPCh. 9 - Prob. 5CRPCh. 9 - Prob. 6CRPCh. 9 - Prob. 7CRPCh. 9 - Prob. 8CRPCh. 9 - Prob. 9CRPCh. 9 - Prob. 10CRPCh. 9 - Prob. 11CRPCh. 9 - Prob. 12CRPCh. 9 - Using the commands SELECT, PROJECT, and JOIN,...Ch. 9 - Answer Problem 13 using SQL. PROBLEM 13 13. Using...Ch. 9 - Prob. 15CRPCh. 9 - Prob. 16CRPCh. 9 - Prob. 17CRPCh. 9 - Prob. 18CRPCh. 9 - Prob. 19CRPCh. 9 - Empl Id Name Address SSN Job Id Job Title Skill...Ch. 9 - Empl Id Name Address SSN Job Id Job Title Skill...Ch. 9 - Prob. 22CRPCh. 9 - Prob. 23CRPCh. 9 - Prob. 24CRPCh. 9 - Prob. 25CRPCh. 9 - Write a sequence of instructions (using the...Ch. 9 - Prob. 27CRPCh. 9 - Prob. 28CRPCh. 9 - Prob. 29CRPCh. 9 - Prob. 30CRPCh. 9 - Prob. 31CRPCh. 9 - Prob. 32CRPCh. 9 - Prob. 33CRPCh. 9 - Prob. 34CRPCh. 9 - Prob. 35CRPCh. 9 - Prob. 36CRPCh. 9 - Prob. 37CRPCh. 9 - Prob. 38CRPCh. 9 - Prob. 39CRPCh. 9 - Prob. 40CRPCh. 9 - Prob. 41CRPCh. 9 - Prob. 42CRPCh. 9 - Prob. 43CRPCh. 9 - Prob. 44CRPCh. 9 - Prob. 45CRPCh. 9 - Prob. 46CRPCh. 9 - Prob. 47CRPCh. 9 - Prob. 48CRPCh. 9 - Prob. 49CRPCh. 9 - Prob. 50CRPCh. 9 - Prob. 51CRPCh. 9 - Prob. 52CRPCh. 9 - Prob. 53CRPCh. 9 - Prob. 54CRPCh. 9 - Prob. 55CRPCh. 9 - Prob. 56CRPCh. 9 - Prob. 57CRPCh. 9 - Prob. 58CRPCh. 9 - Prob. 59CRPCh. 9 - Prob. 60CRPCh. 9 - Prob. 61CRPCh. 9 - Prob. 62CRPCh. 9 - Prob. 1SICh. 9 - Prob. 2SICh. 9 - Prob. 3SICh. 9 - Prob. 4SICh. 9 - Prob. 5SICh. 9 - Prob. 6SICh. 9 - Prob. 7SICh. 9 - Prob. 8SICh. 9 - Prob. 9SICh. 9 - Prob. 10SI
Knowledge Booster
Similar questions
- Was the hierarchy of the file space something that arose by chance, or was it intentional from the beginning?arrow_forwardGive a few instances of the limitations of traditional file-processing.arrow_forwardCompute total no of blocks} Consider a file of 8192 records. Each record is 16 bytes long and its key field Is of size 6 bytes. The file is ordered on a key field, and the file organization is unspanned. The file is stored in a file system with block size 512 bytes, and the size of a block pointer is 10 bytes. If the primary index is built on the key field of the file, and a multilevel index scheme is used to store the primary index, number of first-level and second level blocks in the multilovel index are the respectively 16 and 1 b. 32 and 1 16 and 2 8 and 1 c. d.arrow_forward
- Answer the problem using counting techniques.arrow_forwardJSON and CSV are both text-based formats for the storage of data. It's possible to open either one in a plain text editor. Given this similarity, why does a CSV file usually take less memory than a JSON formatted file for the same data? Under what conditions could a JSON file be smaller in memory than a cSV file for the same data?arrow_forwardAttributes associated with a file can be maintained in several places as discussed inthe course content:a. Within the set of open file descriptorsb. Within the system-wide file table entry for the filec. Within the ‘i-node’ (or ‘v-node’)These attributes can be associated with the actual file (e.g. the file size), or can be associatedwith an open instance of the file (e.g. whether the file is opened for reading or writing, whether thefile is opened for non-blocking I/O, etc.).What would be preferred location of the following attributes of a file and why? Discuss anytradeoffs if that attribute could be in more than one of the above.a. The owner of the file.b. The “read/write” pointer of the open file.c. Whether the file is opened for reading, writing, or both.arrow_forward
- Write a MATLAB program to write a file conversion chart of the temperature. The key script would be: • Call a function that explains what will be achieved by the program. • Call a feature to prompt the user to degrees Fahrenheit for the minimum and maximum temperaturesand return all values. This feature checks to make sure the minimum is less than the maximum and, if not, calls a local feature to swap the values. call a function to write temperatures to a file: the temperature in degrees F from the minimum to the maximum in one column and the corresponding temperature in degrees Celsius in another column. The conversion is C= (F- 32) * 5/9.arrow_forwardQ2arrow_forwardIn English: For similar simulations that contain a huge volume of embarrasingly parallel items and that require much computation time and memory, it would be a better choice to arrange the whole simulation into chunks. How would you manage the task of chunk results data storage with a convenient file naming convention so that saving, loading, and erasing data files are handled with ease? Explain.arrow_forward
- The term Field in a file is defined as ...... O O O logical part of a file that holds a related set of data information that written in order from the beginning to the end part of a record which defines a specific informationarrow_forwardThe specification for a typical disk storage system is shown in Table P18.1. An employee file consisting of 100,000 records is stored on the disk. The employee record structure and the size of the fields in bytes (shown in brackets) are given below: Employee Employee Designation Address Basic number name pay (6) (10) (30) (6) (20) External Sorting 217 Allowances Deductions Number of platters Number of cylinders Number of tracks (surfaces)/cylinder Number of sectors/track Number of bytes/sector Maximum seek time Average seek time Maximum Latency time Average latency time Time to read/write a sector (20) 6 800 10 50 512 50 ms 25 ms 16.66 ms 8.33 ms 0.33 ms Table P18.1. Specifications of a typical disk storage system Total salary (20) (6) a) What is the storage space (in terms of bytes) needed to store the employee file in the disk? b) What is the storage space (in terms of cylinders) needed to store the employee file in the disk?arrow_forwardDemonstrates the use of an Iterable object (and the technique for reading a serialized object from a file).arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage