#
# Note that the DBI is in passthrough mode. Most DBD's allow you to pass
# anything to the database, including CREATE TABLE statements and any
# non-standard SQL YFD uses.
#
use DBI;
$dbh = DBI->connect('DBI:Pg:dbname=local_medline', 'dewey', '') or die "Unable to connect to database: $DBI::errstr\n";
$dbh->do(qq{
-- CREATE DATABASE LOCAL_MEDLINE
-- SQL for creation of a table to hold reference info from MEDLINE
CREATE TABLE refs (
pubmed_id integer NOT NULL PRIMARY KEY, -- UI
authors varchar(200), -- AU
title varchar(200), -- TI
keywords varchar(100), -- MH
citation varchar(50), -- SO
address varchar(100), -- AD
abstract varchar(1000), -- AB
comments varchar(100), -- CM
num_refs varchar(50), -- RF
pub_date date, -- DP
notes varchar(1000) -- local comments
);
}) || die "Error with table creation: $DBI::errstr\n";
syntax highlighted by Code2HTML, v. 0.8.11