Required fields - by table (Note - this is not a complete list of every field in every table, just those actually referenced by the PIE) Fields marked by * will be needed by even the most skeletal record (sensible defaults in brackets for LSE resources) Access Method table (not currently used) access_method_id - defined as not null Group right table * group_id - defined as not null, required by rdbavailable (all.lse.ac.uk) * location_id - defined as not null, required by rdbavailable * access_right - defined as not null, required by rdbavailable (access) Icon table alt_text - used by getrdblogo icon_id - defined as not null, required by getrdblogo url - defined as not null, used by getrdblogo IP Range table ip_range_id - defined as not null, used by rdbavailable name - defined as not null ip - defined as not null, used by rdbavailable mask = defined as not null, used by rdbavailable Keyword table keyword_id - defined as not null, used by make_search_sql keyword - defined as not null, used by make_search_sql Licensee inst table licensee_inst_id - defined as not null, required by getrdblocinfo licensee_inst_name - used by getrdblocinfo Location table availability - used by getrdblocinfo * available - defined as not null, required by getrdblocinfo (Y) comment - used by getrdburl help_url - used by getrdbhelp help_url_text - used by getrdbhelp * licensee_inst_id - required by getrdblocinfo (lse.ac.uk) * location_id - defined as not null, used by getrdburl, rdbavailable media_type - used by getrdblocinfo, where see notes * resource_id - defined as not null, used by getrdbsearchableresources; required by getrdburl * name - defined as not null, to be used for admin (unsorted) * search_protocol - used by getrdbsearchableresources, getrdburl (none) * url - defined as not null, used by getrdblocinfo, getrdburl Location ip range table location_id - defined as not null, used by rdbavailable ip_range_id - defined as not null, used by rdbavailable Location SQL table (not currently used) location_id - defined as not null Location Whoispp table - not currently used location_id - defined as not null Location WWW table (not currently used) location_id - defined as not null Location Z3950 table location_id - defined as not null zname- defined as not null ip_address- - defined as not null port - defined as not null database - - defined as not null Resource table about_url - used by getrdbhelp about_url_text - used by getrdbhelp ad_create_time - used by make_search_sql, without this the resource will not appear on the all resources page for new resources added this week/month icon_id - required by getrdblogo * resource_id - defined as not null; required by getrdbdesc, getrdbhelp, getrdbsearchableresources, getrdbtitle, getrdbtraining, make_search_sql * name - defined as not null; used by getrdbsearchableresources, getrdbtitle, make_search_sql summary - used by getrdbdesc training_url - used by getrdbtraining Resource keyword table resource_id - defined as not null, used by make_search_sql keyword_id - defined as not null, used by make_search_sql Resource Resource Type table resource_id - defined as not null, used by make_search_sql type_id - defined as not null, used by make_search_sql Resource Subject table resource_id - defined as not null, used by make_search_sql subject_id - defined as not null, used by make_search_sql Resource Type table type_id - defined as not null, used by make_search_sql name - defined as not null, used by getrdbresourcetypes, make_search_sql, all_searches Subject table subject_id - defined as not null, used by make_search_sql term - defined as not null, used by make_search_sql, all_searches Supplier table supplier_id - defined as not null name - defined as not null Z3950 Input Filters table zif_any - defined as not null zif_author - defined as not null zif_filter_name - defined as not null zif_id - defined as not null zif_subject - defined as not null zif_title - defined as not null Z3950 Output Filters table zof_id - defined as not null zof_filter_name - defined as not null zof_title - defined as not null zof_author - defined as not null zof_subject - defined as not null zof_identifier - defined as not null Fields used by RDB routines - by routine getrdbdesc routine Uses resource.summary; requires resource.resource_id. If resource.summary not present, returns "" which means that no official description is displayed for resource. getrdbhelp routine Uses resource.about_url, resource.about_url_text, location.help_url, location.help_url_text; requires resource.resource_id. If fields are not present, returns "" which then means no ? is displayed next to resource. getrdblocinfo routine Uses location.media_type, location.availability, location.url, licensee_inst.name; requires location.licensee_inst_id, licensee_inst.licensee_inst_id, location.available. If fields are not present, returns "" which means that the location icon and its alt text may not be displayed (if there is an icon defined as and in the configuration file it will be displayed when mediatype is not present, but available must contain information; location.available should by Y/N). getrdblogo routine Uses icon.url, icon.alt_text; requires icon.icon_id, resource.icon_id (only displays icon if there is an entry in icon table with matching ID to resource) getrdbresourcetypes routine Uses resource_type.name; no fields required (used to set up all resources page, search form) getrdbsearchableresources routine Uses resource.name, location.resource_id,location.search_protocol (!= "none"); requires resource.resource_id (used to set up search form) getrdbtitle routine Uses resource.name; requires resource.resource_id (returns "" if id not found) getrdbtraining routine Uses resource.training_url; requires resource.resource_id (returns "" if id not found, and no link to training material is displayed for resource) getrdburl routine Uses location.location_id, location.comment, location.url, location.search_protocol; requires location.resource_id (returns NULL if column not present and will be represented by "" in displayed information; comment forms part of the alt text to the location icon, there will be no link to the location if URL is NULL and search protocol should be "none" rather than NULL) rdbavailable routine Uses ip_range.ip, ip_range.mask, location_ip_range.location_id, location.location_id, ip_range.ip_range_id, location_ip_range.ip_range_id; requires group_right.location_id, group_right.access_right, group_right.group_id (returns available/unavailable; if there is no group_right.access_right/group_id for the location_id unavailable is returned; if there is no location_ip_range.location_id, available is returned) make_search_sql routine Uses resource.resource_id, resource.name, keyword.keyword, resource_keyword.resource_id, keyword.keyword_id, resource_keyword.keyword_id, subject.term, resource_subject.resource_id, resource_subject.subject_id, subject.subject_id, resource_type.name, resource_resource_type.resource_id, resource_type.type_id, resource_resource_type.type_id, resource.ad_create_time (resources missing these fields will just not be returned for the fielded searches which use them) all_searches cron script Uses resource_type.name, subject.term