tailieunhanh - HandBooks Professional Java-C-Scrip-SQL part 130
Tham khảo tài liệu 'handbooks professional java-c-scrip-sql part 130', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | mode in that it expects the record to be in the file and displays the record data when found. After process terminates when the user enters instead of a code number to be looked up or entered main finishes up by calling terminate_price_file Figure which closes the price file and returns. All processing complete main exits to the operating system. The terminate_price_filefunction from superm Figure codelist suplook. 11 Summary In this chapter we have covered ways to save storage by using a restricted character set and to gain rapid access to data by an exact key using hash coding and caching. In the next chapter we will see how to use bitmaps and distribution sorting to aid in rearranging information by criteria that can be specified at runtime. Problems 1. What modifications to the program would be needed to support 1. Deleting records 2. Handling a file that becomes full as an off-line process 3. Keeping track of the inventory of each item 2. How could hash coding be applied to tables in memory 3. How could caching be applied to reduce the time needed to look up an entry in a table in memory You can find suggested approaches to problems in Chapter . Footnotes 1. Tape drives are the most commonly used sequential access devices. 2. In general the next open place is not a very good place to put an overflow record if the hash table is kept in memory rather than on the disk the added records clog the table leading to slower access times. A linked list approach is much better for tables that are actually memory resident. Warning this does not apply to tables in virtual memory where linked lists provide very poor performance. For more discussion on overflow handling see the dynamic hashing algorithm in Chapter . 3. For a description of last-come first-served hashing see Patricio V. Poblete and J. Ian Munro Last-Come-First-Served Hashing in Journal of Algorithms 10 228-248 or my article Galloping Algorithms in .
đang nạp các trang xem trước