Chapter 15. XML and MySQL About XML and MySQL
MySQL is a relational database application, pure and simple. Billed as "The World's Most Popular Open Source Database" MySQL certainly has a wide support in the Internet community. Many people think MySQL can't be very good because it is free, especially Oracle database administrators. True, it does not have all the features of Oracle, nor does it require a specially trained person to keep it up and running. A part of the LAMP suite, MySQL compiles easily on a multitude of platforms. It comes as a pre-compiled binary for Windows. It has been used to manage millions of records and gigabytes of data. Fast and ro- bust, it supports the majority of people's relational database needs. With version 4.0 it supports proced- ures and triggers, features long desired by people who wanted "a real relational database application". For the purposes of this workbook, the simple XML functionality introduced in 4.0 is more important.
Installing and running a stand alone MySQL server on a Windows computer is relative easy:
download the distribution
unpack it into its own directory
run the Setup application using the default settings
open a command prompt
start the server ( c:\mysql\bin\mysqld --standalone )
Installing MySQL on a Unix/Linux host is a bit more involved but pretty much follows the normal open source distribution method:
sudo make install
set up the server's root password
initialize the server's necessary databases
Exercise - Transform MODS to SQL
In this exercise you will transform a file containing MODS records into an SQL file.
Open xml-data/mods/single/catalog.xml in your Web browser or text editor. Notice how it a set of MODS records with human-readable element names denoting bibliograhic fields.