Note sure when you should use federated tables as far as MySQL and DB2 are concerned - didn't use anything but simple MySQL and never used DB2. For most part its MS SQL and Oracle.
Maybe someone else knows usage criteria for federated tables? TK -----Original Message----- From: Denny Valliant [mailto:[EMAIL PROTECTED] Sent: Friday, June 02, 2006 7:56 PM To: CF-Talk Subject: Re: Cross referential database integrity Out of curiosity, is this a good example of where you'd use federated tables maybe, if'n yer using mysql? :d On 6/2/06, Tom Kitta <[EMAIL PROTECTED]> wrote: > > Peter, > > Yes, referential integrity is frequently forgotten by people who design > DBs, > don't know why, maybe its sloppiness or they want to be hired later on to > "clean up" the database? > > Since the tables don't change often I am planning to have a copy of them > in > a every child database. Later on triggers can be created on both child and > master copies that would accommodate data updates and insertions. RI for > the > child tables that link to data in their own DB can be enforced using > foreign > key constraints. > > Probably best understood with example table "states", placed in DB > "company". Another DB, "marketing" will also have table "states" that is a > copy of the table in "company" DB. Other tables in "marketing" DB will > have > foreign keys in local copy of "states" table. In case a state name changes > (Quebec province code changed few years ago) then the table "states" in > "company" DB gets updated - if we want to the change can be reflected in > its > copy in "marketing" DB automatically via triggers. > > As for DBAs using triggers for RI on local DB tables - this is old school, > not needed for something like 10 years with large DBs (don't know about > MySQL & 10 years). As mentioned by you, declarative RI is the way to go. > > TK > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:242322 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54