Subject | Re: [firebird-support] Re: Bad design causing problems |
---|---|
Author | Rik Barker |
Post date | 2006-05-24T16:24:31Z |
Hi Dave,
Thanks for taking the time to reply.
attempts to look for existing entries. However, I think because the
threads are isolated that Thread2 isn't aware that Thread1 has already
added the record.
It's not a case of not wanting to throw an exception, it's a case of not
(yet) knowing how to throw an exception.
whole lot of data, I'd rather only have "Bob" in there once, and from then
on refer to Bob as 17312. I have several tables that inter-relate, and I'm
using the ID field as a foreign key in other tables.
Sort of:
Tracks <---- TrackArtists ------> Artists
ID (PK) TrackID ID (PK)
TrackName ArtistID ArtistName
Hope that makes some sense.
Cheers,
Rik
Thanks for taking the time to reply.
>You could look for existing entries in your SP before doing the insertI think I suggested both of those in my email. The SP certainly already
>and throw an exception if the entry already exists. Or you could
>create a Unique index on Name so the insert of a duplicate would fail.
attempts to look for existing entries. However, I think because the
threads are isolated that Thread2 isn't aware that Thread1 has already
added the record.
It's not a case of not wanting to throw an exception, it's a case of not
(yet) knowing how to throw an exception.
>Er, in the real world names are duplicated. Are you sure you have a<grin> You are not a free man, you are a number. Because there could be a
>true model if it rejects duplicates?
whole lot of data, I'd rather only have "Bob" in there once, and from then
on refer to Bob as 17312. I have several tables that inter-relate, and I'm
using the ID field as a foreign key in other tables.
Sort of:
Tracks <---- TrackArtists ------> Artists
ID (PK) TrackID ID (PK)
TrackName ArtistID ArtistName
Hope that makes some sense.
Cheers,
Rik