开发者

how to make foreign key relationship on physically distributed data?

开发者 https://www.devze.com 2023-01-16 14:46 出处:网络
three servers server 1 is central point which links the other two servers. the other two servers have a table which has a field which should act like a foreign key
  • three servers
  • server 1 is central point which links the other two servers.
  • the other two servers have a table which has a field which should act like a foreign key

problem

well i do not know how to do this, using vs08 or sql server 08

diagram view

table on server 1

sv1pg1 id -- primary key details

tables same schema on srvr2 and srvr3

linkedSRVid -- pk linkedto -- fk constrain should be between (server 1 primary key and this field)

note th开发者_如何学Pythonat

"this is just a simplest! way i can think of to represent the prob, the real dbs contain

many fields and tables and the following applies"

  • it's not always that the network connection between the server remains up.

  • the link only need for "writing purpose" not viewing, as viewing done by direct

connection to the respective server.


A foreign key constraint can reference other tables only within the same database. This means that even if those databases were on the same server it still would not work.

Considering that the schemas are the same, you may want to look into replication.

0

精彩评论

暂无评论...
验证码 换一张
取 消