Hi all,
I am currently working on a small script that will update the record
structures in the database. I am wondering about the keys in the table
bibfmt. I think that it would make sense to ditch the keys on the
columns 'id_bibrec' and 'format' and introduce a unique composite key
(id_bibrec, format).
My take on this is that whenever we retrieve a format, we always have
both information (recid and format) and the unique characteristic would
make the insert/update procedure more secure.
Any opinion on that?
FYI:
CREATE TABLE IF NOT EXISTS bibfmt (
id mediumint(8) unsigned NOT NULL auto_increment,
id_bibrec int(8) unsigned NOT NULL default '0',
format varchar(10) NOT NULL default '',
last_updated datetime NOT NULL default '0000-00-00',
value longblob,
PRIMARY KEY (id),
KEY id_bibrec (id_bibrec),
KEY format (format)
) TYPE=MyISAM;
Benoit.