XML in web apps

D

dbmaster1443

I am new to XML as far as its actual usage in application is concern.
My client has asked me to make use of XML in his project. At present my
proposal is based on 3-tier architecture. In which a application front
end talks to database using java based business logic. In other words
it is simple insert, retrieval and updating of data in database. I am
stuck up with the use of XML. My queries related to use of XML are as
follows.
(1)Shall I insert the data in XML file instead of database? If so will
I have to create Individual XML files for each record or i have to keep
append a single XML file? There are 42000 records. Whether 42000 unique
XML files or single file of size close to 30-35 MB, in both cases
performance will get hit. Am I right?
(2)Where shall I store XML file, in file system (C or d drive) or in
database directly as a Blob?
What advantage will I get if i ditch my proposed architecture and adopt
XML based system?

John Snow
 
V

Vincent van Beveren

I am new to XML as far as its actual usage in application is concern.
My client has asked me to make use of XML in his project.

Did he specify the way you should use XML. When XML is concerned its not
very suitable for storage and quick retrieval. You should see it more as
an generic exchange format.
At present my
proposal is based on 3-tier architecture. In which a application front
end talks to database using java based business logic. In other words
it is simple insert, retrieval and updating of data in database. I am
stuck up with the use of XML. My queries related to use of XML are as
follows.

Does your client have any reasons for the use of XML in this project. As
a requirement in a project is means just as much as 'use a programming
language'. If the requiment was that the data should be stored as XML,
you should consider asking why it should be stored as such. Maybe an
export/import function is enough for your client.
(1)Shall I insert the data in XML file instead of database?

If you must use XML to store business domain information, then you must.
> If so will
I have to create Individual XML files for each record or i have to keep
append a single XML file?

Maybe one XML file referencing several other XML files. You could build
the index in the one and use an ID to reference to another XML file.
> There are 42000 records. Whether 42000 unique
XML files or single file of size close to 30-35 MB, in both cases
performance will get hit. Am I right?

If you need to search though them sequentually yes... you might cache
search criteria in the memory of your app for more peformance.
(2)Where shall I store XML file, in file system (C or d drive) or in
database directly as a Blob?

You might use an XML database:
http://www.rpbourret.com/xml/XMLDatabaseProds.htm#native
What advantage will I get if i ditch my proposed architecture and adopt
XML based system?

Well, your data will be easy to export, and you could transform it with
XSL into serveral other types of data (like HTML)... PDF with XSTL-FO.
But really.. domain data should be stored in a database and transported
as for examle XML. The use of XML files as 'database' is like going back
to the stone age when they use to store client information in
text-files. Unless your client has a really good reason, its a bad idea
to store information in XML. XML is just not suitable for it. It misses
vital facilities like indexing and foreign key constraints.

Vincent
 
D

dbmaster1443

Thanks Vincent... I realized and appreciate your efforts and time which
u spent for this task, and gave Inputs which are valuable for me. Again
thanks for your quick response.
 
V

Vincent van Beveren

Thanks Vincent... I realized and appreciate your efforts and time which
u spent for this task, and gave Inputs which are valuable for me. Again
thanks for your quick response.

Well good luck in your endeavor. If you must use XML, use a native XML
database. I have however never done something like that. Native XML
databases do give you some performance advantages over just storing it
in the file-system.

Vincent
 
B

bowman

Vincent said:
Does your client have any reasons for the use of XML in this project. As
a requirement in a project is means just as much as 'use a programming
language'.

Probably because he read about XML in InfoWeek and thought it was a Good
Thing. I have a canned rant about what XML is and isn't for those impressed
by buzzwords. One day, I thought one of my co-workers was choking on a
hairball, but he had was just reading some documentation that described XML
as a 'programming language'.
If the requiment was that the data should be stored as XML,
you should consider asking why it should be stored as such. Maybe an
export/import function is enough for your client.

Check the latest DB2 release. IBM has been touting an XML interface coming
real soon now for several years so I'm uncertain how much is ready for the
real world. Oracle 10 may have something, too, if your client has deep
pockets.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top