Jump to content

PHP Performances XML vs MySQL Database

- - - - -

  • Please log in to reply
No replies to this topic

#1
Mysteriis

Mysteriis

    Newbie

  • Members
  • Pip
  • 5 posts
Hello.

This is my question. If I am coding an article directory, something pretty simple that goes like this :

- $title
- $intro

FOREACH sub-part
- $sub-title
- $sub-text

- $conclusion

Which would be the best in terms of performances ?
A MySQL table with two rows, title and text ? Knowing that in text I could put it all in one as :
$text = $intro + $all-sub-parts + $conclusion

Or, for each article, an XML file like this :
<file><title>title</title>

<subpart1>

<title>sub-title</title>

<text>sub-text</text>

</subpart1>

<subpart2>

<title>sub-title</title>

<text>sub-text</text>

</subpart2></file>

And each time the user wants to see that article, the script would interpret and rende that XML file to fit the design of the article directory.

Which do you think is lighter / faster to execute ? Which has better performances ?
Thanks.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users