Marek Sirkovský
4 min readFeb 28, 2016

--

What is what?

Obvious disadvantages of UUID.

Obvious disadvantages of auto increment keys

Not so obvious advantage of UUID over auto-increment keys.

var val = 1;
var val = Guid.NewGuid(); // Guid is Microsoft implementation of             UUID.

var obj = GetNewObject(); //create some object and obj.Id == 0
ORMService.SaveObject(obj);
obj.Id // obj.Id == some new generated id.

var primaryKey = Guid.NewGuid();

--

--

Marek Sirkovský

Just a regular web developer