views:

16

answers:

1
  • The schemas are same on all servers.

  • The data of respective server should not be on another

    but there are some relations having foreign keys to data which is not on current server

    currently its not possible to implement foreign key constrains across servers

    "then how is it handled in a distributed database architecture!? (there are foreign keys!!)"
    

for initial understanding of the core problem please refer to

http://stackoverflow.com/questions/3746410/how-to-make-foreign-key-relationship-on-physically-distributed-data

tanks

+1  A: 

The simple answer - you can't. What you're trying to do sounds like Sharding. Can you change the way you partition the data between each server so that related data is always on the same server, and you never end up with the foreign key relationship to another server issue.

Beyond this, it sounds like your design is flawed. Trying to use a database in this way won't work. I'd suggest stepping back and seeing if you can change your design to use either replication or sharding.

It's very hard to make further suggestions without understanding more of your problem domain. However, depending on your problem domain, you may want to look beyond relational databases - look at the NoSQL article on Wikipedia for a starting point.

SamStephens