[Koha-devel] marc stuff

Tonnesen Steve tonnesen at cmsd.bc.ca
Thu May 16 12:38:02 CEST 2002


On Thu, 16 May 2002, Tonnesen Steve wrote:

> I seem to be missing the subfield code, and I need a unique id for the
> record for editing purposes.  Did you intend to put a separate record in
> marc_1XX_tag_table for each subfield?  We'd also need some way to tie all
> the subfields of a given tag together.

Suggestion:

Add back in the subfield tables for storing subfield information:

        CREATE TABLE marc_0XX_tag_table (
                tagcode bigint(20) unsigned NOT NULL auto_increment,
                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 '',
                PRIMARY KEY (tagcode),
                KEY  (bibcode,tagnumber,tagorder)
                ) TYPE=MyISAM;
        CREATE TABLE marc_0XX_subfield_table (
                subfieldcode bigint(20) unsigned NOT NULL auto_increment,
                tagcode bigint(20) NOT NULL default '0',
                bibcode bigint(20) NOT NULL default '0',
                subfieldorder tinyint(4) NOT NULL default '0',
                subfieldcode char(1) NOT NULL default '',
                subfieldvalue varchar(255) default NULL,
                valuebloblink bigint(20) default NULL,
                PRIMARY KEY (subfieldcode),
                KEY (bibcode,tagcode,subfieldcode)
                ) TYPE=MyISAM;


Then my previous example:

100  a Dolch, Edward W.
     q (Edward William),
     d 1889-1961


would be stored as:


marc_1XX_tag_table
  tagcode=658
  bibcode=154
  tagnumber=100
  tagorder=0
  indicator=00

marc_1XX_subfield_table
  subfieldcode=1532
  tagcode=658
  bibcode=154
  subfieldorder=1
  subfieldcode=a
  subfieldvalue=Dolch, Edward W.
  valuebloblink=NULL

  subfieldcode=1533
  tagcode=658
  bibcode=154
  subfieldorder=2
  subfieldcode=q
  subfieldvalue=(Edward William),
  valuebloblink=NULL

  subfieldcode=1534
  tagcode=658
  bibcode=154
  subfieldorder=1
  subfieldcode=d
  subfieldvalue=1889-1961
  valuebloblink=NULL



It would also be possible to merge these two tables into one, but all of
the subfields of a given tag would have to have a unique tag identifier to
tie them together.

Steve

PS:  If you're back on IRC this evening, you can beep me by typing:

  /msg steve Wake up already

that sends me a private message and makes my console beep.






More information about the Koha-devel mailing list