Beginning of marc stuff :
* in marc directory, the marcschema.sql contains now the new marc structure. The old one is in marcschema.old.sql. * in marc directory, the fill_usmarc.pl script fills the structure tables with USMARC format in english. Thanks to steve for the BIG work getting them from LOC... It's still to do for UNIMARC in english, and of course in french for me ;-) * in admin directory, the marctagstructure.pl script helps playing with the structure and modifying it... It's not ended (tomorrow, i hope it will be)
This commit is contained in:
parent
8a0aa32e8e
commit
0af09bc098
4 changed files with 10757 additions and 519 deletions
230
admin/marctagstructure.pl
Executable file
230
admin/marctagstructure.pl
Executable file
|
@ -0,0 +1,230 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use C4::Output;
|
||||
use CGI;
|
||||
use C4::Search;
|
||||
use C4::Database;
|
||||
|
||||
sub StringSearch {
|
||||
my ($env,$searchstring,$type)=@_;
|
||||
my $dbh = &C4Connect;
|
||||
$searchstring=~ s/\'/\\\'/g;
|
||||
my @data=split(' ',$searchstring);
|
||||
my $count=@data;
|
||||
my $query="Select tagfield,liblibrarian,libopac,repeatable,mandatory from marc_tag_structure where (tagfield like \"$data[0]%\") order by tagfield";
|
||||
my $sth=$dbh->prepare($query);
|
||||
$sth->execute;
|
||||
my @results;
|
||||
my $cnt=0;
|
||||
while (my $data=$sth->fetchrow_hashref){
|
||||
push(@results,$data);
|
||||
$cnt ++;
|
||||
}
|
||||
# $sth->execute;
|
||||
$sth->finish;
|
||||
$dbh->disconnect;
|
||||
return ($cnt,\@results);
|
||||
}
|
||||
|
||||
my $input = new CGI;
|
||||
my $searchfield=$input->param('searchfield');
|
||||
my $pkfield="tagfield";
|
||||
my $reqsel="select tagfield,liblibrarian,libopac,repeatable,mandatory from marc_tag_structure where $pkfield='$searchfield'";
|
||||
my $reqdel="delete from marc_tag_structure where $pkfield='$searchfield'";
|
||||
my $offset=$input->param('offset');
|
||||
my $script_name="/cgi-bin/koha/admin/marctagstructure.pl";
|
||||
|
||||
my $pagesize=20;
|
||||
my $op = $input->param('op');
|
||||
$searchfield=~ s/\,//g;
|
||||
print $input->header;
|
||||
|
||||
#start the page and read in includes
|
||||
print startpage();
|
||||
print startmenu('admin');
|
||||
|
||||
################## ADD_FORM ##################################
|
||||
# called by default. Used to create form to add or modify a record
|
||||
if ($op eq 'add_form') {
|
||||
#---- if primkey exists, it's a modify action, so read values to modify...
|
||||
my $data;
|
||||
if ($searchfield) {
|
||||
my $dbh = &C4Connect;
|
||||
my $sth=$dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory from marc_tag_structure where $pkfield='$searchfield'");
|
||||
$sth->execute;
|
||||
$data=$sth->fetchrow_hashref;
|
||||
$sth->finish;
|
||||
}
|
||||
print <<printend
|
||||
<script>
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
function isNotNull(f,noalert) {
|
||||
if (f.value.length ==0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
function toUC(f) {
|
||||
var x=f.value.toUpperCase();
|
||||
f.value=x;
|
||||
return true;
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
function isNum(v,maybenull) {
|
||||
var n = new Number(v.value);
|
||||
if (isNaN(n)) {
|
||||
return false;
|
||||
}
|
||||
if (maybenull==0 && v.value=='') {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
function isDate(f) {
|
||||
var t = Date.parse(f.value);
|
||||
if (isNaN(t)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
function Check(f) {
|
||||
var ok=1;
|
||||
var _alertString="";
|
||||
var alertString2;
|
||||
if (f.tagfield.value.length==0) {
|
||||
_alertString += "- tagfield missing\\n";
|
||||
}
|
||||
if (f.repeatable.value!=0 && f.repeatable.value!=1) {
|
||||
_alertString += "- repeatable must be 0 or 1\\n";
|
||||
}
|
||||
if (f.mandatory.value!=0 && f.mandatory.value!=1) {
|
||||
_alertString += "- mandatory must be 0 or 1\\n";
|
||||
}
|
||||
if (_alertString.length==0) {
|
||||
document.Aform.submit();
|
||||
} else {
|
||||
alertString2 = "Form not submitted because of the following problem(s)\\n";
|
||||
alertString2 += "------------------------------------------------------------------------------------\\n\\n";
|
||||
alertString2 += _alertString;
|
||||
alert(alertString2);
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
printend
|
||||
;#/
|
||||
if ($searchfield) {
|
||||
print "<h1>Modify tag</h1>";
|
||||
} else {
|
||||
print "<h1>Add tag</h1>";
|
||||
}
|
||||
print "<form action='$script_name' name=Aform method=post>";
|
||||
print "<input type=hidden name=op value='add_validate'>";
|
||||
print "<table>";
|
||||
if ($searchfield) {
|
||||
print "<tr><td>Tag</td><td><input type=hidden name=tagfield value='$searchfield'>$searchfield</td></tr>";
|
||||
} else {
|
||||
print "<tr><td>Tag</td><td><input type=text name=tagfield size=5 maxlength=3></td></tr>";
|
||||
}
|
||||
print "<tr><td>Value</td><td><input type=text name=liblibrarian size=80 maxlength=255 value='$data->{'liblibrarian'}'></td></tr>";
|
||||
print "<tr><td>Value</td><td><input type=text name=libopac size=80 maxlength=255 value='$data->{'libopac'}'></td></tr>";
|
||||
print "<tr><td>Value</td><td><input type=text name=repeatable value='$data->{'repeatable'}'></td></tr>";
|
||||
print "<tr><td>Value</td><td><input type=text name=mandatory value='$data->{'mandatory'}'></td></tr>";
|
||||
print "<tr><td> </td><td><INPUT type=button value='OK' onClick='Check(this.form)'></td></tr>";
|
||||
print "</table>";
|
||||
print "</form>";
|
||||
;
|
||||
# END $OP eq ADD_FORM
|
||||
################## ADD_VALIDATE ##################################
|
||||
# called by add_form, used to insert/modify data in DB
|
||||
} elsif ($op eq 'add_validate') {
|
||||
my $dbh=C4Connect;
|
||||
my $query = "replace marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory) values (";
|
||||
$query.= $dbh->quote($input->param('tagfield')).",";
|
||||
$query.= $dbh->quote($input->param('liblibrarian')).",";
|
||||
$query.= $dbh->quote($input->param('libopac')).",";
|
||||
$query.= $dbh->quote($input->param('repeatable')).",";
|
||||
$query.= $dbh->quote($input->param('mandatory')).")";
|
||||
my $sth=$dbh->prepare($query);
|
||||
$sth->execute;
|
||||
$sth->finish;
|
||||
print "data recorded";
|
||||
print "<form action='$script_name' method=post>";
|
||||
print "<input type=submit value=OK>";
|
||||
print "</form>";
|
||||
# END $OP eq ADD_VALIDATE
|
||||
################## DELETE_CONFIRM ##################################
|
||||
# called by default form, used to confirm deletion of data in DB
|
||||
} elsif ($op eq 'delete_confirm') {
|
||||
my $dbh = &C4Connect;
|
||||
my $sth=$dbh->prepare($reqsel);
|
||||
$sth->execute;
|
||||
my $data=$sth->fetchrow_hashref;
|
||||
$sth->finish;
|
||||
print mktablehdr;
|
||||
print mktablerow(2,'#99cc33',bold('Tag'),bold("$searchfield"),'/images/background-mem.gif');
|
||||
print "<tr><td>liblibrarian</td><td>$data->{'liblibrarian'}</td></tr>";
|
||||
print "<form action='$script_name' method=post><input type=hidden name=op value=delete_confirmed><input type=hidden name=searchfield value='$searchfield'>";
|
||||
print "<tr><td colspan=2 align=center>CONFIRM DELETION</td></tr>";
|
||||
print "<tr><td><INPUT type=submit value='YES'></form></td><td><form action='$script_name' method=post><input type=submit value=NO></form></td></tr>";
|
||||
# END $OP eq DELETE_CONFIRM
|
||||
################## DELETE_CONFIRMED ##################################
|
||||
# called by delete_confirm, used to effectively confirm deletion of data in DB
|
||||
} elsif ($op eq 'delete_confirmed') {
|
||||
my $dbh=C4Connect;
|
||||
# my $searchfield=$input->param('branchcode');
|
||||
my $sth=$dbh->prepare($reqdel);
|
||||
$sth->execute;
|
||||
$sth->finish;
|
||||
print "data deleted";
|
||||
print "<form action='$script_name' method=post>";
|
||||
print "<input type=submit value=OK>";
|
||||
print "</form>";
|
||||
# END $OP eq DELETE_CONFIRMED
|
||||
################## DEFAULT ##################################
|
||||
} else { # DEFAULT
|
||||
my @inputs=(["text","searchfield",$searchfield],
|
||||
["reset","reset","clr"]);
|
||||
print mkheadr(2,'System preferences admin');
|
||||
print mkformnotable("$script_name",@inputs);
|
||||
print <<printend
|
||||
printend
|
||||
;
|
||||
if ($searchfield ne '') {
|
||||
print "You Searched for <b>$searchfield<b><p>";
|
||||
}
|
||||
print mktablehdr;
|
||||
print mktablerow(5,'#99cc33',bold('Tag'),bold('Value'),
|
||||
' ',' ',' ','/images/background-mem.gif');
|
||||
my $env;
|
||||
my ($count,$results)=StringSearch($env,$searchfield,'web');
|
||||
my $toggle="white";
|
||||
for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
|
||||
if ($toggle eq 'white'){
|
||||
$toggle="#ffffcc";
|
||||
} else {
|
||||
$toggle="white";
|
||||
}
|
||||
print mktablerow(5,$toggle,$results->[$i]{'tagfield'},$results->[$i]{'liblibrarian'},mklink('','subfields_not_done'),
|
||||
mklink("$script_name?op=add_form&searchfield=".$results->[$i]{'tagfield'},'Edit'),
|
||||
mklink("$script_name?op=delete_confirm&searchfield=".$results->[$i]{'tagfield'},'Delete',''));
|
||||
}
|
||||
print mktableft;
|
||||
print "<form action='$script_name' method=post>";
|
||||
print "<input type=hidden name=op value=add_form>";
|
||||
if ($offset>0) {
|
||||
my $prevpage = $offset-$pagesize;
|
||||
print mklink("$script_name?offset=".$prevpage,'<< Prev');
|
||||
}
|
||||
print " ";
|
||||
if ($offset+$pagesize<$count) {
|
||||
my $nextpage =$offset+$pagesize;
|
||||
print mklink("$script_name?offset=".$nextpage,'Next >>');
|
||||
}
|
||||
print "<br><input type=image src=\"/images/button-add-variable.gif\" WIDTH=188 HEIGHT=44 ALT=\"Add budget\" BORDER=0 ></a><br>";
|
||||
print "</form>";
|
||||
} #---- END $OP eq DEFAULT
|
||||
print endmenu('admin');
|
||||
print endpage();
|
9847
marc/fill_usmarc.pl
Executable file
9847
marc/fill_usmarc.pl
Executable file
File diff suppressed because it is too large
Load diff
538
marc/marcschema.old.sql
Normal file
538
marc/marcschema.old.sql
Normal file
|
@ -0,0 +1,538 @@
|
|||
create table Resource_Table (Resource_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Date_Added TIMESTAMP, Date_Modified TIMESTAMP, Record_ID INT UNSIGNED NOT NULL,
|
||||
Statement_ID INT UNSIGNED, Scope_ID INT UNSIGNED,
|
||||
Container_ID INT UNSIGNED,
|
||||
primary key(Resource_ID),
|
||||
key(Record_ID));
|
||||
|
||||
create table Schema_Table (Schema_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Date_Added TIMESTAMP, Date_Modified TIMESTAMP,
|
||||
Schema_URI CHAR(255) NOT NULL,
|
||||
Object_ID INT UNSIGNED NOT NULL,
|
||||
KEY ID_Index(Object_ID),
|
||||
KEY Schema_Index (Schema_URI(255)),
|
||||
primary key(Schema_ID));
|
||||
|
||||
create table Statement_Table (
|
||||
Statement_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Date_Added TIMESTAMP,
|
||||
Date_Modified TIMESTAMP,
|
||||
Statement_ID INT UNSIGNED NOT NULL,
|
||||
Subject CHAR(255) NOT NULL,
|
||||
Predicate CHAR(255) NOT NULL,
|
||||
Object CHAR(255) NOT NULL,
|
||||
Object_ID INT UNSIGNED,
|
||||
Schema_ID INT UNSIGNED,
|
||||
Statement_Type INT UNSIGNED,
|
||||
KEY ID_Index (Statement_ID),
|
||||
KEY Subject_Index (Subject(255)),
|
||||
KEY Pred_Index (Predicate(255)),
|
||||
KEY Object_Index (Object(255)),
|
||||
primary key(Statement_Key));
|
||||
|
||||
create table Scope_Table (
|
||||
Scope_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Date_Added TIMESTAMP, Date_Modified TIMESTAMP,
|
||||
Operator_ID INT UNSIGNED,
|
||||
Location_ID INT UNSIGNED,
|
||||
Resource_Type_ID ENUM('B','N'),
|
||||
primary key(Scope_ID));
|
||||
|
||||
create table Bib_Table (Bib_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Record_ID INT UNSIGNED NOT NULL,
|
||||
Date_Added TIMESTAMP, Date_Modified TIMESTAMP, Control_ID INT UNSIGNED NOT NULL,
|
||||
Tag_0XX_ID INT UNSIGNED NOT NULL, Tag_1XX_ID INT UNSIGNED NOT NULL, Tag_2XX_ID INT
|
||||
UNSIGNED NOT NULL, Tag_3XX_ID INT UNSIGNED NOT NULL, Tag_4XX_ID INT UNSIGNED NOT NULL, Tag_5XX_ID
|
||||
INT UNSIGNED NOT NULL, Tag_6XX_ID INT UNSIGNED NOT NULL, Tag_7XX_ID INT UNSIGNED NOT NULL,
|
||||
Tag_8XX_ID INT UNSIGNED NOT NULL, Tag_9XX_ID INT UNSIGNED NOT NULL, Storage_ID INT
|
||||
UNSIGNED NOT NULL, Holdings_ID INT UNSIGNED NOT NULL,
|
||||
KEY ID_Index(Record_ID), primary key(Bib_ID),
|
||||
key (TAG_0XX_ID), key (TAG_1XX_ID), key (TAG_2XX_ID), key (TAG_3XX_ID), key (TAG_4XX_ID), key (TAG_5XX_ID), key (TAG_6XX_ID), key (TAG_7XX_ID), key (TAG_8XX_ID), key (TAG_9XX_ID), key (Storage_ID), key (Holdings_ID));
|
||||
|
||||
create table 0XX_Tag_Table (Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL, Subfield_ID INT UNSIGNED NOT NULL, Authority_ID INT UNSIGNED,
|
||||
Link_Flag ENUM('Y','N','B'), Storage_ID INT UNSIGNED NOT NULL,
|
||||
KEY ID_Index(Tag_ID),
|
||||
key (Subfield_ID),
|
||||
key (Storage_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table 0XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table 1XX_Tag_Table (Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL, Subfield_ID INT UNSIGNED NOT NULL, Authority_ID INT UNSIGNED,
|
||||
Link_Flag ENUM('Y','N','B'), Storage_ID INT UNSIGNED NOT NULL,
|
||||
KEY ID_Index(Tag_ID),
|
||||
key (Subfield_ID), key (Storage_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table 1XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table 2XX_Tag_Table (Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL, Subfield_ID INT UNSIGNED, Authority_ID INT UNSIGNED,
|
||||
Link_Flag ENUM('Y','N','B'), Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table 2XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table 3XX_Tag_Table (Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL, Subfield_ID INT UNSIGNED, Authority_ID INT UNSIGNED,
|
||||
Link_Flag ENUM('Y','N','B'), Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table 3XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table 4XX_Tag_Table (Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL, Subfield_ID INT UNSIGNED, Authority_ID INT UNSIGNED,
|
||||
Link_Flag ENUM('Y','N','B'), Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table 4XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table 5XX_Tag_Table (Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL, Subfield_ID INT UNSIGNED, Authority_ID INT UNSIGNED,
|
||||
Link_Flag ENUM('Y','N','B'), Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table 5XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table 6XX_Tag_Table (Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL, Subfield_ID INT UNSIGNED, Authority_ID INT UNSIGNED,
|
||||
Link_Flag ENUM('Y','N','B'), Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table 6XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table 7XX_Tag_Table (Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL, Subfield_ID INT UNSIGNED, Authority_ID INT UNSIGNED,
|
||||
Link_Flag ENUM('Y','N','B'), Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table 7XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table 8XX_Tag_Table (Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL, Subfield_ID INT UNSIGNED, Authority_ID INT UNSIGNED,
|
||||
Link_Flag ENUM('Y','N','B'), Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table 8XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table 9XX_Tag_Table (Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL, Subfield_ID INT UNSIGNED, Authority_ID INT UNSIGNED,
|
||||
Link_Flag ENUM('Y','N','B'), Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table 9XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Control_Table
|
||||
(Control_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Record_Status CHAR(1) NOT NULL,
|
||||
Record_Type CHAR(1) NOT NULL,
|
||||
Encoding_Level CHAR(1) NOT NULL,
|
||||
Des_Cat_Form CHAR(1) NOT NULL,
|
||||
Type_Date CHAR(1) NOT NULL,
|
||||
Beg_Pub_Date CHAR(4) NOT NULL,
|
||||
End_Pub_Date CHAR(4) NOT NULL,
|
||||
Pub_Place CHAR(3) NOT NULL,
|
||||
Ill_Code CHAR(4) NOT NULL,
|
||||
Target_Aud CHAR(1) NOT NULL,
|
||||
Item_Form CHAR(1) NOT NULL,
|
||||
Cont_Nature CHAR(4) NOT NULL,
|
||||
Gov_Code CHAR(1) NOT NULL,
|
||||
Conf_Code CHAR(1) NOT NULL,
|
||||
Festschrift CHAR(1) NOT NULL,
|
||||
Own_Index CHAR(1) NOT NULL,
|
||||
Fiction CHAR(1) NOT NULL,
|
||||
Biography CHAR(1) NOT NULL,
|
||||
Lan_Code CHAR(3) NOT NULL,
|
||||
Storage_ID INT UNSIGNED,
|
||||
primary key (Control_ID));
|
||||
|
||||
create table Auth_Table
|
||||
(Auth_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Auth_Control_ID INT UNSIGNED NOT NULL, Date_Added TIMESTAMP,
|
||||
Date_Modified TIMESTAMP,
|
||||
Auth_1XX_ID INT UNSIGNED, Auth_260_ID INT UNSIGNED, Auth_360_ID INT UNSIGNED,
|
||||
Auth_4XX_ID INT UNSIGNED, Auth_663_ID INT UNSIGNED, Auth_664_ID INT UNSIGNED,
|
||||
Auth_665_ID INT UNSIGNED, Auth_667_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Auth_Control_ID),
|
||||
primary key(Auth_ID));
|
||||
|
||||
create table Auth_1XX_Tag_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT, Tag_ID INT UNSIGNED NOT NULL ,
|
||||
Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Auth_1XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Auth_260_Tag_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT, Tag_ID INT UNSIGNED NOT NULL,
|
||||
Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Auth_260_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Auth_360_Tag_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT, Tag_ID INT UNSIGNED NOT NULL,
|
||||
Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Auth_360_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Auth_4XX_Tag_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT, Tag_ID INT UNSIGNED NOT NULL,
|
||||
Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index(Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Auth_4XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index(Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Auth_663_Tag_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT, Tag_ID INT UNSIGNED NOT NULL,
|
||||
Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Auth_663_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Auth_664_Tag_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT, Tag_ID INT UNSIGNED NOT NULL,
|
||||
Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Auth_664_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Auth_665_Tag_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT, Tag_ID INT UNSIGNED NOT NULL,
|
||||
Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Auth_665_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Auth_667_Tag_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT, Tag_ID INT UNSIGNED NOT NULL,
|
||||
Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Auth_667_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Auth_Link_Table
|
||||
(Link_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Date_Added TIMESTAMP, Date_Modified TIMESTAMP,
|
||||
Auth_ID INT UNSIGNED, Record_ID INT UNSIGNED,
|
||||
Link_Type ENUM('a','b','c','d','e','f','g'),
|
||||
Tag_ID INT UNSIGNED, Tag CHAR(3) NOT NULL,
|
||||
KEY Tag_Index (Tag(3)), primary key (Link_ID));
|
||||
|
||||
create table Auth_Control_Table
|
||||
(Auth_Cont_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Record_Status CHAR(1) NOT NULL,
|
||||
Record_Type CHAR(1) NOT NULL,
|
||||
Geo_Sub_Code CHAR(1) NOT NULL,
|
||||
Record_Kind CHAR(1) NOT NULL,
|
||||
Main_or_Added CHAR(1) NOT NULL,
|
||||
Subj_Added CHAR(1) NOT NULL,
|
||||
Ser_Added CHAR(1) NOT NULL,
|
||||
Storage_ID INT UNSIGNED,
|
||||
primary key (Auth_Cont_ID));
|
||||
|
||||
create table Holdings_Table
|
||||
(Hold_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Hold_Control_ID INT UNSIGNED NOT NULL, Date_Added TIMESTAMP,
|
||||
Date_Modified TIMESTAMP,
|
||||
Notes_Tag_ID INT UNSIGNED, Hold_852_ID INT UNSIGNED, Caps_Pat_ID INT UNSIGNED,
|
||||
Enum_Chron_ID INT UNSIGNED, Text_Hold_ID INT UNSIGNED,
|
||||
Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Hold_Control_ID),
|
||||
primary key(Hold_ID));
|
||||
|
||||
create table Hold_Notes_Tag_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL, Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Hold_Notes_Tag_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Hold_852_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL, Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Hold_852_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Hold_Caps_Pat_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL, Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Hold_Caps_Pat_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Hold_Enum_Chron_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL, Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Hold_Enum_Chron_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Hold_Text_Hold_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL, Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Hold_Text_Hold_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Hold_Control_Table
|
||||
(Hold_Cont_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Record_Status CHAR(1) NOT NULL,
|
||||
Record_Type CHAR(1) NOT NULL,
|
||||
Meth_Acq CHAR(1) NOT NULL,
|
||||
Cancel_Date CHAR(4) NOT NULL,
|
||||
Gen_Retention CHAR(1) NOT NULL,
|
||||
Spe_Retention CHAR(3) NOT NULL,
|
||||
Cmplt CHAR(4) NOT NULL,
|
||||
Lend_Pol CHAR(1) NOT NULL,
|
||||
Re_Pol CHAR(1) NOT NULL,
|
||||
Lan_Code CHAR(3) NOT NULL,
|
||||
Storage_ID INT UNSIGNED,
|
||||
primary key(Hold_Cont_ID));
|
||||
|
||||
create table Storage_Table
|
||||
(Storage_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Storage_ID INT UNSIGNED NOT NULL, Blob_ID INT UNSIGNED, Text_ID INT UNSIGNED,
|
||||
Med_Blob_ID INT UNSIGNED, Med_Text_ID INT UNSIGNED, Long_Blob_ID INT UNSIGNED,
|
||||
Long_Text_ID INT UNSIGNED, URI CHAR(255),
|
||||
Storage_Type ENUM('B','MB','LB','U'),
|
||||
KEY ID_Index (Storage_ID),
|
||||
primary key(Storage_Key));
|
||||
|
||||
create table Blob_Table
|
||||
(Blob_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Blob_ID INT UNSIGNED NOT NULL, Blob_Data BLOB,
|
||||
Seq_No INT UNSIGNED,
|
||||
KEY ID_Index (Blob_ID),
|
||||
primary key(Blob_Key));
|
||||
|
||||
create table Med_Blob_Table
|
||||
(Med_Blob_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Med_Blob_ID INT UNSIGNED NOT NULL, Blob_Data MEDIUMBLOB,
|
||||
Seq_No INT UNSIGNED,
|
||||
KEY ID_Index (Med_Blob_ID),
|
||||
primary key(Med_Blob_Key));
|
||||
|
||||
create table Long_Blob_Table
|
||||
(Long_Blob_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Long_Blob_ID INT UNSIGNED NOT NULL, Long_Blob_Data LONGBLOB,
|
||||
Seq_No INT UNSIGNED,
|
||||
KEY ID_Index (Long_Blob_ID),
|
||||
primary key(Long_Blob_Key));
|
|
@ -1,538 +1,161 @@
|
|||
create table Resource_Table (Resource_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Date_Added TIMESTAMP, Date_Modified TIMESTAMP, Record_ID INT UNSIGNED NOT NULL,
|
||||
Statement_ID INT UNSIGNED, Scope_ID INT UNSIGNED,
|
||||
Container_ID INT UNSIGNED,
|
||||
primary key(Resource_ID),
|
||||
key(Record_ID));
|
||||
# marc_biblio contains 1 record for each biblio in the DB
|
||||
CREATE TABLE marc_biblio (
|
||||
bibcode bigint(20) unsigned NOT NULL auto_increment,
|
||||
datecreated date NOT NULL default '0000-00-00',
|
||||
datemodified date default NULL,
|
||||
origincode char(20) default NULL,
|
||||
PRIMARY KEY (bibcode),
|
||||
KEY origincode (origincode)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
create table Schema_Table (Schema_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Date_Added TIMESTAMP, Date_Modified TIMESTAMP,
|
||||
Schema_URI CHAR(255) NOT NULL,
|
||||
Object_ID INT UNSIGNED NOT NULL,
|
||||
KEY ID_Index(Object_ID),
|
||||
KEY Schema_Index (Schema_URI(255)),
|
||||
primary key(Schema_ID));
|
||||
|
||||
create table Statement_Table (
|
||||
Statement_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Date_Added TIMESTAMP,
|
||||
Date_Modified TIMESTAMP,
|
||||
Statement_ID INT UNSIGNED NOT NULL,
|
||||
Subject CHAR(255) NOT NULL,
|
||||
Predicate CHAR(255) NOT NULL,
|
||||
Object CHAR(255) NOT NULL,
|
||||
Object_ID INT UNSIGNED,
|
||||
Schema_ID INT UNSIGNED,
|
||||
Statement_Type INT UNSIGNED,
|
||||
KEY ID_Index (Statement_ID),
|
||||
KEY Subject_Index (Subject(255)),
|
||||
KEY Pred_Index (Predicate(255)),
|
||||
KEY Object_Index (Object(255)),
|
||||
primary key(Statement_Key));
|
||||
# marc NXX_table contains 1 record for each tag of every biblio
|
||||
# if the tag is more than 255 length, the value is in the marc_blob_tag table,
|
||||
# the valuebloblink contains the number of the blob
|
||||
CREATE TABLE marc_0XX_tag_table (
|
||||
bibcode bigint(20) NOT NULL default '0',
|
||||
tagnumber char(3) NOT NULL default '',
|
||||
tagorder tinyint(4) NOT NULL default '0',
|
||||
indicator char(2) NOT NULL default '',
|
||||
tagvalue varchar(255) default NULL,
|
||||
valuebloblink bigint(20) default NULL,
|
||||
PRIMARY KEY (bibcode,tagnumber,tagorder)
|
||||
) TYPE=MyISAM;
|
||||
CREATE TABLE marc_1XX_tag_table (
|
||||
bibcode bigint(20) NOT NULL default '0',
|
||||
tagnumber char(3) NOT NULL default '',
|
||||
tagorder tinyint(4) NOT NULL default '0',
|
||||
indicator char(2) NOT NULL default '',
|
||||
tagvalue varchar(255) default NULL,
|
||||
valuebloblink bigint(20) default NULL,
|
||||
PRIMARY KEY (bibcode,tagnumber,tagorder)
|
||||
) TYPE=MyISAM;
|
||||
CREATE TABLE marc_2XX_tag_table (
|
||||
bibcode bigint(20) NOT NULL default '0',
|
||||
tagnumber char(3) NOT NULL default '',
|
||||
tagorder tinyint(4) NOT NULL default '0',
|
||||
indicator char(2) NOT NULL default '',
|
||||
tagvalue varchar(255) default NULL,
|
||||
valuebloblink bigint(20) default NULL,
|
||||
PRIMARY KEY (bibcode,tagnumber,tagorder)
|
||||
) TYPE=MyISAM;
|
||||
CREATE TABLE marc_3XX_tag_table (
|
||||
bibcode bigint(20) NOT NULL default '0',
|
||||
tagnumber char(3) NOT NULL default '',
|
||||
tagorder tinyint(4) NOT NULL default '0',
|
||||
indicator char(2) NOT NULL default '',
|
||||
tagvalue varchar(255) default NULL,
|
||||
valuebloblink bigint(20) default NULL,
|
||||
PRIMARY KEY (bibcode,tagnumber,tagorder)
|
||||
) TYPE=MyISAM;
|
||||
CREATE TABLE marc_4XX_tag_table (
|
||||
bibcode bigint(20) NOT NULL default '0',
|
||||
tagnumber char(3) NOT NULL default '',
|
||||
tagorder tinyint(4) NOT NULL default '0',
|
||||
indicator char(2) NOT NULL default '',
|
||||
tagvalue varchar(255) default NULL,
|
||||
valuebloblink bigint(20) default NULL,
|
||||
PRIMARY KEY (bibcode,tagnumber,tagorder)
|
||||
) TYPE=MyISAM;
|
||||
CREATE TABLE marc_5XX_tag_table (
|
||||
bibcode bigint(20) NOT NULL default '0',
|
||||
tagnumber char(3) NOT NULL default '',
|
||||
tagorder tinyint(4) NOT NULL default '0',
|
||||
indicator char(2) NOT NULL default '',
|
||||
tagvalue varchar(255) default NULL,
|
||||
valuebloblink bigint(20) default NULL,
|
||||
PRIMARY KEY (bibcode,tagnumber,tagorder)
|
||||
) TYPE=MyISAM;
|
||||
CREATE TABLE marc_6XX_tag_table (
|
||||
bibcode bigint(20) NOT NULL default '0',
|
||||
tagnumber char(3) NOT NULL default '',
|
||||
tagorder tinyint(4) NOT NULL default '0',
|
||||
indicator char(2) NOT NULL default '',
|
||||
tagvalue varchar(255) default NULL,
|
||||
valuebloblink bigint(20) default NULL,
|
||||
PRIMARY KEY (bibcode,tagnumber,tagorder)
|
||||
) TYPE=MyISAM;
|
||||
CREATE TABLE marc_7XX_tag_table (
|
||||
bibcode bigint(20) NOT NULL default '0',
|
||||
tagnumber char(3) NOT NULL default '',
|
||||
tagorder tinyint(4) NOT NULL default '0',
|
||||
indicator char(2) NOT NULL default '',
|
||||
tagvalue varchar(255) default NULL,
|
||||
valuebloblink bigint(20) default NULL,
|
||||
PRIMARY KEY (bibcode,tagnumber,tagorder)
|
||||
) TYPE=MyISAM;
|
||||
CREATE TABLE marc_8XX_tag_table (
|
||||
bibcode bigint(20) NOT NULL default '0',
|
||||
tagnumber char(3) NOT NULL default '',
|
||||
tagorder tinyint(4) NOT NULL default '0',
|
||||
indicator char(2) NOT NULL default '',
|
||||
tagvalue varchar(255) default NULL,
|
||||
valuebloblink bigint(20) default NULL,
|
||||
PRIMARY KEY (bibcode,tagnumber,tagorder)
|
||||
) TYPE=MyISAM;
|
||||
CREATE TABLE marc_9XX_tag_table (
|
||||
bibcode bigint(20) NOT NULL default '0',
|
||||
tagnumber char(3) NOT NULL default '',
|
||||
tagorder tinyint(4) NOT NULL default '0',
|
||||
indicator char(2) NOT NULL default '',
|
||||
tagvalue varchar(255) default NULL,
|
||||
valuebloblink bigint(20) default NULL,
|
||||
PRIMARY KEY (bibcode,tagnumber,tagorder)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
create table Scope_Table (
|
||||
Scope_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Date_Added TIMESTAMP, Date_Modified TIMESTAMP,
|
||||
Operator_ID INT UNSIGNED,
|
||||
Location_ID INT UNSIGNED,
|
||||
Resource_Type_ID ENUM('B','N'),
|
||||
primary key(Scope_ID));
|
||||
# marc_blob_tag containts tag longer than 255 car.
|
||||
# They are linked to a marc_NXX_tag_table record by bloblink
|
||||
CREATE TABLE marc_blob_tag (
|
||||
blobidlink bigint(20) NOT NULL auto_increment,
|
||||
tagvalue longtext NOT NULL,
|
||||
PRIMARY KEY (blobidlink)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
create table Bib_Table (Bib_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Record_ID INT UNSIGNED NOT NULL,
|
||||
Date_Added TIMESTAMP, Date_Modified TIMESTAMP, Control_ID INT UNSIGNED NOT NULL,
|
||||
Tag_0XX_ID INT UNSIGNED NOT NULL, Tag_1XX_ID INT UNSIGNED NOT NULL, Tag_2XX_ID INT
|
||||
UNSIGNED NOT NULL, Tag_3XX_ID INT UNSIGNED NOT NULL, Tag_4XX_ID INT UNSIGNED NOT NULL, Tag_5XX_ID
|
||||
INT UNSIGNED NOT NULL, Tag_6XX_ID INT UNSIGNED NOT NULL, Tag_7XX_ID INT UNSIGNED NOT NULL,
|
||||
Tag_8XX_ID INT UNSIGNED NOT NULL, Tag_9XX_ID INT UNSIGNED NOT NULL, Storage_ID INT
|
||||
UNSIGNED NOT NULL, Holdings_ID INT UNSIGNED NOT NULL,
|
||||
KEY ID_Index(Record_ID), primary key(Bib_ID),
|
||||
key (TAG_0XX_ID), key (TAG_1XX_ID), key (TAG_2XX_ID), key (TAG_3XX_ID), key (TAG_4XX_ID), key (TAG_5XX_ID), key (TAG_6XX_ID), key (TAG_7XX_ID), key (TAG_8XX_ID), key (TAG_9XX_ID), key (Storage_ID), key (Holdings_ID));
|
||||
# marc_subfield_structure contains the definition of the marc
|
||||
# subfields. Any MARC is supposed to be support-able
|
||||
CREATE TABLE marc_subfield_structure (
|
||||
tagfield char(3) NOT NULL default '',
|
||||
tagsubfield char(1) NOT NULL default '',
|
||||
liblibrarian char(255) NOT NULL default '', # the text shown to a librarian
|
||||
libopac char(255) NOT NULL default '', # the text shown to an opac user
|
||||
repeatable tinyint(4) NOT NULL default '0', # is the field repeatable 0/1 ?
|
||||
mandatory tinyint(4) NOT NULL default '0', # is the subfield mandatory in manual add 0/1 ?
|
||||
kohafield char(40) NOT NULL default '', # the name of the normal-koha- DB field
|
||||
PRIMARY KEY (tagfield,tagsubfield)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
create table 0XX_Tag_Table (Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL, Subfield_ID INT UNSIGNED NOT NULL, Authority_ID INT UNSIGNED,
|
||||
Link_Flag ENUM('Y','N','B'), Storage_ID INT UNSIGNED NOT NULL,
|
||||
KEY ID_Index(Tag_ID),
|
||||
key (Subfield_ID),
|
||||
key (Storage_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
# marc_tag_structure contains the definition of the marc tags.
|
||||
# any MARC is supposed to be support-able
|
||||
CREATE TABLE marc_tag_structure (
|
||||
tagfield char(3) NOT NULL default '',
|
||||
liblibrarian char(255) NOT NULL default '',
|
||||
libopac char(255) NOT NULL default '',
|
||||
repeatable tinyint(4) NOT NULL default '0',
|
||||
mandatory tinyint(4) NOT NULL default '0',
|
||||
PRIMARY KEY (tagfield)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
create table 0XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
# marc_tag_word contains 1 record for each word in each subfield in each tag in each biblio
|
||||
CREATE TABLE marc_tag_word (
|
||||
bibcode bigint(20) NOT NULL default '0',
|
||||
tagnumber char(3) NOT NULL default '',
|
||||
subfieldid char(1) NOT NULL default '',
|
||||
word varchar(255) NOT NULL default '',
|
||||
sndx_word varchar(255) NOT NULL default '', # the soundex version of the word (indexed)
|
||||
PRIMARY KEY (bibcode,tagnumber,subfieldid),
|
||||
KEY word (word),
|
||||
KEY sndx_word (sndx_word)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
create table 1XX_Tag_Table (Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL, Subfield_ID INT UNSIGNED NOT NULL, Authority_ID INT UNSIGNED,
|
||||
Link_Flag ENUM('Y','N','B'), Storage_ID INT UNSIGNED NOT NULL,
|
||||
KEY ID_Index(Tag_ID),
|
||||
key (Subfield_ID), key (Storage_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table 1XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table 2XX_Tag_Table (Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL, Subfield_ID INT UNSIGNED, Authority_ID INT UNSIGNED,
|
||||
Link_Flag ENUM('Y','N','B'), Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table 2XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table 3XX_Tag_Table (Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL, Subfield_ID INT UNSIGNED, Authority_ID INT UNSIGNED,
|
||||
Link_Flag ENUM('Y','N','B'), Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table 3XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table 4XX_Tag_Table (Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL, Subfield_ID INT UNSIGNED, Authority_ID INT UNSIGNED,
|
||||
Link_Flag ENUM('Y','N','B'), Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table 4XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table 5XX_Tag_Table (Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL, Subfield_ID INT UNSIGNED, Authority_ID INT UNSIGNED,
|
||||
Link_Flag ENUM('Y','N','B'), Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table 5XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table 6XX_Tag_Table (Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL, Subfield_ID INT UNSIGNED, Authority_ID INT UNSIGNED,
|
||||
Link_Flag ENUM('Y','N','B'), Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table 6XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table 7XX_Tag_Table (Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL, Subfield_ID INT UNSIGNED, Authority_ID INT UNSIGNED,
|
||||
Link_Flag ENUM('Y','N','B'), Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table 7XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table 8XX_Tag_Table (Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL, Subfield_ID INT UNSIGNED, Authority_ID INT UNSIGNED,
|
||||
Link_Flag ENUM('Y','N','B'), Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table 8XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table 9XX_Tag_Table (Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL, Subfield_ID INT UNSIGNED, Authority_ID INT UNSIGNED,
|
||||
Link_Flag ENUM('Y','N','B'), Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table 9XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Control_Table
|
||||
(Control_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Record_Status CHAR(1) NOT NULL,
|
||||
Record_Type CHAR(1) NOT NULL,
|
||||
Encoding_Level CHAR(1) NOT NULL,
|
||||
Des_Cat_Form CHAR(1) NOT NULL,
|
||||
Type_Date CHAR(1) NOT NULL,
|
||||
Beg_Pub_Date CHAR(4) NOT NULL,
|
||||
End_Pub_Date CHAR(4) NOT NULL,
|
||||
Pub_Place CHAR(3) NOT NULL,
|
||||
Ill_Code CHAR(4) NOT NULL,
|
||||
Target_Aud CHAR(1) NOT NULL,
|
||||
Item_Form CHAR(1) NOT NULL,
|
||||
Cont_Nature CHAR(4) NOT NULL,
|
||||
Gov_Code CHAR(1) NOT NULL,
|
||||
Conf_Code CHAR(1) NOT NULL,
|
||||
Festschrift CHAR(1) NOT NULL,
|
||||
Own_Index CHAR(1) NOT NULL,
|
||||
Fiction CHAR(1) NOT NULL,
|
||||
Biography CHAR(1) NOT NULL,
|
||||
Lan_Code CHAR(3) NOT NULL,
|
||||
Storage_ID INT UNSIGNED,
|
||||
primary key (Control_ID));
|
||||
|
||||
create table Auth_Table
|
||||
(Auth_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Auth_Control_ID INT UNSIGNED NOT NULL, Date_Added TIMESTAMP,
|
||||
Date_Modified TIMESTAMP,
|
||||
Auth_1XX_ID INT UNSIGNED, Auth_260_ID INT UNSIGNED, Auth_360_ID INT UNSIGNED,
|
||||
Auth_4XX_ID INT UNSIGNED, Auth_663_ID INT UNSIGNED, Auth_664_ID INT UNSIGNED,
|
||||
Auth_665_ID INT UNSIGNED, Auth_667_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Auth_Control_ID),
|
||||
primary key(Auth_ID));
|
||||
|
||||
create table Auth_1XX_Tag_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT, Tag_ID INT UNSIGNED NOT NULL ,
|
||||
Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Auth_1XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Auth_260_Tag_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT, Tag_ID INT UNSIGNED NOT NULL,
|
||||
Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Auth_260_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Auth_360_Tag_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT, Tag_ID INT UNSIGNED NOT NULL,
|
||||
Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Auth_360_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Auth_4XX_Tag_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT, Tag_ID INT UNSIGNED NOT NULL,
|
||||
Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index(Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Auth_4XX_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index(Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Auth_663_Tag_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT, Tag_ID INT UNSIGNED NOT NULL,
|
||||
Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Auth_663_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Auth_664_Tag_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT, Tag_ID INT UNSIGNED NOT NULL,
|
||||
Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Auth_664_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Auth_665_Tag_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT, Tag_ID INT UNSIGNED NOT NULL,
|
||||
Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Auth_665_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Auth_667_Tag_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT, Tag_ID INT UNSIGNED NOT NULL,
|
||||
Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL,
|
||||
Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Auth_667_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Auth_Link_Table
|
||||
(Link_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Date_Added TIMESTAMP, Date_Modified TIMESTAMP,
|
||||
Auth_ID INT UNSIGNED, Record_ID INT UNSIGNED,
|
||||
Link_Type ENUM('a','b','c','d','e','f','g'),
|
||||
Tag_ID INT UNSIGNED, Tag CHAR(3) NOT NULL,
|
||||
KEY Tag_Index (Tag(3)), primary key (Link_ID));
|
||||
|
||||
create table Auth_Control_Table
|
||||
(Auth_Cont_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Record_Status CHAR(1) NOT NULL,
|
||||
Record_Type CHAR(1) NOT NULL,
|
||||
Geo_Sub_Code CHAR(1) NOT NULL,
|
||||
Record_Kind CHAR(1) NOT NULL,
|
||||
Main_or_Added CHAR(1) NOT NULL,
|
||||
Subj_Added CHAR(1) NOT NULL,
|
||||
Ser_Added CHAR(1) NOT NULL,
|
||||
Storage_ID INT UNSIGNED,
|
||||
primary key (Auth_Cont_ID));
|
||||
|
||||
create table Holdings_Table
|
||||
(Hold_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Hold_Control_ID INT UNSIGNED NOT NULL, Date_Added TIMESTAMP,
|
||||
Date_Modified TIMESTAMP,
|
||||
Notes_Tag_ID INT UNSIGNED, Hold_852_ID INT UNSIGNED, Caps_Pat_ID INT UNSIGNED,
|
||||
Enum_Chron_ID INT UNSIGNED, Text_Hold_ID INT UNSIGNED,
|
||||
Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Hold_Control_ID),
|
||||
primary key(Hold_ID));
|
||||
|
||||
create table Hold_Notes_Tag_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL, Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Hold_Notes_Tag_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Hold_852_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL, Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Hold_852_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Hold_Caps_Pat_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL, Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Hold_Caps_Pat_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Hold_Enum_Chron_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL, Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Hold_Enum_Chron_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Hold_Text_Hold_Table
|
||||
(Tag_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Tag_ID INT UNSIGNED NOT NULL, Indicator1 CHAR(1) NOT NULL,
|
||||
Indicator2 CHAR(1) NOT NULL, Tag CHAR(3) NOT NULL,
|
||||
Subfield_ID INT UNSIGNED, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Tag_ID),
|
||||
KEY Tag_Index (Tag(3)), primary key(Tag_Key));
|
||||
|
||||
create table Hold_Text_Hold_Subfield_Table
|
||||
(Subfield_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Subfield_ID INT UNSIGNED NOT NULL, Subfield_Mark CHAR(1) NOT NULL,
|
||||
Subfield_Value CHAR(255) NOT NULL, Storage_ID INT UNSIGNED,
|
||||
KEY ID_Index (Subfield_ID),
|
||||
KEY Mark_Index (Subfield_Mark(1)),
|
||||
KEY Subfield_Index (Subfield_Value(255)), primary key(Subfield_Key));
|
||||
|
||||
create table Hold_Control_Table
|
||||
(Hold_Cont_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Record_Status CHAR(1) NOT NULL,
|
||||
Record_Type CHAR(1) NOT NULL,
|
||||
Meth_Acq CHAR(1) NOT NULL,
|
||||
Cancel_Date CHAR(4) NOT NULL,
|
||||
Gen_Retention CHAR(1) NOT NULL,
|
||||
Spe_Retention CHAR(3) NOT NULL,
|
||||
Cmplt CHAR(4) NOT NULL,
|
||||
Lend_Pol CHAR(1) NOT NULL,
|
||||
Re_Pol CHAR(1) NOT NULL,
|
||||
Lan_Code CHAR(3) NOT NULL,
|
||||
Storage_ID INT UNSIGNED,
|
||||
primary key(Hold_Cont_ID));
|
||||
|
||||
create table Storage_Table
|
||||
(Storage_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Storage_ID INT UNSIGNED NOT NULL, Blob_ID INT UNSIGNED, Text_ID INT UNSIGNED,
|
||||
Med_Blob_ID INT UNSIGNED, Med_Text_ID INT UNSIGNED, Long_Blob_ID INT UNSIGNED,
|
||||
Long_Text_ID INT UNSIGNED, URI CHAR(255),
|
||||
Storage_Type ENUM('B','MB','LB','U'),
|
||||
KEY ID_Index (Storage_ID),
|
||||
primary key(Storage_Key));
|
||||
|
||||
create table Blob_Table
|
||||
(Blob_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Blob_ID INT UNSIGNED NOT NULL, Blob_Data BLOB,
|
||||
Seq_No INT UNSIGNED,
|
||||
KEY ID_Index (Blob_ID),
|
||||
primary key(Blob_Key));
|
||||
|
||||
create table Med_Blob_Table
|
||||
(Med_Blob_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Med_Blob_ID INT UNSIGNED NOT NULL, Blob_Data MEDIUMBLOB,
|
||||
Seq_No INT UNSIGNED,
|
||||
KEY ID_Index (Med_Blob_ID),
|
||||
primary key(Med_Blob_Key));
|
||||
|
||||
create table Long_Blob_Table
|
||||
(Long_Blob_Key INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
Long_Blob_ID INT UNSIGNED NOT NULL, Long_Blob_Data LONGBLOB,
|
||||
Seq_No INT UNSIGNED,
|
||||
KEY ID_Index (Long_Blob_ID),
|
||||
primary key(Long_Blob_Key));
|
||||
|
|
Loading…
Reference in a new issue