XML <=> Database

John Wilson tug at wilson.co.uk
Wed Jul 16 12:23:33 EDT 2003


vivek at cs.unipune.ernet.in wrote:
> Hi all,
> 
>   Is there any module available which does the same work as the XML
> Integrator
> in Java. Actually I am working in an educational institute, there
> somebody asked me to teach Java as a part of a Database course. As I
> am not very good in Java so I asked for the type of assignments they
> want to give to students. So here is what they told me:
> 
>   There will be a three tier architechture. One web application, Web
> Server,
> one Application Server and the Database backend. The Web server will
> get the
> data as a XML document. This will be passed to the application server
> that
> will parse the document and will insert/Update/Delete the data in the
> database
> Server. Similarly the data will be retrieved from the database and
> will be
> converted in a XML document by the application server and will be
> send to the
> user's browser through the web server.

Can you define the format of the XML document or is it fixed?

If you can define the format of the document then you could make it an
XML-RPC call. The data from the document would be marshalled automatically
by the XML-RPC implementation and you would have very little code to write
to perform ythe database access. Likewise the result of a database query
would be converted into XMl by the XML-RPC implementation.

Using XML-RPC would have the advantage that you could make Python and Java
implementations and compare the ease of development and performance between
the two approaches.

John Wilson
The Wilson Partnership
http://www.wilson.co.uk





More information about the Python-list mailing list