Hey all

I'm not so sure if this is the correct place to ask this question, but I'm
hoping some of you will be able to give me some feedback. I am currently
toying around with php and mysql developing a website for myself, the
current one is partly php powered, but I am trying to move it over to a
complete php and mysql system, I would also like to use XML. 

i have previously used Xml on another web project, and i really liked the
way you could reformat you content, and it's ease of use. What i was
wondering is, if any of you use XML to store your content, in what way do
you go about it. 

At the moment i see 2 sepeerate ways of going about it. 

a)Mark up your documents in xml and store the xml documents in a database,
your database can be pretty simple, witha couple of fields that represent
some of the meta data in the xml file, e.g. Author, Date-created, then a
large blob which is the doc. when you wish to view the document, you
search on the criteria that is available, and then retrieve your xml
doc. Some down sides to this could be the explosion in the size of the db,
if you are storing a large amount of documents etc and also the redundancy
in some of hte fields, e.g you have an author field, but this info is
contained in the xml doc. It is good, because it is an essentialy simple
application, in both php code to pull the data and in the database design.


b)have the database act as a sort of XML holder, e.g. break the document
down to it's base components, and store all the meta data in the database,
when a doc is needed, the xml doc can be created on the fly, by pulling
the data out of the appropriate fields. some problems with this can be the
database design, it can become extremly complicated(i would imagine, i
have not tried it yet), as you are effiectively modelling the DTD in the
database. but at the same time, we are reducing redundancy, hopefully, so
long as it is well normalised. 

the reason i am asking this is becaue of the amount i read about xml, how
good it is extensible etc, there is not much out there inregards to the
practical application of it, aside form the odd tutorial on how to
construct a DTD or how to parse XMl with Java/PHP etc.

once again, i'm not sure if this post is appropriate to this mailing list,
perhaps i should send it to a MySql list or something, but if anyone has
any ideas or thoughts on the topic i would really appreciate it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to