Tonnesen Steve wrote:
On Thu, 16 May 2002, paul POULAIN wrote:
And Canadians? :)
In french, américains, means people from notrh-America (mexico, US, Canada) AND people from USA. so in my mind yu were included ;-)
I have a Marc schema question for you Paul, if you're still around today...
How do I store the following tag:
100 a Dolch, Edward W. q (Edward William), d 1889-1961
in marc_1XX_tag_table I'd put:
bibcode=1234 tagnumber=100 tagorder=1 indicator=## tagvalue=Dolch, Edward W. valuebloblink=NULL
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.
You did'nt undestand my idea : in the 1XX_tag_table, you store the full line. So, the record looks : bibcode=1234 tagnumber=100 tagorder=1 indicator=## tagvalue=$aDolch, Edward W.$q(Edward William)$d 1889-1961 valuebloblink=NULL Don't forget that the tag_tables are used only for presentation purposes only. We search all with tag_word table. We can split thit record with a simple regexp, to get more user-friendly presentation. A regexp is FASTER than reading 10 or 15 records from the database. More than that, with your structure, we have to join 3 tables (biblio, tag_table, subfield_table) before getting any information. With my structure, we need only 2. So, I think (no, in fact I'm sure ;-)) that we don't need a subfield_table. About other modifications : FROM : CREATE TABLE marc_biblio ( ! bibcode bigint(20) unsigned NOT NULL auto_increment, datecreated date NOT NULL default '0000-00-00', TO : CREATE TABLE marc_biblio ( ! bibid bigint(20) unsigned NOT NULL auto_increment, datecreated date NOT NULL default '0000-00-00', I agree. FROM : 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; TO : CREATE TABLE marc_0XX_tag_table ( ! tagid bigint(20) unsigned NOT NULL auto_increment, ! bibid 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 (tagid), ! KEY (bibid,tagnumber,tagorder) ) TYPE=MyISAM; I STRONGLY DISAGREE ! Why ? because (bibid,tagnumber,tagorder) IS A PRIMARY KEY. You can undoubtfully find a record with those three informations. So we don't need a auto_increment field that is redundant. It's a DB-design mistake. I'm (almost) sure it's a bad idea. Note tagvalue and valuebloblink deseappear and should also re-appear if we drop subfields_table. I won't be reachable before 4PM-GMT. I'll try to be on irc for a few moment at 4PM-GMT to speak with you about the structure. Hoping we will be able to reach a "definitive" structure. -- Paul