Advantage of using GUID:
It generates a unique value in each table and each database and this allows easy merge/merge/migrate records between different databases.
You can generate your Ids in the application without needing the database, example:
Guid meuNovoGuid;
meuNovoGuid = Guid.NewGuid();
Disadvantages of using GUID:
I see the GUID as a large and unnecessary number, this can have serious performance and storage implications if you’re not careful.
Especially in the case of an Asp.Net MVC application, where we have friendly url’s is much simpler terms:
http:\\localhost\Cliente\Detalhes\1234
instead of http:\\localhost\Cliente\Detalhes\031E9502-E283-4F87-9049-CE0E5C76B658
Using the int in your Asp.Net MVC application will be easier to understand, display these Ids to users in grids for example and you will get a better performance as well.
Sensational, I always applied the YAGNI, but I didn’t know there was such a nomenclature, nothing better than sharing knowledge!
– Jean Gatto