Subject | Re: [firebird-support] Referential Integrity |
---|---|
Author | Milan Babuskov |
Post date | 2005-08-04T16:14:40Z |
Steve Harp wrote:
probably don't want to do that, so you may want to consider something
else...
sure I understand the problem.
understand correctly you have one table FB and one in Pdox.
FB:
ID, Name, ItemCode
1 a 123
2 a 124
Pdox:
ID, Name, ItemCode
1 a 123
6 a 124
And you want to have (in both FB and Pdox):
ID, Name, ItemCode
1 a 123
2 a 124
6 a 124
Right?
Or perhaps you want to have:
ID, Name, ItemCode
1 a 123
6 a 124
in both?
Whatever is the case, I don't see why ref.integrity would fail. You
could simply declare all foreign keys WITH UPDATE CASCADE and be done
with it.
--
Milan Babuskov
http://www.flamerobin.org
> I think I know the answer to this one but I'll ask anyway. Is there aWithin transaction: no. But you could turn it off completely. Since you
> way to turn off referential integrity within a transaction so that you
> can make sweeping changes that may temporarily voilate referential
> integrity?
probably don't want to do that, so you may want to consider something
else...
> I have a Paradox table that I need to sync with a table in the"Based on it's ID?", or rather "based on Name+ItemCode pair"? I'm not
> Firebird database using unique ID fields. The tables contain fields,
> Name and ItemCode that are unique in both tables but may not point to
> the same IDs. I'd like to sweep through the Paradox table and update
> each record (based on it's ID)
sure I understand the problem.
> in the Firebird table so that the ID,I don't see why do you need to turn ref. integrity off here? If I
> Name, and ItemCode fields all match in both tables.
understand correctly you have one table FB and one in Pdox.
FB:
ID, Name, ItemCode
1 a 123
2 a 124
Pdox:
ID, Name, ItemCode
1 a 123
6 a 124
And you want to have (in both FB and Pdox):
ID, Name, ItemCode
1 a 123
2 a 124
6 a 124
Right?
Or perhaps you want to have:
ID, Name, ItemCode
1 a 123
6 a 124
in both?
Whatever is the case, I don't see why ref.integrity would fail. You
could simply declare all foreign keys WITH UPDATE CASCADE and be done
with it.
--
Milan Babuskov
http://www.flamerobin.org