[XML4Lib] Getting MARCXML into a relational database
Eric Lease Morgan
emorgan at nd.edu
Thu Jun 11 20:11:25 EDT 2009
On Jun 11, 2009, at 4:56 PM, Gong, Dao Rong wrote:
> Has anyone had successful experience importing MARCXML file into a
> relational database?
The short answer to your question is, "Yes, many of us have experience
doing this sort of work."
The long answer is, "What is the problem you are trying to solve?"
Putting a single MARCXML file containing a single MARCXML record into
a single text field of a (relational or flat file) database is
straight-forward. If the single MARCXML file contains a collection of
many MARCXML records, then the text field might need to be rather
large -- megabytes and megabytes in size.
If you want to parse each MARCXML record into distinct fields (title,
author, subject, etc.), then you will probably want to apply some sort
of XSL processing against the file. If you wanted a challenge, then
you could convert the MARCXML into "real" MARC records and parse it
that way. Pulling the data out in a cursory way is easy. Pulling it
out in a more finely grained way is more difficult because there are
literally thousands of options. Then of course, to what degree do you
want to exploit relational database techniques to your problem? Join
tables are fun and productive, and the design of databases like these
are not difficult, but inserting data into them requires the creation
of keys and the use of SQL to do inserts. More programming.
Again, what is the real problem you are trying to solve?
--
Eric Lease Morgan
University of Notre Dame
More information about the XML4Lib
mailing list