Skip to content

Commit

Permalink
Changed subfieldmark back to subfieldcode
Browse files Browse the repository at this point in the history
  • Loading branch information
tonnesen committed May 29, 2002
1 parent 98ab122 commit 9da8afa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
17 changes: 3 additions & 14 deletions marc/benchmarks/benchmarkschema
@@ -1,23 +1,12 @@
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',
tagvalue varchar(255) default NULL,
valuebloblink bigint(20) default NULL,
PRIMARY KEY (bibcode,tagnumber,tagorder)
) TYPE=MyISAM;

CREATE TABLE marc_2XX_subfield_table (
CREATE TABLE marc_subfield_table (
subfieldid bigint(20) unsigned NOT NULL auto_increment,
tagid bigint(20) NOT NULL default '0',
tag char(3) NOT NULL default '',
bibid bigint(20) NOT NULL default '0',
subfieldorder tinyint(4) NOT NULL default '0',
subfieldcode char(1) NOT NULL default '',
subfieldmark char(1) NOT NULL default '',
subfieldvalue varchar(255) default NULL,
valuebloblink bigint(20) default NULL,
PRIMARY KEY (subfieldid),
KEY (bibid,tagid,tag,subfieldcode),
KEY (bibid,tag,subfieldcode,subfieldvalue)
KEY (bibid,tagid,tag,subfieldmark),
) TYPE=MyISAM;

4 changes: 2 additions & 2 deletions marc/marcschema.sql
Expand Up @@ -18,11 +18,11 @@ CREATE TABLE marc_subfield_table (
tag char(3) NOT NULL default '',
bibid bigint(20) NOT NULL default '0',
subfieldorder tinyint(4) NOT NULL default '0',
subfieldmark char(1) NOT NULL default '',
subfieldcode char(1) NOT NULL default '',
subfieldvalue varchar(255) default NULL,
valuebloblink bigint(20) default NULL,
PRIMARY KEY (subfieldid),
KEY (bibid,tagid,tag,subfieldmark),
KEY (bibid,tagid,tag,subfieldcode),
) TYPE=MyISAM;

# marc_blob_tag containts tag longer than 255 car.
Expand Down
5 changes: 5 additions & 0 deletions marc/perlmarcstructure
Expand Up @@ -37,6 +37,11 @@ index to the structure to aid these lookups.
$record->{index}->{110}->{tags}=\(3,4) <-- array ref shows that tags 3 and 4
are 110 tags

Need a similar index for subfields.... I'm not sure if this is any simpler than
just looping through the tags every time. :)

I think looping is the way to go...

This still needs more work. This will also require an API for accessing or
modifying this structure, as it is non-trivial to parse the data. I'm also
starting to wonder how difficult it is going to be to develop templates using
Expand Down

0 comments on commit 9da8afa

Please sign in to comment.