Book a Demo

Author Topic: BUG: Primary Key not Unique  (Read 2865 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
BUG: Primary Key not Unique
« on: March 07, 2007, 09:05:44 pm »
[size=16]WARNING, This topic currently contains errors - the issue is not as straight forward as it first seemed.

In particular, we are temporarily retracting our response to Sparx.

An update will be provided soon.
[/size]


When designing Tables for forward engineering, checking the [X] Primary Key checkbox (in EA 6.5(804)) does not also check the [X] Unique checkbox, although the [X] Not Null checkbox is checked.

From the EA Help (emphasis mine): A Primary Key uniquely identifies a record in a table

Rectify please...


Paolo
« Last Edit: March 08, 2007, 11:27:31 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: BUG: Primary Key not Unique
« Reply #1 on: March 08, 2007, 05:24:37 pm »
[size=13]WARNING, This topic currently contains errors - the issue is not as straight forward as it first seemed.

In particular, we are temporarily retracting our response to Sparx.

An update will be provided soon.
[/size]

We've received a response from Sparx indicating that the Primary Key is unique (by definition)...

Our response was:

The Primary Key is also NOT NULL (By definition) but that doesn't stop EA setting the [X]Not Null checkbox.  Also, using the DITS (Designer in the Street) test, the view here is that the Primary Key _imposes_ a uniqueness constraint (and should therefore be shown).

Consistency, Consistency, Consistency! TM

Further to that - it would appear that EA ONLY uses the [X] Unique - checkbox to impose the uniqueness constraint instead of (in our view) more correctly using the combination of [  ] Primary Key and [  ] Unique to infer whether a separate uniqueness constraint syntax needs to be emitted (based on the RDBMS technology used).[/s]
Paolo
« Last Edit: March 08, 2007, 11:26:07 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: BUG: Primary Key not Unique
« Reply #2 on: March 08, 2007, 07:55:24 pm »
Paolo;
Quote
Further to that - it would appear that EA ONLY uses the [X] Unique - checkbox to impose the uniqueness constraint instead of (in our view) more correctly using the combination of [  ] Primary Key and [  ] Unique to infer whether a separate uniqueness constraint syntax needs to be emitted (based on the RDBMS technology used).
Are you implying that the combination [X] Unique AND [ ] Primary Key should not cause a uniquenes constraint to be emitted?
Verbal Use Cases aren't worth the paper they are written upon.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: BUG: Primary Key not Unique
« Reply #3 on: March 08, 2007, 11:30:31 pm »
Quote
Paolo;
 Are you implying that the combination [X] Unique AND [ ] Primary Key should not cause a uniqueness constraint to be emitted?
No Jim, that's not the case.  But thinking about your question, we realized that EA's UI (Unique Interface) struck again and so things are not as clear as we first thought.

You can see the result above...  :-[

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!