sol beach wrote:
Why in the world are you trying to keep multiple copies of the data?

Why can't you just access the 'master database'?

On 12/16/05, Scott Plumlee <[EMAIL PROTECTED]> wrote:

I am trying to maintain one master list of countries and the states
within those countries.  I'd like to keep this info in a common
database, to be used by 2 or three other databases on the same host,
using foreign keys to make sure that all the country/state data matches
up to the master list.

If I can't use foreign keys, should I just run regular updates to sync
the data between duplicate tables of countries and states in each
database, or is there an better method that I'm not seeing?


Sorry, I didn't explain very well.

I have a db I'll call Common. In there, I'd like to keep two tables, tblCountry and tblState. Then I've got another database, called Application, with a table called tblAddress.

In the Application database, I'd like to reference tblCountry and tblStateProvince. When someone fills out form info that is going to be stored in tblAddress, I want the choices to be pulled from tblCountry and tblStateProvince.

When I've done this inside only one database, I've always used foreign keys between the Address.State field and the tblState.State fields.

My goal IS to only keep one set of country and state data for multiple databases. But I don't know if I can do that using foreign keys when things are in two different databases - it doesn't appear that I can.

So my question is am I better off NOT using foreign keys but doing everything else the same or using foreign keys and having to jerryrig some sort of syncing?


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to