Re: [SQL] Composite UNIQUE across two tables?

2008-03-11 Thread Dirk Jagdmann
Hello Jamie, I vote against duplicating site_group_id in the users table and the proposed unique constraint with a function. Because all those might fail, if you ever want to change the relationship between a site and a site group. My advise would be to have two triggers for insert/update on the

Re: [SQL] Composite UNIQUE across two tables?

2008-03-11 Thread Rodrigo E. De León Plicet
On Tue, Mar 11, 2008 at 2:03 PM, Dirk Jagdmann [EMAIL PROTECTED] wrote: For my tests, I have modified your posted schema a bit, to unify all column names to name. OT and IMHO, this is not good practice. Column names should be unique and descriptive throughout the entire schema. -- Sent via