how about group_assigned_to and user_assigned_to columns?  If one is set to 0, then 
it's not using that one.

Travis

---- Original Message ----
From: Manish Bansal <[EMAIL PROTECTED]>
Sent: 2002-01-09
To: SQL <[EMAIL PROTECTED]>
Subject: referential integrity question

Hello all
I have three tables
[Users]
        user_id
        user_name
[Groups]
        group_id
        group_name
[Task]
        task_id
        task_desc
        assigned_to (should contain an id which can be user_id or group_id)

The problem is i want to enforce referential integrity on the assigned_to
field in the TASK table.
 Obviously a foreign key can refer to only one table. Is there a way to
solve this issue without creating another table containing the records from
the USERS and GROUPS tables ?

Thanks
Manish

______________________________________________________________________
Macromedia ColdFusion 5 Training from the Source
  Step by Step ColdFusion
  http://www.amazon.com/exec/obidos/ASIN/0201758474/houseoffusion
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to