Re: how to handle circular references if DB enforces ref. integrity

2001-11-20 Thread Michael Widenius
Hi! Arjen == Arjen G Lentz [EMAIL PROTECTED] writes: cut The problem is, how would you add a new bus and a new driver to the database? Whichever one is added first, you're going to get an error because its counterpart doesn't exist yet, violating referential integrity. You could

Re: how to handle circular references if DB enforces ref. integrity

2001-11-18 Thread Arjen G. Lentz
Hi Bennett, - Original Message - From: Bennett Haselton [EMAIL PROTECTED] In a database that enforced referential integrity, if you say that a field in one table is a foreign key referencing another table, then any value in the foreign key field in the first table must reference an

how to handle circular references if DB enforces ref. integrity

2001-11-16 Thread Bennett Haselton
In a database that enforced referential integrity, if you say that a field in one table is a foreign key referencing another table, then any value in the foreign key field in the first table must reference an existing row in the second table. (Right?) But suppose you have a database storing,

Re: how to handle circular references if DB enforces ref. integrity

2001-11-16 Thread Kristian Köhntopp
Bennett Haselton wrote: The problem is, how would you add a new bus and a new driver to the database? Whichever one is added first, you're going to get an error because its counterpart doesn't exist yet, violating referential integrity. I was under the impression that databases enforced

Re: how to handle circular references if DB enforces ref. integrity

2001-11-16 Thread Shankar Unni
Kristian Köhntopp wrote: Bennett Haselton wrote: The problem is, how would you add a new bus and a new driver to the database? Whichever one is added first, you're going to get an error because its counterpart doesn't exist yet, violating referential integrity. I was under the impression