MySQL

MySQL is an extremely popular open source relational database management system (RDBMS).

MySQL’s new XML Functions

XML or Extensible Markup Language is an increasingly popular method of storing general information. To date its most widely used purpose has been feeds for various websites; but XML is much more than just an easy way to get the latest from your favourite blogs and news websites. MySQL has now introduced XML Functions allowing seamless integration of XML within a database.

A key part of this is XPath, a language specifically designed for reading information in an XML document. XPath can be used to navigate through elements and attributes in an XML document. XPath is used in conjunction with two MySQL functions which find and replace/return the data from the database.

  • ExtractValue() uses two attributes to find and return specific information within an XML document in your MySQL Database.
  • UpdateXML() uses three attributes to find and replace data within the XML document on the database.

I’ll be adding a post about SimpleXML for PHP which forgoes the need for a database all together.

Relational Databases

When building a dynamic website a relational database such as MySQL, Oracle, MSSQL etc. is an important part of the project. Tabular data works well within a relational database as it requires a well-defined structure.

At its most basic a database is simply a collection of rows and columns.Relational databases are a basic requirement of any dynamic website weather a blog, wiki, cms, ecommerce, etc. Relations are created between tables using links between common data in organised in separate tables.

Databases are a highly optimised method for storing and retrieving data. Many high level languages (such as PHP) allow direct access to databases for querying and manipulating data. This enables data to be used efficiently with minimal server load.