how to design if there are multiple systems to share user information?
for example, Alibaba has a series of product systems, such as Alipay, Taobao, Tmall, Aliyun, and so on, but as long as you register any of these products, you can also log in with this account in other products. And your shipping address, personal details and so on will also be retained.
so, how is this system designed?
I can think of two solutions:
Plan 1:
the backend of all products share a database (this is too stupid to be designed this way)
scenario 2:
separate user authentication and user information query into a separate project (including database and code are all independent) for other systems to call.
this does allow users of all systems to share information, so that you can change the shipping address in Alipay. If you open Taobao, you will find that the receiving address in Taobao has also been updated.
but there is a big drawback, that is, it is too troublesome to query across tables. For example, I want to search for order details including user receipt information in a certain period of time, and constantly check across tables.
question
is there a good solution for multiple systems to share user information?