SQL model question [message #119825] |
Tue, 12 July 2005 07:29  |
Eclipse User |
|
|
|
Hi,
I have seen the SQL model of the RDB package in the Rational Rose mdl file
and I have doubts about the containment relations between Database and
Schema, Schema and all others(i.e. Tables, Indexes...).
The current model as of now, when generated using the EMF, and using a
sqlschema resource (for a Schema resource or a Database resouce), it is
not possible to create a child 'Schema' in a Database, and in a Schema we
cannot create a child 'table'(and quite other important SQLObjects). As
this would be sound natural to do.
And because of this, its necessary to have separate resources and refer
them loading the resource. Which of course allows reusing of resources,
but should be merely an option that could be used.
In the SQL mdl model I have made a small change to the containment
relations from "contains a" to "creates a" and now everything works as
before, but now I can create a child 'Schema' in the Database, and as well
a child 'Table' in a Schema. [of course other types of children are
available and this is just the simplest examples].
Could there be an official modification to the mdl model concerning the
containment relations to allow such resource functionality?
Best regards,
Igor Lino
|
|
|
|
Re: SQL model question [message #122976 is a reply to message #120961] |
Tue, 19 July 2005 09:42  |
Eclipse User |
|
|
|
Hi Der Ping,
I have made two modifications to the model
1)AGGREGATIONS IS NOW BY VALUE (filled diamond)
Yes, I used different terms. Its aggregation. I just meant to use
aggregation by value instead of by reference. The idea of this is in my
initial post.
2)IsID ecore property of 'label' attribute of the SQLObject entity set to
true.
A comment I miss to mention is that when you have multiple resources, and
I refer one resource from another. Lets say I have a Database that refers
to a Schema in another resource, it referes in the XMI by enumeration
(numbers). It seems to me very suspiciuos. I fixed it in the model in the
SQLObject entity in the 'label' attribute by overwriting the ecore
property 'isId' -> true.
After the ecore 'isId' is true, then the references between the resources
XMIs is more consistent not using numbers but the labels. (If you remove a
column in a table, the reference using numbers wouldnt make sense.)
And I have a additional/bonus question: whats the difference in a Schema
SQLObject between the 'label' and the 'name' attributes. The first is
declared in the SQLObject, the second is inheritated from ecore. I
currently use 'label' attribute for the name of a table... but maybe i'm
wrong?
Best regards,
Igor Lino
|
|
|
Powered by
FUDForum. Page generated in 0.04095 seconds