Web Development – Using One User Database for Multiple Websites and Applications

databasedesktop applicationweb-development

I've got several applications and websites that will be built around one main application. In a perfect situation users will be able to register once and be able to log into the different applications and websites using that single account. The different parts will be:

  • Main application (Windows application) that uses the account to get access to it's features and to the server.
  • Second application with it's own specific tasks (Also a Windows Application) that uses the account to get access to it's features and to the server.
  • Main website which is based on WordPress. The website has a bbPress forum that would use the account.
  • Data server which can be accessed for specific data using the account.

Most of the data that the users have will be the same for the different applications and websites so to me it seems that having a database for each separate part would complicate things more than having one database for everything.

My main concern is the WordPress site and bbPress forum because of the fact that these already have their own account systems.

What would be a valid approach? Using one of the existing databases from WordPress or the forums with the risk of having a lot of WordPress/bbPress specific data with the accounts or making a database especially for the other applications and websites and somehow linking those to the website and forum databases? Would the valid approach be secure for use by these different applications and websites?

Best Answer

I would recommend separate databases for the applications and one database for the user accounts.

I would put any fine-grained access control within the individual applications.

I would also look to make the one 'user database for the user accounts' be accessed via an authentication service using industry standard protocols such as LDAP.