[nycphp-talk] Database vs. XML
bruce at mtiglobal.com
bruce at mtiglobal.com
Wed Jul 17 03:03:08 EDT 2002
Thanks for the responses.
But if I'm storing data in a database then why not skip xml and output the
data to a text file and save as html where I'm outputting the recordset one
by one using something like:
x = "<p>" + productID + "</br>"
where productId is the record from the recordset I'm looping through and
any transformation is done in the sql statement used to open the recordset?
> How would you store the XML? Flat files? In that case I think you're
> going to find that approach a little slow. Relational databases have a
> lot of advantages.
>
> There's nothing mutually exclusive about using a database AND XML. You
> ideally could store your data in a properly normalized database, write
> object-oriented PHP to query it, generate well-formed XML from the
> query results, and fold in XSLT to emit HTML.
>
> There are even databases out there that claim to store data natively in
> XML (some of which support query languages with better grammar than
> SQL). Searching for "Open-source XML database" on Google:
>
> http://www.rpbourret.com/xml/XMLDatabaseProds.htm
>
> http://exist.sourceforge.net/
>
> http://www.xmlhack.com/read.php?item=1345
>
> Eliot
>
> ----- Original Message -----
> From: <bruce at mtiglobal.com>
> To: "NYPHP Talk" <talk at nyphp.org>
> Sent: Tuesday, July 16, 2002 9:24 AM
> Subject: [nycphp-talk] Database vs. XML
>
>
>> Hi!
>>
>> I've been asking a number of people this question but haven't received
> a
>> satisfactory answer, so was wondering if anyone here can help.
>>
>> Both a database (such as MySQL) and XML can be used for storing,
>> manipulating (XML w/ XSLT), rendering data.
>>
>> How does one decide between the two?
>>
>> One scenario I might be dealing with soon is taking product
> information
>> from a DOS system and throwing it out to either MySQL or XML for
> posting on
>> a web site.
>>
>> Thanks.
>>
>> - Bruce
More information about the talk
mailing list