Why Use XML while Schema is same ??

A

Atif

Hi
I have read about XML and its use for transferring data. I have alot
of mis conceptions. Let's take an example
I have database at two locations L1 and L2, both locations are using
different DBMSs but having same schema(datatypes and other rules). If
i want to transfer data from L1 to L2, it 's not a web based
application. More precisely, i would make connection with L2 and will
request data through SQL query into the recordset. Would using XML
make any sense here that first the data will be converted into xml
from L2 and then this XML will be sent to L1, then L1 will retrieve
the data from XML file, why not directly transfer the data?? If i
would have different Schemas on L1 and L2, how XML will work here??
please clear my concepts, if don't have time try to give suggestions
atleast.
Thanks
 
P

Patrick TJ McPhee

% I have database at two locations L1 and L2, both locations are using
% different DBMSs but having same schema(datatypes and other rules). If
% i want to transfer data from L1 to L2, it 's not a web based
% application. More precisely, i would make connection with L2 and will
% request data through SQL query into the recordset. Would using XML
% make any sense here that first the data will be converted into xml

If you are writing the software that connects to L1 and the software
that connects to L2, then there's nothing to be gained from using XML in
this process. You might as well use the data structures and message
structures that are most efficient and have a promotion strategy which
keeps both pieces of software in synch (assuming it's more than one
program).

If you have different people writing the software for L1 than are
writing the software for L2, then you need to agree on the way you'll
encode the data when handing it off. XML provides a framework which will
make this simpler. That is, rather than saying `a message begins with a
10 byte header of which the first four bytes are the length as a two's
complement integer in network byte order ...' you can say `a message is
an XML document with the following elements ...' and never worry about
they syntactic details.

It doesn't make any difference whether the schemas are the same or
different. In general, you'll have both situations, and will need to
handle both within a single application. I'm not convinced that XML
makes it easier to define the mappings between two structures, but you
can use XSLT if your data is XML, and you can't use XSLT if your data is
not XML.

There are canned applications for performing this kind of operation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top