我找到了GUID generation routine with python。
运行代码会给我以下结果。
GUID: 00000129e0e72d9b2aab3c1500ac001000e90001 Time: Sat, 17 Jul 2010 09:55:33 (millis: 0.787) IP: 172.16.233.1 Counter: 715865109
此代码的注释有以下信息。
### GUIDs make wonderful database keys. They require no access to the ### database (to get the max index number), they are extremely unique, and they sort ### automatically by time. GUIDs prevent key clashes when merging ### two databases together, combining data, or generating keys in distributed ### systems.
答案 0 :(得分:12)
除了占用32个字节而不是16个字节之外,将GUID作为文本存储在SQLite中有什么问题?
答案 1 :(得分:8)
帮助您做出决定的好文章......
主要密钥:ID与GUID:
http://www.codinghorror.com/blog/2007/03/primary-keys-ids-versus-guids.html
答案 2 :(得分:-2)
每个SQLite数据行都有一个64位本地唯一标识符。 SELECT rowid FROM table ...