You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by "Liu, Richard" <Ri...@boeing.com> on 2006/02/07 23:17:10 UTC

A few general questions of Torque 3.2

			Hi,

				I have just installed the torque 3.2 and
made the "bookstore" example work.  

			      Since I am still not very familiar with
torque, I still have a little doubt of torque, in terms of what is can
do.

			Following is what I believe it can do:

			1)   Given an XML Schema in an XSD file (or DTD
file), generate a database schema that represents the XML Schema defined
in the XSD
			  
			2)   Generate source code that can parse XML
documents and insert (update and delete) the data into the generated
database schema



			Following is what I believe it can "NOT" do:

			1)   Generate source code that can extract data
stored in the database schema and create an XML file that conforms to
the XML schema defined in the XSD

			2)   Generate queries to extract data from the
database and create an XML document that conforms to the XML Schema
defined in the XSD file

			3)  Generate xml files which correspondent to
the relational database schema

			Am I right? 


			Thanks in Advance


			Richard Liu
			Software Engineer at Boeing




---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: A few general questions of Torque 3.2

Posted by Dave Newton <ne...@pingsite.com>.
Liu, Richard wrote:

> Am I right? 

Short answer: no.

> 1)   Given an XML Schema in an XSD file (or DTD
> file), generate a database schema that represents the XML Schema defined in the XSD
>   
The schema is defined in an XML file.

XSD and DTD are ways of defining what a valid XML file looks like.
> 2)   Generate source code that can parse XML
> documents and insert (update and delete) the data into the generated
> database schema
>   
No; Torque takes the schema as defined in an XML file and creates
classes that map data in the database to Java objects.
> 1)   Generate source code that can extract data
> stored in the database schema and create an XML file that conforms to
> the XML schema defined in the XSD
>   
I'm not even sure what you mean by this; to me it sounds like the same
thing in #3 belo
> 2)   Generate queries to extract data from the
> database and create an XML document that conforms to the XML Schema
> defined in the XSD file
>   
Briefly: Torque uses an XML file to define database tables and the
relationships between them. From this Torque generates Java source code
to map data in the database to Java objects. This is what ORM
(Object-Relational Mapping) means.
> 3)  Generate xml files which correspondent to
> the relational database schema
>   
Torque can reverse-engineer a database and create the corresponding
schema file, from which it can then generate the Java source code
necessary to use the database within a Java program.

Dave



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org