You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by Tim Clotworthy <tc...@bka-inc.com> on 2003/03/25 21:48:35 UTC

How does Torque framework adjust to evolving DB schema?

Perhaps I am missing something in the documentation, but I only see how
to install and setup Torque, not how to keep the various objects in
synch with an evolving DB schema. For instance, as tables are added and
removed, fields are added to existing tables, etc. How does Torque
adapt?

 

A DB schema can't realistically be maintained in XML (*-schema.xml, or
whatever the Torque schema file is). A DB is maintained by DBAs through
sql scripts or through tools like Erwin, not with XML.

 

Is there some cache of documentation I am overlooking here, or is Torque
not intended for real databases that must scale? I would greatly
appreciate it if anyone can direct me to how Torque addresses an
evolving database.  Thanks very much.

 


RE: How does Torque framework adjust to evolving DB schema?

Posted by Quinton McCombs <qm...@nequalsone.com>.
You will have to keep the xml file in sync with the database schema.
When it changes, just regenerate your OM objects again.  As long as you
do not make modifications to any of the Base* or map.* objects, you will
be fine.  The only thing that torque will not do is delete OM objects
when you remove the table definitions.  That part you will have to do
manually.


--------------------------------------------
Quinton McCombs
NequalsOne - HealthCare marketing tools
mailto:qmccombs@NequalsOne.com
http://www.NequalsOne.com 

> -----Original Message-----
> From: Tim Clotworthy [mailto:tclotworthy@bka-inc.com] 
> Sent: Tuesday, March 25, 2003 2:49 PM
> To: torque-dev@db.apache.org
> Subject: How does Torque framework adjust to evolving DB schema?
> 
> 
> Perhaps I am missing something in the documentation, but I 
> only see how to install and setup Torque, not how to keep the 
> various objects in synch with an evolving DB schema. For 
> instance, as tables are added and removed, fields are added 
> to existing tables, etc. How does Torque adapt?
> 
>  
> 
> A DB schema can't realistically be maintained in XML 
> (*-schema.xml, or whatever the Torque schema file is). A DB 
> is maintained by DBAs through sql scripts or through tools 
> like Erwin, not with XML.
> 
>  
> 
> Is there some cache of documentation I am overlooking here, 
> or is Torque not intended for real databases that must scale? 
> I would greatly appreciate it if anyone can direct me to how 
> Torque addresses an evolving database.  Thanks very much.
> 
>  
> 
> 


Re: How does Torque framework adjust to evolving DB schema?

Posted by Jon Scott Stevens <jo...@latchkey.com>.
on 2003/3/25 12:48 PM, "Tim Clotworthy" <tc...@bka-inc.com> wrote:

> Perhaps I am missing something in the documentation, but I only see how
> to install and setup Torque, not how to keep the various objects in
> synch with an evolving DB schema. For instance, as tables are added and
> removed, fields are added to existing tables, etc. How does Torque
> adapt?

Torque generates code as described in the XML file.

> A DB schema can't realistically be maintained in XML (*-schema.xml, or
> whatever the Torque schema file is). A DB is maintained by DBAs through
> sql scripts or through tools like Erwin, not with XML.

That is a nice concrete statement which is completely false.

A slightly more correct statement is:

A DB schema is realistically maintained in whatever format it was first
created in. You can then make changes to the schema which are in the form of
upgrade scripts which are maintained as SQL scripts.

> Is there some cache of documentation I am overlooking here, or is Torque
> not intended for real databases that must scale? I would greatly
> appreciate it if anyone can direct me to how Torque addresses an
> evolving database.  Thanks very much.

I dunno...we have been developing Scarab for the last 3 years using Torque
and our ability to 'scale' has been managed quite well...even with some
pretty significant database changes.

Sure, there are some things that don't translate well when you make some
core changes, but most of that surrounds business logic which expects a
certain schema design and is therefore difficult to modify easily. That is a
problem I don't think anyone has solved completely.

-jon

-- 
StudioZ.tv /\ Bar/Nightclub/Entertainment
314 11th Street @ Folsom /\ San Francisco
        http://studioz.tv/