28
METS Opening Day – October 27 -28, 2003 1 From DB to METS Eric Stedfeld New York University

From DB to METS

  • Upload
    manny

  • View
    58

  • Download
    2

Embed Size (px)

DESCRIPTION

From DB to METS. Eric Stedfeld New York University. Goals. 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 - PowerPoint PPT Presentation

Citation preview

Page 1: From DB to METS

METS Opening Day – October 27-28, 2003

1

From DB to METS

Eric StedfeldNew York University

Page 2: From DB to METS

METS Opening Day – October 27-28, 2003

2

Goals

Simple database structure for the most common METS needs Simple interface to take user input, generate METS and return resultsXML processing to convert and display selected material in a web environmentFuture extensions for more complicated media types and metadata

Page 3: From DB to METS

METS Opening Day – October 27-28, 2003

3

Tools

MySQL database to store structural, descriptive and image technical metadataPerl to take user input, query database, build METS file and return Web “success” pageXT to transform METS XML to HTML using XSLTTomcat to call XT servlet and display HTML to user

Page 4: From DB to METS

METS Opening Day – October 27-28, 2003

4

Web Interface – Generate METS

Page 5: From DB to METS

METS Opening Day – October 27-28, 2003

5

Web Interface – Success

Page 6: From DB to METS

METS Opening Day – October 27-28, 2003

6

Web Interface – Return Results

Page 7: From DB to METS

METS Opening Day – October 27-28, 2003

7

Web Interface – Select Page

Page 8: From DB to METS

METS Opening Day – October 27-28, 2003

8

Web Interface – View Closeup

Page 9: From DB to METS

METS Opening Day – October 27-28, 2003

9

Database Schema – ZeroDB

Page 10: From DB to METS

METS Opening Day – October 27-28, 2003

10

Database Schema – Center

Page 11: From DB to METS

METS Opening Day – October 27-28, 2003

11

Database Schema – Center

Page 12: From DB to METS

METS Opening Day – October 27-28, 2003

12

Database Schema – Object Tree

Page 13: From DB to METS

METS Opening Day – October 27-28, 2003

13

Database Schema – Subject

Page 14: From DB to METS

METS Opening Day – October 27-28, 2003

14

Database Schema – Name

Page 15: From DB to METS

METS Opening Day – October 27-28, 2003

15

Database Schema – Phys. Object

Page 16: From DB to METS

METS Opening Day – October 27-28, 2003

16

Database Schema – Media

Page 17: From DB to METS

METS Opening Day – October 27-28, 2003

17

use DBI;...

# Set query, path and database variables

&print_head; # Start "Success" HTML page

$dbh = DBI->connect("DBI:mysql:$database", $dbuser, $dbpass);

&do_one;$dbh->disconnect;

&return_to_browser;&print_footer; # Finish "Success" HTML page

App Code – Main Routine

Page 18: From DB to METS

METS Opening Day – October 27-28, 2003

18

sub &do_one {

$objectTreeID = $fetchme;

# Set up file and path variables using $objectTreeID

&get_children; # create array of objectIDs

open (OUTFILE, ">$path");&print_xml;close (OUTFILE);

}

App Code – Do One

Page 19: From DB to METS

METS Opening Day – October 27-28, 2003

19

sub &get_children {

$SQLstmt = "SELECT o.objectTreeID, o.parentIDFROM objectTree AS o WHERE o.parentID = $objectTreeIDORDER BY o.objectTreeID";

$sth = $dbh->prepare($SQLstmt);$sth->execute;

while (@row = $sth->fetchrow_array){$childID = $row[0];@children = $childID;

}

$sth->finish;}

App Code – Get Children

Page 20: From DB to METS

METS Opening Day – October 27-28, 2003

20

sub &print_xml {print OUTFILE<<EOF;# XML header hereEOF

# SQL to fetch METS header info&print_METSHeader;

&print_dmdSecDM;&print_amdSec;&print_fileSec;&print_structMap;

print OUTFILE<<EOF;# METS close file stuff hereEOF}

App Code – Print XML

Page 21: From DB to METS

METS Opening Day – October 27-28, 2003

21

XML – Descriptive Metadata

Page 22: From DB to METS

METS Opening Day – October 27-28, 2003

22

XML – Technical Metadata

Page 23: From DB to METS

METS Opening Day – October 27-28, 2003

23

XML – File Section

Page 24: From DB to METS

METS Opening Day – October 27-28, 2003

24

XML – Structural Map

Page 25: From DB to METS

METS Opening Day – October 27-28, 2003

25

Web Interface – Select Page

Page 26: From DB to METS

METS Opening Day – October 27-28, 2003

26

Issues

Database capability vs. METS flexibilityNormalized vs. efficient database schemaGeneral vs. specialized approach for many METS typesHard areas such as rights metadataData synchronization Consistency across institution(s)

Page 27: From DB to METS

METS Opening Day – October 27-28, 2003

27

Future

“Meta-programming” – programs to create programs, database schemata and stylesheetsConsistent utilization and implementation of ProfilesDown-streaming more of the work – less specialized skill sets required, less “boutique-y”

Page 28: From DB to METS

METS Opening Day – October 27-28, 2003

28

From DB to METS

Eric StedfeldNew York University