Computer Science: An Overview (13th Edition) (What's New in Computer Science)
13th Edition
ISBN: 9780134875460
Author: Glenn Brookshear, Dennis Brylow
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Expert Solution & Answer
Chapter 9, Problem 61CRP
a.
Explanation of Solution
Advantage of a sequential file over an indexed file:
- In sequential file, the data or records is stored in the serial manner. So, the following operation will be fast.
- Searching records
- The binary search is implemented on sorted records. Hence, this operation will be fast.
- Updating records
- Here also, the binary search is implemented. Hence, this operation will be fast.
- Deleting records
- Searching the records is fast in this operation.
- Searching records
- In sequential file, the records are sorted on the value of one or more fields...
b.
Explanation of Solution
Advantage of a sequential file over a hash file:
- For accessing the record from the sequential file, direct key or record number can be specified but in hash file, hash function is needed to solve.
- A hash function is computed on some attribute of each record. It identifies the record location to be positioned.
- The sequential file is used to read or write a flat sequential file whereas hash file is used to read or write a hash file.
- In sequential file, the records will be loaded generally whereas in hash file, the data is loaded based on hash
algorithm ...
c.
Explanation of Solution
Advantage of an indexed file over a sequential file:
- In indexed file organization, the records address are stored in distinct file and their data is accessed by using pointers.
- Therefore, the record is accessed by less time while in sequential file the searching starts from first record until the record is found in key
database ...
d.
Explanation of Solution
Advantage of an indexed file over a hash file:
- In indexed file, the index records take less time to access when comparing with hash file.
- Indexing offers comparatively fast access to entries within a data storage structure but hash file takes more time to access the entries...
e.
Explanation of Solution
Advantage of a hash file over a sequential file:
- Comparing with sequential file, the hash file is more secured and takes less time to access records...
f.
Explanation of Solution
Advantage of a hash file over an indexed file:
- In index file, file index is generally stored as a distinct file on the similar storage device.
- Then the index is transferred to main me...
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
1. Given that F is a direct file with n = 2000 records and that the records are stored in orderof their keys. Determine how any record reads it would take to locate a particular record using:a. Sequential search (average case)b. Binary search (worst case)c. (open) hashing with 200 buckets (average case)d. (open) hashing with 400 buckets (average case)
2. Write the declarations to create a data type called: DICTIONARY that represents an openhashing scheme with 20 buckets
Learn the differences between linked allocation, contiguous allocation, and indexed file allocation.
Determine the number of comparisons (as a function of n and m) that are performed in merging two ordered files a and b of sizes n and m, respectively, by the merge method presented in the lecture, on each of the following sets of ordered files: a. m=n and a[n/2] < b[1] < b[m] < a[(n/2)+1] b. m=1 and b[1] < a[1] c. m=1 and a[n] < b[1] a[i] refers the value in position i of file a, etc
Chapter 9 Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
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
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Understand the differences between linked allocation, contiguous allocation, and indexed file allocation.arrow_forwardTask The Randomness of One-way Hash To understand the properties of one-way hash functions, we would like to do the following exercise for MD5 and SHA256: Create a text file of any length. Generate the hash value H1 for this file using a specific hash algorithm. Flip one bit of the input file. You can achieve this modification using ghex or Bless. Generate the hash value H2 for the modified file. Please observe whether H1 and H2 are similar or not. Please describe your observations in the lab report.arrow_forwardWrite comparators for the type File to order by increasing/decreasing order of file size, ascending/descending order of file name, and ascending/descending order of last modification date. Use these comparators in a program LS that takes a command-line argument and lists the files in the current directory according to a specified order, e.g., "-t" to sort by timestamp. Support multiple flags to break ties. Be sure to use a stable sortarrow_forward
- 167. The file organization which allows us to read records that would satisfy the join condition by using one block read is a. Heap file organization b. Sequential file organization c. Clustering file organization d. Hash file organizationarrow_forwardDesign a direct file organization using a hash function, to store an item file with item number as its primary key. The primary keys of a sample set of records of the item file are listed below. Assume that the buckets can hold two records each and the blocks in the primary storage area can accommodate a maximum of four records each. Make use of the hash function h(k) = k mod 8, where k represents the numerical value of the primary key (item number).369 760 692 871 659 975 981 115 620 208 821 111 554 781 181 965 don't copy bartleby old answer its wrongarrow_forwardDesign a direct file organization using a hash function, to store an item file with item number as its primary key. The primary keys of a sample set of records of the item file are listed below. Assume that the buckets can hold two records each and the blocks in the primary storage area can accommodate a maximum of four records each. Make use of the hash function h(k) = k mod 8, where k represents the numerical value of the primary key (item number).369 760 692 871 659 975 981 115 620 208 821 111 554 781 181 965arrow_forward
- Can clustering of files occur after the files are populated with records?arrow_forwardWhat is the purpose of try-catch blocks in programming, and how do they contribute to robust file handling?arrow_forwardProblem Given the target file f0 and candidate files f1-f20, there is an identical copy of f0 among the files f1-f20. Write a python program to perform the following tasks: · Read in each file and calculate the hex hash values by using SHA3 function with the length of 512 for all the given files f0, f1-f20. · Save the hex hash values of each file as a new line in a .txt file named hash.txt file. · Read hash values from hash.txt and compare them to find the identical copy of f0 among f1-f20. · Write the finding result (the matched file name) back to hash.txt Submission • Name your project fileHash.py and submit both fileHash.py and hash.txt on Blackboard. • The program should be properly documented. • The program should have user friendly Input/Output design • Duplicate work (or obviously similar one) will result in an F grade in the course. Grading 1. Include comments as specified in the course syllabus. (10%) 2. Source code and results. · Correctness (70%) · User-friendliness…arrow_forward
- Write a Java or PHP program that connects to a MySQL database and fetches all records from the Doctor relation (see appendix) and prints out the records in tabular form, with appropriatenames as column headings.arrow_forwardConsider a file of 16384 records. Each record is 32 bytes long and its key field is of size 6 bytes. The file is ordered on a non-key field, and the file organization is unspanned. The file is stored in a file system with block size 1024 bytes, and the size of a block pointer is 10 bytes. If the secondary index is built on the key field of the file, and a multilevel index scheme is used to store the secondary index, the number of first-level and second-level blocks in the multilevel index are respectivelyarrow_forwardA File was sorted by key field, and then 10 records were stored in each block. Multi-level Indexing is made here, and 100 indexes are stored in each block. To find a specific record, the total number of block accesses is less than 4. Calculate the maximum number of records that make up this file.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageSystems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage LearningOperations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks Cole
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning