May 17, 2005 at 2:21 pm
Hi, I need to store XML files in a table. These files are kind of log files in XML format. At times they can be as big as 10 MB. From the application prespective, they should be able to display the records in these files as fast as possible. I was trying to find out the best option for this.
What would be the best in this case?
- Storing the File as it is in a text field
or
- Storing the rows in XML file as separate records in the database table.
Any suggestions or new ideas will help.
Thanks
Rosh
May 17, 2005 at 2:36 pm
Depends of what you need... if you need to be able do resend the file as is once in a while. I would save the file on the hd and save the location in the db. You could also save it in a text column.
But if you need to be able to search the xml file then I would suggest you import it in a normalized model in the db... That way it becomes easy to query the data.
May 18, 2005 at 7:07 am
It probably depends on whether you'll be processing the XML files individually or if you need to process many XML files together. If the latter, importing it into a normalized model in the DB is probably the way to go as you'll be able to use the power of SQL for comparisons, JOINs, etc. However, if all you'll be doing is processing each XML file by itself, store it in a TEXT field and when you're ready to use the XML, read it from the DB and load the XML into an MSXML document object. I have a system where the user goes thru a "wizard" to complete a 40+ page document, each section of which is an individual node of an XML file. I store the XML in a SQL TEXT file and then extract it and call the loadXML method of the DOMDocument object to get an XML document object to work with. Works like a champ...
May 18, 2005 at 2:10 pm
Thanks Milzs & Remi!
I need to process one file at a time and display the file whenever requested. I agree storing it as text would be better.
Regards
Rosh
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply