XML aiding in database interaction?

They have: 103 posts

Joined: Apr 1999

I'm confused how XML is used to benefit interaction with a database such as Oracle, MySQL or SQL Server. Are there any online resources that discuss how XML can be used with PHP to aid in database interaction?

To me, it just seems that XML is its owned database structure.

Gil Hildebrand, Jr.
Internet Consultant
New Orleans, LA

Peter J. Boettcher's picture

They have: 812 posts

Joined: Feb 2000

Gil,

XML can be a great tool if used properly.

Universal Standard:
Since it is a universal data standard it doesn't need to be translated for different database systems. This has great importance with large enterprise data systems, let's say Amazon.com process's it's orders to accounting once a week. Accounting is handled by an external company utilizing a different database system. Rather than having to create a translation program that makes the data readable by both systems they share an XML schema. Data can be sent back and forth between the 2 through this schema.

Client-side Parser:
Although still not supported by all browsers, the client-side parser allows complex data manipulation without round trips back to the server. While this could also be achieved with scripting and arrays it's a lot more work.

It's another thing to learn!

I don't know of any XML/PHP specific resources but http://www.xml101.com is a great place to start for XML.

PJ | Are we there yet?
pjboettcher.com

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.