database – GUID as SQLq的uniq键

前端之家收集整理的这篇文章主要介绍了database – GUID as SQLq的uniq键前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我找到了 GUID generation routine with python.

运行代码给我以下结果.

  1. GUID: 00000129e0e72d9b2aab3c1500ac001000e90001
  2. Time: Sat,17 Jul 2010 09:55:33 (millis: 0.787)
  3. IP: 172.16.233.1
  4. Counter: 715865109

代码的注释具有以下消息.

  1. ### GUIDs make wonderful database keys. They require no access to the
  2. ### database (to get the max index number),they are extremely unique,and they sort
  3. ### automatically by time. GUIDs prevent key clashes when merging
  4. ### two databases together,combining data,or generating keys in distributed
  5. ### systems.

问题

>这适用于sqlite吗?据我所知,sqlite中的INTEGER类型是8字节,并且有8字节,因此无法以十进制值存储值0x00000129e0e72d9b2aab3c1500ac001000e90001或101362835865894089778560972572099193929729.
>有没有办法在sqlite全局获取唯一ID?

除了占用32个字节而不是16个字节之外,在sqlite中将GUID存储为文本有什么问题?

猜你在找的Sqlite相关文章