Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Hash Search
Design a hash table which the phone number is the key word and can be used to do search. The phone number is looked on as key and thus the hash function should be designed based on it.
Basic Requirements
1) Each record contains 3 data items, i.e. name, sex and phone number.
2) Read the datum from txt file, use phone number as the key to design hash function, using open addressing method to solve conflicts. Build hash table and show highest number of hashes. There are 450 records in total, and the size of hash table is defined as 467. The maximum number of hashes is required to be no more than 80
3) When the user input a phone number, your program should do hash search based on this number. If the number dose exist then the corresponding information should be shown, and the number of hashes should be shown as well. If the number does not exist in the table, still show the number of hashes and the information
My data
LiuJing Female 13814231733
WangAnqi Male 15855129526
HeLin Male 13920967276
ZhaoQingyue Female 15856127737
LiLifang Female 13601289664
MaXinyi Male 15819083913
ZhangHaibo Male 15840971965
GaoJiaqing Male 15853215366
HuangQingxi Male 13766575535
ZhangLili Female 15858890761
XuYifeng Female 15850132029
WangLi Male 15854511744
LvHaizhi Female 15854309809
XuWanhu Male 13811777653
ChengChun Male 13830972677
ZhongKailin Male 13777904575
LiHaiqing Male 15816004696
ZhouXibo Male 15355066165
TaoQiqi Male 13919904080
PengLicong Male 18917809360
XueMingming Female 15856600930
WeiBingzheng Male 13501099785
WangAnqi Male 15855129526
HeLin Male 13920967276
ZhaoQingyue Female 15856127737
LiLifang Female 13601289664
MaXinyi Male 15819083913
ZhangHaibo Male 15840971965
GaoJiaqing Male 15853215366
HuangQingxi Male 13766575535
ZhangLili Female 15858890761
XuYifeng Female 15850132029
WangLi Male 15854511744
LvHaizhi Female 15854309809
XuWanhu Male 13811777653
ChengChun Male 13830972677
ZhongKailin Male 13777904575
LiHaiqing Male 15816004696
ZhouXibo Male 15355066165
TaoQiqi Male 13919904080
PengLicong Male 18917809360
XueMingming Female 15856600930
WeiBingzheng Male 13501099785
do this in C++ or C language
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 1 images
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
- How is a grouped index built? How is it different from a sparse index?arrow_forwardA hash table with non-negative integer keys has a modulo hash function of key % 15. Hash function index range: 0 to Ex: 5 Item 110 will go in bucket Ex: 26arrow_forwardWhich of the following is used in hash tables to determine the index of any input record?a) hash functionb) hash linked listc) hash treed) hash chainingarrow_forward
- Jump to level 1 Hash table valsTable is shown below. The hash function is key % 5. Assume items are inserted at the end of a bucket's list. valsTable: o 50 1 2 12 3 49 After the operations HashInsert(valsTable, item 100) item 26) HashInsert(valsTable, Select the bucket containing the following items: 26 Select 50 Select 0 100 1 2 2 3 5 3 4 Check Nextarrow_forwardWhat kind of data structure is it that implements the HashSet algorithm?arrow_forwardHow does a hash table function to boost productivity over a traditional list? Is there a chance that you might explain the problem?A hashtable was used throughout development.arrow_forward
- Which of the following operations are done in a hash table?a) Insert onlyb) Search onlyc) Insert and searchd) Replacearrow_forwardData structures:arrow_forwardThe case in which a key other than the desired one is kept at the identified location is called?a) Hashingb) Collisionc) Chainingd) Open addressingarrow_forward
- Hash functions play a critical role in dictionary performance. Describe the characteristics of a good hash function, and provide examples of hash functions commonly used in practice.arrow_forwardWhat causes a bucket overflow in a hash file structure, and how does it happen? Was there anything that could be done to reduce the number of overflowing buckets?arrow_forwardHash table valsTable is shown below. The hash function is key % 5. Assume items are inserted at the end of a bucket's list. valsTable: o 5 26 49 After the operations Hashinsert(valsTable, item 91) Hashinsert(valsTable, item 98) Select the bucket containing the following items: 98 Select v 91 Select v 26 Select v 2. 3.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education