I trying to do some database modling using your product and I am trying to assign a foreigner key to a unique set of columns in another table and I am getting a error message "Destination Column(s) not part of the primary key or is not unique". I Created a unique constraint on the columns I am trying to reference, thus it isn't the primary key, but it should still work, as I can do it via code in Oracle 9i.
Program Version 6.1.785
Does anyone know why this is doing this???
Cory
This is one of the tests I use when determining if a database modelling tool can really handle REAL databases. Some modelling tools, notably Embarcadero ER/Studio are fixated by the
US IDEF1X standard - which prohibits foreign keys to other than the foreign primary key. It took me
6 years to get them to actually conform to relational theory!
It was one of the first tests I applied to EA when I investigated it. It
could handle the non-primary foreign key.
However, it should be noted that a unique constraint is NOT NECESSARILY the same as a unique index. In practical terms, a unique constraint is almost always handled by a unique index and a unique index effectively imposes a unique constraint. BUT you don't have to have a unique index to impose a unique constraint!
So Cory, as David suggests, have a look at the release notes and if things still don't work, check whether the foreign table has the unique constraint as an alternate key.
(As with Embarcadero ER/Studio, I believe the unique constraint is
all that is required by relational theory - but I'm more forgiving of EA if it hasn't quite got this right yet. This one is a bit more subtle - and compounded by the fact than many DBMSs don't do a good job here either and EA has to support them).
HTH,
Paolo