Attribute discriminator

Discussions about database modeling product Cameo Data Modeler functionalities

Moderator: Moderators

Attribute discriminator

Postby » Wed Jun 10, 2015 6:28 am

Hi, I have created Generalization Set for column which I named "tipas" and then I've set attribute discriminators for derived entities.


After transforming my ERD to Oracle SQL attribute discriminators change into check constraints on the tables of derived entities. Though Derived entities do not have "tipas" column. I suppose triggers should handle the checking if subtype is assigned correctly. What I am could be doing wrong? Thanks.
Forum Newbie
Forum Newbie
Posts: 3
Posts Rating:0
Joined: Wed May 06, 2015 8:36 am

Re: Attribute discriminator

Postby TomasJkn » Tue Jun 16, 2015 4:46 am

Laba diena, Vytautai :),

This is a semi-bug/semi-missing feature. The check constraints in the generated DDL does not work properly for generalization transformation strategy "Multiple Tables, Decomposed Object". Currently it only works for "Multiple Tables, Copy Down" generalization implementation strategy.

When this strategy is used, all the child tables retain the columns from their parent(s) (i.e. columns are copied down, from parent tables into the child tables) and then check constraints work correctly.

I suppose triggers should handle the checking if subtype is assigned correctly

I am not sure about the need of triggers here. I would guess it would be possible to simply generate a different check constraint body for the generalization handling strategy "Multiple Tables, Decomposed Object".
Something along the lines:
CHECK (EXISTS(SELECT * FROM transporto_priemone, krovininis WHERE AND transporto_priemone.tipas='krovininis')))
instead of the simple current case:

I am not sure if such constraints are allowed in Oracle (if not, something else needs to be invented - maybe triggers, as you've suggested).

I will fill in a bug into our bugtracker and we will try to fix this in the future releases. I am just not sure about it's disposition, it may be requalified by product manager as a feature request instead of a bug.

Tomas Juknevičius
You do not have the required permissions to view the files attached to this post.
Tomas Juknevicius
Senior Systems Analyst
No Magic Europe
Customer Support
Customer Support
Posts: 63
Posts Rating:7
Joined: Mon May 10, 2010 9:24 am

Return to Cameo Data Modeler

Who is online

Users browsing this forum: No registered users and 1 guest