The situation I was in is that I have a set of existing tables with incremental integers as identifiers. Now I have added a GUID for each table as a new PC.
I have a primary table
dbo.ParentTable(GUID - PK, ParentTableId INT, Name VARHCHAR)
and child table
dbo.ChildTable(GUID - PK, ParentTableId INT, other fields.....)
and you want to create a relationship between them (basically LINQ to SQL from .Net will build realationships) based on ParentTableId. I understand that I can’t create an FK relationship between them, because now they have GUIDS for PC. Should I update the GUIDs in the Children table so that they refer to the parent table, or can I still create the association based on the existing ParentId column?
The relationship between the two is one thing for many (parent to child), and I use SQL Server 2008.
source
share