Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » SQL model question
SQL model question [message #119825] Tue, 12 July 2005 11:29 Go to next message
Igor Jacy Lino Campista is currently offline Igor Jacy Lino CampistaFriend
Messages: 34
Registered: July 2009
Member
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 #120961 is a reply to message #119825] Fri, 15 July 2005 01:58 Go to previous messageGo to next message
Der Ping Chou is currently offline Der Ping ChouFriend
Messages: 36
Registered: July 2009
Member
Igor,

The relationships between db, schema and table are not containment at all.
They are all aggregation rather. This was done on purpose to give users
option if they want to persist model in one resource or multiple resources.

You can always emulate containment by implementing containment provider.

Could you please forward me you changes with the model? I will forward to
our model expert to look into your changes so as to understand your
requirement.

Regards,

Der Ping
Re: SQL model question [message #122976 is a reply to message #120961] Tue, 19 July 2005 13:42 Go to previous message
Igor Lino is currently offline Igor LinoFriend
Messages: 3
Registered: July 2009
Junior Member
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
Previous Topic:upgrade
Next Topic:I cann't put the web application into root context under wtp rc1 using tomcat
Goto Forum:
  


Current Time: Fri Aug 23 10:20:09 GMT 2024

Powered by FUDForum. Page generated in 0.03579 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top