Book a Demo

Author Topic: Generalizing on DDL models  (Read 2616 times)

mthird

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Generalizing on DDL models
« on: September 08, 2006, 08:52:19 am »
I'm trying to use EA for data modeling and I can't figure out if EA supports inheritance for table stereotypes.

For instance:

TableBase
 CreatedDate
 LastModDate
 Version

DerivedTable : TableBase
 Id

The DDL generated from this doesn't include the inherited columns.  Am I doing something wrong, or is this not supported.

Michael

thomaskilian

  • Guest
Re: Generalizing on DDL models
« Reply #1 on: September 10, 2006, 11:34:10 am »
As far as I remember inheritance was not supported. No idea whether that changed with 6.5

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Generalizing on DDL models
« Reply #2 on: September 10, 2006, 08:57:39 pm »
Quote
As far as I remember inheritance was not supported. No idea whether that changed with 6.5
No, it's not supported.

The Database stuff is only now starting to stabilise with the addition of views in 6.5.

Also, under relational theory, inheritance doesn't really exist.  You may have subtype tables, but they don't inherit the columns of the supertype, only the primary keys.  (See IDEF1X - the US Dept of Defence Standard).  Other products handle this case via Subtype Clustering (EA could possibly do it via Generalization sets) - but the point is, it would still be about primary key propagation.  Sparx would need to support the IDEF1X standard here before embarking on more adventurous concepts.

That having been said, the ability to truly inherit (from, say, one or more ancestors)  - whether typically deferred1 (but occasionally even effective) would be an extremely useful functionality for EA to have.

Paolo

1 Deferred - a better word than abstract to indicate the classifier cannot be implemented (effective) in this embodiment.
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Generalizing on DDL models
« Reply #3 on: September 10, 2006, 09:18:12 pm »
postgreSQL, which does support inheritance would require the DDL to be generated as:
Code: [Select]
CREATE TABLE public.DerivedTable (

id bigint
)  INHERITS ("TableBase")
;


which I can't see would be a big change to the DDL build for postgres  ???

bruce

p.s.  in fact it should be (able to be) :

Code: [Select]
CREATE TABLE "DerivedTable"
(
 id int8
) INHERITS ("TableBase")
WITHOUT OIDS;
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.