Closed asdofindia closed 3 years ago
The GUID just has to be a unique string, that's all. It can be a completely random UUID too. It's been provisioned for future scenarios like:
When distributing datasets, using numeric IDs as the unique identifiers for an entry isn't ideal. Can convey the wrong idea of a sequence, for example.
Okay. So a guid is an actual random guid/uuid. Makes sense.
The
sample.sql
uses guid like MD5('apple-1'), etc. If we have a sorted list of words, we can predictably create guids like this.But, when a random word is being inserted, how do we generate a guid?
One option is to make a fixed strategy for generating guid. Something like this:
Another option is to drop the guid column if it is not important or if it can be generated from the other columns.
Related questions: