I have two databases. One is on mobile and uses SQLite and another one is on Microsoft azure.
I want to sync data in both directions. Sometimes some data is saved on azure db and should be synchronised with SQLite database.
In each table I am using guid field that identifies unique row.
At the moment I have integer as primary key with clustered index and guid as non clustered index which then child table is linked to.
So if I have tables parent and child, I would use guid as parent key and then in child key I would use guidparentid as foreign key. I link relation between parent and child with guid. It is little messy but I make sure I keep clustered index on integer rather guid.
To simplify this I could just use guid as primary key and link all normally, but even if I use newsequentialid() on guid, clustered index on guid is very bad idea.
What would be your suggestion? Should I stick to integer primary key with clustered index and link parent child tables with guids, it should I just upgrade int to guid as primary clustered key?