Nota Bene The Flying Cat

Database Finder

Skip the navagation links

About the MPL Electronic Resources Database

This system is in development. The database is incomplete and connection links may not function!

There is a story that Ram Dass (I think) tells, about the Lord and Satan taking a walk together. The Lord bends down and picks up something from the ground, it glows warmly in his hand, brightly, beautifully. Satan asks the Lord what it is, and the Lord replies, "it is truth." And Satan says, "Here, let me have that, I'll organize it for you."

Want the code?

You can write to paula to get the code to help her develop it at Sourceforge.

About the Database System

The database is composed of three tables:
  1. ref_subj
    The ref_subj table contains subject headings that will be assigned to titles. It contains two fields: headID, a unique ID number and head, a subject heading.
  2. ref_title
    The ref_title table contains an entry for each database. It contains the following fields: titleID (unique ID number), title (the name of the database), liburl (The URL if you're connecting to the database from inside the library), ourl (The URL if you're connecting to the database from outside the library), otherloc (a designation for if the database is not Internet-based, but is instead a CD-based database located on a library computer), funding (the funding source for the database), vendor (the vendor of the database) helpurl (a URL to help for the database
  3. ref_link The ref_link table ties the subj and title tables together. It contains three fields: linkID (a unique ID number), titleID (from the ref_title table) and headID (from the ref_subj table)

The Scripts

A series of joins are used to combine the three tables in order to link the titles with the subject headings.
  • The title list, bytitle.php, is a straight select from ref_title, arranging the records alphabetically by title.
  • The subject listing joins the three tables together to produce a listing of all the title by subject.The query reads
    $query ="SELECT
    head, ref_title.titleID,title,liburl,
    ourl,otherloc,vendor,funding,helpurl
    FROM ref_subj, ref_title,ref_link
    WHERE ref_link.headID=ref_subj.headID
    AND ref_link.titleID= ref_title.titleID
    ORDER BY ref_subj.head, ref_title.title";
    
    
  • The Browse Titles by Subject report presents a list of subject headings for selection, then a list of titles under that heading. This report uses the same join as the full subject listing.
  • The search option conducts a lowercase string search for the provided search terms. If terms are entered into more than one field the search is formatted in a boolean AND.

The Admin routine allows for add and editing titles and assigning subject headings to titles. The add routine will check to see if the title already exists in the database. The add subject script will check to see if the selected heading has already been assigned to the title. If a new heading needs to be created the script will check to be sure that heading doesn't already exist in the heading table.

Tutorials, Guides and Books

Appu, Ashok. Making Use of PHP. NY: Wiley. 2002.

Beverly. Re: insert multiple select values. 06-25-03. A post to the Databases Forum at PHP Beginner.com. Viewed 07-30-04.

dBforums is a terrific resource for both mySQL and PHP.

Lerdorf, Ramus and Kevin Tatroe. Programming PHP. O'Reilly 2002. (this is where I learned how to make the browse by subject routine.)

Tachibana, Eric. Introduction to databases for the web. nd. Viewed 7-30-04.

Widenius, Michael et al. MySQL Reference Manual: Searchable, with User Comments. Updated daily. Viewed 07/30/04.


Skip the navagation links

Need more help? Ask a Librarian


Page generated in 0.000 secs.