sort table vs hashed table
Can somebody tell me when I should use sort table and when hashed table?
Edited by: Comandante Che Guevara on Oct 14, 2008 12:23 PM
Jordi Escoda Ruiz replied
It depends on your needs.
Hashed table access is by key, search time is independent of register number. You can use it when you have large amount of register, and you want to retrieve data very quickly.
In sorted table, if you access by the sorted key, you can specify BINARY SEARCH. Search time depends on register number, but not so much, since is logarithmic. If you access by another key (not sorted key), search is sequential and depends much on amount of data.