Hello Angelo,

we use multiple database schemes all the time and even more most of them are only known at runtime. We stick to the external name of the entities to add the schema names in front of the table names. This is done during startup: all existing eo models are extended that way.

As we have learned, it is necessary for EOF to have full qualified table names when building a qualifier for multiple entities of different schemes (not really surprising if you think about it).

On the other side the user info dictionary is really quite handy to put info there: we have all our data model documentation there, besides other info for special ways of generic entity handling. But thats another story.

Hope, this info helps you a little bit.

Best Regards,
Susanne


Message: 4
Date: Mon, 04 May 2015 20:42:40 -0300
From: Ângelo Andrade Cirino <[email protected]>
To: WebObjects-Dev Mailing List List <[email protected]>
Subject: On SQL fully qualified names and how to implement them in EO
        models
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"

A common practice is to partition the database tables in several different 
schemas (or databases, depending on the specific RDBMS system in use) to group 
tables that are conceptually related. For example, a Product schema would have 
Product, Inventory, Category and other tables.

That said, I have been thinking about how to deal with fully qualified names in my 
EO models. The obvious solution was to use the qualified name SCHEMA.TABLE in the 
entity’s "External Name”. But this leads to a cumbersome need to split the 
names in every SQL generation method for each specific plugin and SQLHelper that 
needs to access the external table name.

Another possibility, more explicit and more direct, would be to have a new 
field in Entity Modeler to insert the schema name. This way we would have an 
entity property that could be directly used to build SQL with the schema name. 
It would make the SQL generation code non-ambiguous and less error prone.

I would like the comrades' opinions to decide if it is worth to move forward 
with the WOLips and Wonder modifications.

Regards,

Angelo

________________
Ângelo Andrade Cirino
[email protected]

"O homem sensato se adapta ao mundo. O insensato insiste em tentar adaptar o mundo a 
ele. Todo o progresso depende, portanto, do homem insensato"
Sir George Benard Shaw

"The reasonable man adapts himself to the world: the unreasonable one persists in 
trying to adapt the world to himself. Therefore all progress depends on the unreasonable 
man."
Sir George Benard Shaw


-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.apple.com/archives/webobjects-dev/attachments/20150504/c6f3f2a4/attachment.html>


--
Susanne Schneider
Coordinator secuTrial Development

interActive Systems GmbH
Dieffenbachstraße 33 c, 10967 Berlin

fon    +49 30 22 50 50 - 498
fax    +49 30 22 50 50 - 451
mail   [email protected]
web    http://www.secuTrial.de

----------------------------------------------------
Geschäftsführer: Dr. Marko Reschke, Thomas Fritzsche
Sitz der Gesellschaft: Berlin
Amtsgericht Berlin Charlottenburg, HRB 106103B
----------------------------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to