Hashing

Suppose you want to create a database in which doctor’s can find a patient’s medical record.

 

 

  1. List some of the information that would be stored in this database.
  2. What are some possible unique keys? (Remember, keys can be combinations of pieces of data.)
  3. Describe at least 2 hash functions you would use to store the original data.
  4. Briefly describe an algorithm you would use to find a record.
  5. Suppose a patient, "Betty Smith" comes into your office. You are hashing, for some odd reason, off of her zip code and date of birth. However, a true lady never reveals her age, and she incorrectly tells you the year she was born. Briefly describe some error checking that can be done to help avoid this problem. (Of course, other than changing your hash function, and other than hooking ol’ Betty up to a lie-detector.)