简体   繁体   English

如何创建集中式用户数据库

[英]How to create a centralized user database

My company creates a lot of applications that have very similar functionality, with a few differences between each one. 我的公司创建了许多具有非常相似功能的应用程序,每个应用程序之间存在一些差异。 For example, some sites have a group creation feature, others have user profile pages, and yet others allow users to accumulate achievement points and such. 例如,某些网站具有群组创建功能,其他网站具有用户个人资料页面,而其他网站则允许用户累积成就点等。

Our clients want users to be able to log in to each application with the same username/password, since it doesn't really make sense for the user to have to register a different account for each site. 我们的客户希望用户能够使用相同的用户名/密码登录每个应用程序,因为用户必须为每个站点注册不同的帐户才有意义。

How do we design our database? 我们如何设计数据库? Is it better to have a single central database for all of our applications, or separate them into individual databases and do JOINs across databases? 为所有应用程序提供单个中央数据库,或将它们分成单独的数据库并跨数据库进行JOIN更好吗? Which is better performance-wise and design-wise? 哪个更好的性能和设计明智?

Thanks for any insight! 感谢您的任何见解!

Just go with OpenID. 请使用OpenID。 Simplest to just use Facebook Connect as a provider. 最简单的方法是使用Facebook Connect作为提供商。 They let you get to all of your user's data (like name etc.) so you can identify and data mine them if need be. 它们可以让您获取所有用户的数据(如名称等),以便在需要时识别和数据挖掘。

If you don't want to rely on an external provider to handle your user accounts, then become your own OpenID provider. 如果您不想依赖外部提供商来处理您的用户帐户,那么请成为您自己的OpenID提供商。

I would have a central server, which hosts a user db and web services to access that user db. 我会有一个中央服务器,它托管用户数据库和Web服务来访问该用户数据库。

That way you can use the same DB, and perform logins over web services to that system from your front end. 这样,您就可以使用相同的数据库,并从前端对该系统的Web服务执行登录。

This is also scalable and can grow in complexity with your applications. 这也是可扩展的,并且随着您的应用程序的复杂性会增加。

I would take the other two answers and combines them to make a private OpenId Provider . 我将采用其他两个答案并将它们组合成一个私有的OpenId Provider

This way you can use the standard OpenId clients for your developments, and possibly even open your applications up for external OpenId providers if you developments need them. 通过这种方式,您可以将标准的OpenId客户端用于您的开发,甚至可以在开发需要时为外部OpenId提供商打开您的应用程序。

This gives scalability and open standards for other applications within the organisations to use the same provider. 这为组织内的其他应用程序提供了可扩展性和开放标准,以使用相同的提供程序。

In a general way I would develop tables that would be Master Data , they will be single version of the truth application wide. 一般来说,我会开发一些主数据表,它们将是真实应用程序范围的单一版本。 Each and every application will access the same "clients base". 每个应用程序都将访问相同的“客户群”。 In your case it seems that the concept of Master Data can be applied to your applications database. 在您的情况下,似乎主数据的概念可以应用于您的应用程序数据库。

If the applications are hosted within the company you can use active directory. 如果应用程序托管在公司内,则可以使用活动目录。 You can access active directory from php with the ldap functionality. 您可以使用ldap功能从php访问活动目录。 You can than add users to groups in active directory to give them access to various functionality within the application. 您可以将用户添加到活动目录中的组,以便他们可以访问应用程序中的各种功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM