服務間數據的參照完整性 (Referential Integrity of Data Between Services)


問題描述

服務間數據的參照完整性 (Referential Integrity of Data Between Services)

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.

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? 

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:

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.

(by WaltMike Sherrill 'Cat Recall')

參考文件

  1. Referential Integrity of Data Between Services (CC BY-SA 3.0/4.0)

#service #database-design #Database #soa






相關問題

服務間數據的參照完整性 (Referential Integrity of Data Between Services)

系統重新啟動時自動啟動星號 (start asterisk autometically when system got restarted)

CanStop 設置為 False 時停止 Windows 服務的方法 (C#) (Way to Stop a Windows Service when CanStop is set to False (C#))

Android: App Widget trong quá trình cập nhật hiển thị hình ảnh lạ (Android: App Widget during update shows strange images)

查找具有特定 startname 的特定服務 (Finding specific services with specific startname)

如何判斷方法是否從 .Net(託管)代碼中的 Windows 服務調用 (How to tell if method is called from Windows Service in .Net (managed) code)

如何使用主屏幕小部件按鈕關閉服務? (How to use a homescreen widget button to shutdown a service?)

如何將版本號放入 rdlc 文件中? (How do you put a version number into an rdlc file?)

android asynTask 到活動問題? (android asynTask to activity problem ?)

GetCurrentDirectory 並沒有真正返回可執行文件的路徑 (GetCurrentDirectory does not really return the path of the executable file)

通知未顯示,因為服務或警報管理器已被終止 (Notification not showing because service or alarm manager is killed off)

當 gunicorn / celery 服務重新啟動時,Django 中有沒有辦法只執行一次 python 代碼? (Is there a way in Django to execute some python code only once when gunicorn / celery services are getting restarted?)







留言討論