为什么是二进制的GUID从通常的重presentation不同不同、为什么是、GUID、presentation

2023-09-04 10:19:30 作者:一人承受

我有以下GUID:

AAB13E97-449B-4D5B-BDE2-AC479C31B782

使用的System.Guid +的DBLinq + SQLite的存储它下面的字段被添加到数据库中。

Using System.Guid + DbLinq + SQLite to store it the following field is added to the database.

973EB1AA-9B44-5B4D-BDE2-AC479C31B782

(破折号增加了清晰度)

(Dashes added for clarity)

我可以看到,在过去的8个字节以相同的顺序,以及3第一组是相反的,但我不明白为什么。

I can see that the last 8 bytes are in the same order, and the 3 first groups are reversed, but I don't understand why.

推荐答案

看着维基百科关于这个问题的文章这样说的:

DATA4商店中所显示的GUID文本编码在同一顺序的字节(见下文),但其他三个字段上小端系统相反(例如英特尔CPU)的

Data4 stores the bytes in the same order as displayed in the GUID text encoding (see below), but the other three fields are reversed on little-endian systems (for example Intel CPUs).

所以,我的结论是:

在这独立发生,从所使用的DBMS或框架 这取决于处理器architeture 这是由设计

因此​​,问题依然存在:

So the question remains:

为什么地球上,他们设计这样说?

Why on earth they designed it this way?