Symantec Interview Question
AssociatesCountry: India
Interview Type: In-Person
That's the answer I was looking for, HASHING!! But, how hashing is achieved in case of millions of rows?
In java, you can just create Hashmap or ( Tree Hashmap [sorted : so more efficient] ). you can give a key in it and values associated with it. for generating a key you can create your own hash methods, or use standard hash function like "MD5" store those Values with its key. so to search it, we can compute its hash value and getValue(Key) somewhat like O(1) search and thats it .
Search Efficiently :
Depends on what job position you are looking for, you might want to answer it from a different aspect. But I think this question is asking you methods or different factors can effect the search.
1. Definitely "Hash " is a good answer.
2. (building) Indexes , in data warehouse, bitmap index may apply on some columns like gender or something ( since you dont really do transaction in data warehouse, so bitmap works here, not in transaction tables)
3. Table Partitions
4. parallel operations ( well, depends on if the DBA allows you to sacrifice some server performance to increase your efficiency)
i guess using Hash methods 'll be more effiicient than Binary search (if database already stored with hash values)
- smilelearner September 18, 2012