Row Guid in Adventure Works database

I was studying the Adventure Works database because I read it contains good examples of best practices.

It has an ID column for each table that is auto-incrementing Primary Key. There is also a row guid which seems redundant since the ID PKs are identity columns that increment automatically and should be unique in a given table.

What is the purpose of the row guid being used in conjunction with the ID which should be unique in a given table?

May 19th, 2015 2:52pm

ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.

Refer more

http://forums.asp.net/t/1248405.aspx

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/382a076b-8b9b-44a0-b952-28c880102efb/merge-replication-rowguid-issue?forum=sqlreplication

http://www.mindstick.com/blog/358/Usage%20of%20ROWGUID%20and%20IDENTITY%20in%20SQL%20Server#.VVuQ6kjJGWE


Free Windows Admin Tool Kit Click here and download it now
May 19th, 2015 3:38pm

What is the purpose of the row guid being used in conjunction with the ID which should be unique in a given table?

Hello,

If you have a deeper look at the table design, e.g. for "Person.Address" then you will see there exists also a unique index on the "rowguid" column and in the description you will see, what's that good for: Merge replication.

Let's say you have databases in two location somewhere around the world, where data is entered and you want to replication the data between those Locations, then you need to uniquely identify the records indendent of a technical key like the identity column and that's what can be achieved with such a GUID column.

May 20th, 2015 2:21am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics