In SOA I have been confused about how a service that works with data from different databases, or different services even, can have referential integrity so that minimal data is duplicated across databases or services.
在SOA中,我一直对使用来自不同数据库或不同服务的数据的服务如何具有参照完整性以使得在数据库或服务之间复制最少数据感到困惑。
For example, you have a user table in some kind of authentication database and you want to reuse this user information in another database. You also want to enforce that user's record to exist in the authentication database. Let’s say you want to associate a user’s account in the authentication database with a news article in another database. How is that done? How would you do that using something like LDAP?
例如,您在某种身份验证数据库中有一个用户表,并且您希望在另一个数据库中重用此用户信息。您还希望强制该用户的记录存在于身份验证数据库中。假设您要将身份验证数据库中的用户帐户与另一个数据库中的新闻文章相关联。怎么做的?你会用LDAP之类的东西做到这一点?
If the authentication information was contained in the same database, just a different table, then I could see how you could just use foreign keys to create an association between a news article and the user account.
如果身份验证信息包含在同一个数据库中,只是一个不同的表,那么我可以看到如何使用外键来创建新闻文章和用户帐户之间的关联。
I have been trying to search for answers about this concern but I must be using the wrong phrases because I am not coming up with anything useful.
我一直试图寻找关于这个问题的答案,但我必须使用错误的短语,因为我没有提出任何有用的东西。
1 个解决方案
#1
1
Some platforms allow foreign key constraints between databases, and some don't. If you need referential integrity between databases, you need to pick a platform that supports it. Normalization--a different issue--never says "move these columns to a different database."
某些平台允许数据库之间的外键约束,而有些则不允许。如果您需要数据库之间的参照完整性,则需要选择支持它的平台。规范化 - 一个不同的问题 - 永远不会说“将这些列移动到另一个数据库”。
In a multi-tenant database, you'd usually choose a different architecture. (You wouldn't normally put authentication for all users in one database, and the stuff they're authenticated to use in another.)
在多租户数据库中,您通常会选择不同的架构。 (通常情况下,您不会将所有用户的身份验证放在一个数据库中,而且这些身份验证的内容将在另一个数据库中使用。)
Browse questions tagged "multi-tenant"; that might be a term that will help you. MSDN has a fairly good bird's-eye view.
浏览标记为“multi-tenant”的问题;这可能是一个可以帮助你的术语。 MSDN有一个相当不错的鸟瞰图。
#1
1
Some platforms allow foreign key constraints between databases, and some don't. If you need referential integrity between databases, you need to pick a platform that supports it. Normalization--a different issue--never says "move these columns to a different database."
某些平台允许数据库之间的外键约束,而有些则不允许。如果您需要数据库之间的参照完整性,则需要选择支持它的平台。规范化 - 一个不同的问题 - 永远不会说“将这些列移动到另一个数据库”。
In a multi-tenant database, you'd usually choose a different architecture. (You wouldn't normally put authentication for all users in one database, and the stuff they're authenticated to use in another.)
在多租户数据库中,您通常会选择不同的架构。 (通常情况下,您不会将所有用户的身份验证放在一个数据库中,而且这些身份验证的内容将在另一个数据库中使用。)
Browse questions tagged "multi-tenant"; that might be a term that will help you. MSDN has a fairly good bird's-eye view.
浏览标记为“multi-tenant”的问题;这可能是一个可以帮助你的术语。 MSDN有一个相当不错的鸟瞰图。