Broken MARC database format

Micah Stetson avatarMicah Stetson created an issue

Was issue 844825 on SourceForge.


Original post by mstetson on 2003-11-18

The current table layout does not properly handle MARC fields that are both repeatable and have multiple subfields. There's no way to differentiate the subfields that go with different fields. The fix is to create a new table, biblio_subfields, like this:

fieldid: int(11)
subfieldid: int(11)
subfield_cd: char(1)
subfield_data: text

And to change biblio_fields so that it looks like this:

bibid: int(11)
fieldid: int(11)
tag: smallint(6)
ind1_cd: char(1)
ind2_cd: char(2)
field_data: text

Field data is still required for storing those few MARC fields that don't have subfields.

As I really need this fixed in order to import my client's data, I will probably implement the changes very soon. I'm posting a bug so that the developers know about it and can correct me (soon) if I'm operating from any wrong perceptions.

Micah


Comment by mstetson on 2004-04-30

Even the changes I describe above don't make things perfect. We also need a position indicator to keep track of the order of subfields within a field. This bug needs fixing badly, but it won't happend in 0.5.0, and I'm not certain about 0.6.0. The changes required are extensive, and we're placing security fixes at a higher priority.

Micah

Comments (5)

  1. Anonymous

    Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\Program Files\EasyPHP-5.3.7.0\www\openbiblio\shared\common.php on line 24

    sankar

  2. Hans van der Weij

    Anonymous: the "Deprecated ..." warning is not related to issue 1. It will go away when PHP is run with production settings, but using EasyPHP-5.3.7.0 you will run into more issues.

    For example: install and upgrade for OpenBiblio versions up to 0.7.0 can't run succesfully because of a backwards incompatible change in MySQL 5.5. Until this is fixed, try an older version of EasyPHP. Probably EasyPHP 5.2.10 will work.

  3. Hans van der Weij

    The issue is fixed in https://bitbucket.org/mstetson/obiblio-10-wip (1.0-wip)

    But is NOT fixed in https://bitbucket.org/mstetson/obiblio/ (0.x.x)

    That MARC is not stored perfectly in the database tables, does not seem to be a big issue for current users of the OpenBiblio 0.x.x branch. But it is a know limitation, so for release 0.7.1, a section "Known limitations" has been added to install_instructions.html

  4. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.