How do I create a unique integer number based on a number of different values?
Well, the trick is finding a sufficiently short number that represents the item in question. You can do a CRC but the result is never unique — just very, very unlikely that it will have the same CRC as something similar. You can always create a unique number by reducing the words (strings), dates, and numbers to serialized integers and then appending them together. In fact, if you store your strings as null-terminated bytes, then you can treat the string as a large number: e.g. let’s say I have the date January 1st, 2011, the word ‘the’ and the number 32. I can reduce that to: 2-0-1-1-0-1-0-1-‘t’-‘h’-‘e’-3-2 And then just take the byte equivalent of each element. In practice, however, it might make sense to express the date as a shorter integer (e.g. the number-of-days since the beginning of the epoch) and then appending that to the other string elements. Taking the byte equivalent of each decimal numeral would be storage-intensive.