Question

I have the following Guid:

AAB13E97-449B-4D5B-BDE2-AC479C31B782

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)

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.

Was it helpful?

Solution

Looking at Wikipedia's article on the subject it says:

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).

So I conclude:

  • This happens independently from the DBMS or framework used
  • This depends on the processor architeture
  • This is by design

So the question remains:

Why on earth they designed it this way?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top