• Post Reply Bookmark Topic Watch Topic
  • New Topic

Performance - JDBC vs XML  RSS feed

Mattias Liljenzin
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, first time im posting here!

Im working on a small community site that will be used for me and my friends. The site will allow users to post a review about anything, it could be a good book, a tasty recipe, the movie they watched yesterday, etc.. I have implemented the user info in XML for login and registration and was about to start working on the review posting.

Since im pretty fresh in jsp/servlet/JDBC/XML (im a student and did a ebay-look-alike-project last autumn and was very impressed about the whole thing, and thus the interest for this small project), i really dont know what technology is best to implement these various actions in. In the 'ebay-project' we used JBDC for everything, but im reading more and more about XML and it's flexibility, and thought "why not? i will probably need to learn it some day", so i went doing the login- & registrationprocess in XML(JDOM) - and it works very well. Now im about to implement the review-posting, and was wondering if i should stick to XML or use JDBC(pro's con's?). With a database, its very easy to get, for example, the average score of a review based on several user's rating. In XML im abit worried that the XML-files will become very large and im also abit lost on how i should structure the files if i use XML.

So, my questions are really these:

*What pro's and con's are there by using XML or JDBC(in general and also for this kind of project)?
*If XML is the choice, how would you suggest i structure the XML-files? All reviews and comments in the same file or how would you recommend it?
*When there are numerous users online and all of them are either posting their own review or a comment, is there anything in particular i should think of?(like using synchronized in some actions)

The server will probably be a dedicated one, running Tomcat 5(Pentium III probably) or renting a cheap web hotel. Some technology may be better than the other one, but is more demanding in hardware etc(reason for info )

Any response is appreciated!

Mattias Liljenzin, Sweden(no we dont have polar bears here )
Maximilian Xavier Stocker
Ranch Hand
Posts: 381
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suggest reading the following thread there is alot of detailed explanation and real world examples of why this is a bad idea. XML is fine but not for this just read the link and if you have follow up questions ask.


Executive Summary

  • XML is nice for data transport
  • XML is NOT for data storage
  • Do use XML when appropriate
  • Don't use XML as a replacement for a database

    Consider Paul's rocket mass heater.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!