[XML4Lib] Database schema for MARCXML?
Clay Redding
credding at princeton.edu
Wed Oct 11 15:20:03 EDT 2006
Heya Andrew,
Actually, I've been meaning to say 'ello, ever since your site came
out. Nice work! I'm moving down to DC as we speak, to start a job at
LC, but do keep in touch.
The XML functionality is somewhat officially supported by Postgres, but
not to the extent of a true native XML db like eXist or X-Hive. You'll
find the contents in the contrib/ dir of the installation, as
contrib/xml2. You'll need libxml and libxslt2 to compile, IIRC. There
is no XML datatype yet -- instead you're supposed to datatype as text.
More details:
http://developer.postgresql.org/pgdocs/postgres/datatype-xml.html
http://www.throwingbeans.org/postgresql_and_xml_updated.html
After using a NXDB, there's little chance I'd really ever go back to
something like this. It was a neat thing in 2003, when the NXDBs were
still underpowered and didn't scale. The XPath functionality from
libxslt2 that is used as for SQL in Postgres is only based on XSL/XPath
1.0, which is limitng. But there are times when the hybrid solution
would be really nice, and it seems the Oracles and DB2s of the world are
making some strides for the hybrid approach. I still really like SQL in
a few ways over XQuery, mainly because it's less verbose (with "few"
being the operative word). At the end of the day I'd still take XQuery
though.
Clay
Andrew Nagy wrote:
> Clay, Hope all is well across the river in Princeton.
>
> I was wondering if you have used the Postgres XPath functions? I saw
> the site that you referenced below and it says that the xpath library
> is now apart of the core package. But after searching Postgres's site
> for "XPath", i find nothing. Do you know of any documentation about
> this anywhere? I'd like to give it a shot, but I am curious as to
> what capabilities are available.
>
> Thanks!
> Andrew
>
> Clay Redding wrote:
>
>> Hi Jacob,
>>
>> If you are required to use a relational database for this, what I
>> have to say might not help. I've long since given up trying to map
>> common XML metadata formats to RDBMS -- especially ones that don't
>> translate very well (like Mike said). These days I largely use
>> native XML dbs (such as eXist or X-Hive) to do this sort of XML work,
>> and the development time (even factoring in learning XQuery) seems
>> shorter than working out a RDBMS schema. Alternatively, I've used
>> PostgreSQL, which allows you to store the XML as a whole file inside
>> a table. Then you use a hybrid of SQL and XPath/XSLT to interact
>> with the data:
>>
>> http://www.throwingbeans.org/postgresql_and_xml_updated.html
>>
>> Clay
>>
>> jkglenn at umich.edu wrote:
>>
>>> Hello,
>>>
>>> Hopefully the list is willing to entertain a naive question from a
>>> MARC and XML newbie. I'm trying to figure out the best way to store
>>> MARCXML records in a relational database, and am wondering if there
>>> are any standard database schemas out there for doing this. In
>>> particular I would like to avoid having to write database queries to
>>> replicate the functionality of CCL commands that search a particular
>>> set of MARC fields. I've found some limited info on the Library of
>>> Congress website, but nothing very helpful. If someone could point
>>> me in the right direction I would be most grateful.
>>>
>>> Thanks,
>>> Jacob Glenn
>>> _______________________________________________
>>> XML4Lib mailing list
>>> XML4Lib at webjunction.org
>>> http://lists.webjunction.org/mailman/listinfo/xml4lib
>>
>>
>>
>>
>> _______________________________________________
>> XML4Lib mailing list
>> XML4Lib at webjunction.org
>> http://lists.webjunction.org/mailman/listinfo/xml4lib
>
>
More information about the XML4Lib
mailing list