views:

415

answers:

4

Ok, So I'm developing a website which to begin with will have 3 clear sub sites: Forum, News and a Calendar.

Each sub site will have it's own database and common to all of these databases will be a user table which needs to be in each database so that joins can be done.

How can I synchronize all the user tables so that it doesn't matter in which database I make an update, all the databases will have the same user table.

I'm not worried if there is a short sync delay (less than 1min) and I would prefer that the solution was a simple as possible.

Many Thanks

+1  A: 

Why do the sub-sites need to have their own databases? Can't you just use one database, with separate tables for each of the applications? Or, in PostgreSQL, you could use schemas to the same effect.

kquinn
A: 

Though I would hardly endorse an architecture like this, federated tables may do what you want.

ʞɔıu
A: 

A single app can log into more than one database. While I'd advocate kquinn's answer of "all in one DB", becaue joins will work then, if you really must have separate databases, at least have the user table accessed from one database. "Cloning" a table across multiple databases is fraught with so much peril it's not funny.

womble
A: 

I was over complicating the problems/solution.

Since the databases will (for the time being) exist on the same server, I can use a very simple View.

GateKiller