954,587 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

which is more fast read xml file or mysql connection

I am making a project where when you select a city, you will get all the hotels on google map as markers.. now i got two options whether make an external xml file for all the hotels and read that file.. or get result for database.. so friends what you think which is more fast..??

thankss

sam230
Light Poster
25 posts since Jul 2011
Reputation Points: 10
Solved Threads: 2
 

What is faster has to do with a lot of things. First of all the amount of data, and how you separate them in a file system or how you create your tables in a database. XML is not for storing data , if each city has lets say 5 hotels and you are not interesting of retrieving them in some way and you are not interesting to built easily an administration panel in order to change them or add them you could put them in a properties file (ini) and be faster.

But all depends of what you are doing and what hardware you have. Generally speaking don’t use flat files as database (in past when we didn’t had databases so easy there were several ways like VSAM files, but even that isn’t as dump as an XML file).

If the key thing you are interesting is the speed use database and then experiment with application scope cashing for output or list of objects (don’t forget that the administration application should update the files that application scope cashing will use). Hope I helped ….

jkon
Posting Whiz in Training
281 posts since Jan 2009
Reputation Points: 77
Solved Threads: 47
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: