Click here to Skip to main content
15,889,877 members
Home / Discussions / C#
   

C#

 
GeneralRe: How would you store this data (interview question) Pin
SledgeHammer016-Feb-12 8:18
SledgeHammer016-Feb-12 8:18 
GeneralRe: How would you store this data (interview question) Pin
jschell6-Feb-12 9:49
jschell6-Feb-12 9:49 
AnswerRe: How would you store this data (interview question) Pin
harold aptroot2-Feb-12 9:18
harold aptroot2-Feb-12 9:18 
GeneralRe: How would you store this data (interview question) Pin
SledgeHammer012-Feb-12 9:23
SledgeHammer012-Feb-12 9:23 
GeneralRe: How would you store this data (interview question) Pin
harold aptroot2-Feb-12 9:42
harold aptroot2-Feb-12 9:42 
GeneralRe: How would you store this data (interview question) Pin
SledgeHammer012-Feb-12 9:50
SledgeHammer012-Feb-12 9:50 
GeneralRe: How would you store this data (interview question) Pin
harold aptroot2-Feb-12 9:55
harold aptroot2-Feb-12 9:55 
AnswerRe: How would you store this data (interview question) Pin
PIEBALDconsult2-Feb-12 15:29
mvePIEBALDconsult2-Feb-12 15:29 
As has been said, a database is likely the best general solution. Otherwise, a word search tree (similar to the DAWG you mentioned) might work fairly well.

One of the problems with the situation described is that few real-world cases require each client to maintain its own copy of such a large collection of data. Usually there will be connectivity to a shared server of some sort. However, there are situations in which a client must continue working when the connection is disconnected. But in such situations, the client probably shouldn't be allowed to add data to the collection.

Anecdote time: I was once involved in such a situation. What had been done was to store four bits per item in a binary file (this was on DOS by the way), so for instance the first byte of the file held the status for item 0 in the low nybble and the status of item 1 in the high nybble, etc. Access to a particular item's status was a simple calculation, disk seek, and read one byte. I don't remember what the highest numbered item was at the time -- let's say a million -- so that would be about a half MB of disk to store the list. Once a day a whole new file was downloaded to each connected client and throughout the day updates would be sent. If a client was disconnected it would start getting updates when it reconnected and a whole file within a day -- this was fine for the purpose.
AnswerRe: How would you store this data (interview question) Pin
V.2-Feb-12 21:54
professionalV.2-Feb-12 21:54 
GeneralRe: How would you store this data (interview question) Pin
SledgeHammer013-Feb-12 3:57
SledgeHammer013-Feb-12 3:57 
GeneralRe: How would you store this data (interview question) Pin
PIEBALDconsult3-Feb-12 4:16
mvePIEBALDconsult3-Feb-12 4:16 
GeneralRe: How would you store this data (interview question) Pin
SledgeHammer013-Feb-12 5:12
SledgeHammer013-Feb-12 5:12 
GeneralRe: How would you store this data (interview question) Pin
BobJanova3-Feb-12 5:31
BobJanova3-Feb-12 5:31 
GeneralRe: How would you store this data (interview question) Pin
SledgeHammer013-Feb-12 5:45
SledgeHammer013-Feb-12 5:45 
GeneralRe: How would you store this data (interview question) Pin
BobJanova3-Feb-12 6:09
BobJanova3-Feb-12 6:09 
GeneralRe: How would you store this data (interview question) Pin
PIEBALDconsult3-Feb-12 12:52
mvePIEBALDconsult3-Feb-12 12:52 
GeneralRe: How would you store this data (interview question) Pin
SledgeHammer013-Feb-12 13:22
SledgeHammer013-Feb-12 13:22 
GeneralRe: How would you store this data (interview question) Pin
PIEBALDconsult3-Feb-12 4:18
mvePIEBALDconsult3-Feb-12 4:18 
GeneralRe: How would you store this data (interview question) Pin
SledgeHammer013-Feb-12 5:14
SledgeHammer013-Feb-12 5:14 
AnswerRe: How would you store this data (interview question) Pin
BobJanova3-Feb-12 4:42
BobJanova3-Feb-12 4:42 
AnswerRe: How would you store this data (interview question) Pin
BillWoodruff3-Feb-12 4:47
professionalBillWoodruff3-Feb-12 4:47 
GeneralRe: How would you store this data (interview question) Pin
SledgeHammer013-Feb-12 5:19
SledgeHammer013-Feb-12 5:19 
GeneralRe: How would you store this data (interview question) Pin
BillWoodruff3-Feb-12 5:59
professionalBillWoodruff3-Feb-12 5:59 
GeneralRe: How would you store this data (interview question) Pin
SledgeHammer013-Feb-12 7:06
SledgeHammer013-Feb-12 7:06 
GeneralRe: How would you store this data (interview question) Pin
BillWoodruff3-Feb-12 7:36
professionalBillWoodruff3-Feb-12 7:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.