Title: From DB to METS
1From DB to METS
- Eric StedfeldNew York University
2Goals
- Simple database structure for the most common
METS needs
- Simple interface to take user input, generate
METS and return results
- XML processing to convert and display selected
material in a web environment
- Future extensions for more complicated media
types and metadata
3Tools
- MySQL database to store structural, descriptive
and image technical metadata
- Perl to take user input, query database, build
METS file and return Web success page
- XT to transform METS XML to HTML using XSLT
- Tomcat to call XT servlet and display HTML to user
4Web Interface Generate METS
5Web Interface Success
6Web Interface Return Results
7Web Interface Select Page
8Web Interface View Closeup
9Database Schema ZeroDB
10Database Schema Center
11Database Schema Center
12Database Schema Object Tree
13Database Schema Subject
14Database Schema Name
15Database Schema Phys. Object
16Database Schema Media
17App Code Main Routine
use DBI... Set query, path and database varia
bles print_head Start "Success" HTML page d
bh DBI-connect("DBImysqldatabase",
dbuser, dbpass)do_onedbh-disconnect
return_to_browserprint_footer Finish
"Success" HTML page
18App Code Do One
sub do_one objectTreeID fetchme Set up
file and path variables using objectTreeID
get_children create array of objectIDs
open (OUTFILE, "path")print_xmlclose
(OUTFILE)
19App Code Get Children
sub get_children SQLstmt "SELECT o.objectTr
eeID, o.parentIDFROM objectTree AS o WHERE
o.parentID objectTreeIDORDER BY
o.objectTreeID" sth dbh-prepare(SQLstmt)
sth-execute while (_at_row sth-fetchrow_array
) childID row0 _at_children childID
sth-finish
20App Code Print XML
sub print_xml print OUTFILEhereEOF SQL to fetch METS header infoprint_M
ETSHeader print_dmdSecDMprint_amdSecprint
_fileSecprint_structMap print OUTFILE METS close file stuff hereEOF
21XML Descriptive Metadata
22XML Technical Metadata
23XML File Section
24XML Structural Map
25Web Interface Select Page
26Issues
- Database capability vs. METS flexibility
- Normalized vs. efficient database schema
- General vs. specialized approach for many METS
types
- Hard areas such as rights metadata
- Data synchronization
- Consistency across institution(s)
27Future
- Meta-programming programs to create programs,
database schemata and stylesheets
- Consistent utilization and implementation of
Profiles
- Down-streaming more of the work less
specialized skill sets required, less boutique-y
28From DB to METS
- Eric StedfeldNew York University