Image Class version 3 (DLXS 11) introduces the use of MySQL for search and retrieval. Assuming DLXS has been installed and tested, the basic steps to bringing a collection online with Image Class and MySQL are as follows.
Note: Access restrictions for the collection must also be established / configured.
A Data Table is required for each collection. The Data Table holds descriptive metadata. A collection can have any number of descriptive metadata fields, and for each there is a column in the Data Table.
Field names must be legal MySQL field names, otherwise there are no restrictions.
The Data Table must have a field with unique values that can be used as record identifiers.
A media filename field is necessary if image files or other types of media are to be displayed by Image Class. Filenames must have filename extensions. It is best if the filename extension matches that of the master image file, and not that of the file to be delivered online. Sometimes they do not differ.
If searching of the entire record at once is desired, an additional field concatenating the values of all other fields is needed. This is referred to as the "all" field.
The ID field must have a full text index.
Each additional field to be searchable in Image Class must have a full text index.
A collection may require a Media Table. The Media Table contains detailed information about the media files ( i.e., most often images ) that are part of a collection.
In contrast to the Data Table, the Media Table has a required set of fields that do not vary.
A Media Table is required in the following situations:
A Media Table is required in most situations. It is only when the collection follows the simple model of having image files in the sid format, with thumbnails as jpg, and only one image per record that a Media Table is not needed.
Note: The m_id and m_iid fields of the Media Table should be indexed. A full text index is not necessary.
View the detailed Media Table Definition.
It is recommended that Data and Media Table names relate to the collection ID. Name the Data Table exactly as the collid, and the Media Table as "collid_media". Attaching a simple version number to each will facilitate deployment and minimize interruption of service.
and at the next data update,
The table names are stored in each collection's Collmgr Collection Database record. Therefore, the tables are not used by Image Class until the Collmgr record is updated and released. This facilitates switching from the old version to the new.
Field labels, as displayed to the end-user in Image Class are easily changed on a whim using Collmgr. Field names, on the other hand, are used behind the scenes for unique identification of fields.
Image Class has traditionally relied on abbreviated field names that follow the convention collid_fieldabbrev, e.g,. bhl_ti for the Title field of the Bentley Image Bank collection. There is nothing requiring this convention be followed. There is merit in using brief field names since they are carried around on the URL, entered multiple times in the Collmgr Collection Database record, and stored on the CGI session.
Field names must be legal MySQL field names.
Please refer to MySQL documentation at www.mysql.com for full instruction on how to use the following MySQL commands on the MySQL command line.
create table ( art_id varchar(10), art_fn varchar(12), art_ti text, art_cr text, art_su text, art_all text ) TYPE=MyISAM;
drop table art;
load data local infile 'art.txt' into table art;
select count(*) from table art; select art_ti, art_cr from table art limit 10;
select art_ti, art_cr from table art where art_cr = "picasso";
alter table art add FULLTEXT art_all (art_all);
alter table art add index art_id (art_id(10));
show create table art;