Kevin Murphy
Education - Work Experience - Computer Skills - Research/Writing Skills -Volunteer Experience -References - Contact Info - Home

(Please note: references to the organizations name have been removed and confidential information has been replaced with '######' marks).


Image Database Documentation

August 16, 2002

BC Chapter’s Image Database. 3

Overview Of The Database. 3

BC Image Database Entity Relationship Diagram.. 4

Using The Database. 5

To Insert Images. 5

To Search for Images. 5

To View Images. 5

Editing The Database. 5

Photos Table. 6

Photographers Table. 6

Six Category Tables. 6

Categories Table. 7

Backing Up The Database. 7

Backing Up The Entire Database. 7

Backing Up A Specific Table in the Database. 7

Downloading The FTP (File Transfer Protocol) Program.. 8

Uploading Files Using FTP. 8

General Tab. 8

Startup Tab. 8

FTP Operation. 8

Designer’s Contact Information. 9

 


 

BC Chapter’s Image Database

 

Overview Of The Database

 

The image database consists of nine related tables (see figure 1).  The images are stored in the file system on a server and the references to and information about these images is stored in the database.  This information is stored in the t_photos table via the database website navigation page (located in the left frame of the website) by following the “Insert Image Information” link.  These image references can be edited and deleted only via the “Database Admin” link which accesses the actual tables and requires a separate password.

 

The photographers and related information are stored in a separate but linked t_photographers table.  Like the t_photos table, photographer information is inserted from the Database home page “Insert Image Information” link then choosing “add a photographer”.  The information can be edited and deleted only via the “Database Admin” link.

 

There are six major categories from which the images can be searched: NREM (Natural Resource and Environmental Management), People, Region, Scenery, Campaign, and Flora & Fauna.  The information in these tables is linked to the t_photos table and cannot be edited, however categories can be added.

Image Database
Entity Relationship Diagram

 

 

Figure 1


Using The Database

To Insert Images

To insert an image into the file system and its information into the database do the following:

  1. Follow the insert image link and check to see if the photographer’s name is in the drop down list. If not follow the link to add a photographer. When done proceed to step two.

  2. Select photographer and complete the form. If there is no known photographer, this field can be left blank. When entering the image title, file name and description, note that these words are used in the site's keyword search function, and so be as descriptive as possible. If your file name is rejected because it is a 'duplicate entry', please rename your file. However please note that the file extension (i.e. filename.jpg or filename.gif) needs to be included in the file name and must not be changed.

  3. FTP the images files to the server ensuring there is an image thumbnail placed in the imageThumbNails directory (if a thumb nail is not added a broken image link will appear, however it will still link to stored information and the other resolutions of the referenced image on the image display page).  Then place either or all varying resolutions of the image into their proper directories; imagesHighRes, imagesPresentation, and imagesWebOptimized.  Links to images will only appear on the search results page if there is a file in a directory.

To Search for Images

There are two methods you can use to search for image files:

  1. Keyword search - This function will search on words that have been entered into the image titles, file names and descriptions. Simply type a key word (i.e. ‘moose’, ‘ungulate’, ‘fire’, ‘beetle’) into the text box and click the search button

  2. Category search - This function will search on six main categories. You can select from NREM (Natural Resource and Environmental Management), Peoples, Regions, Scenery, Campaigns, and Flora & Fauna. Simply select the category from the navigation page in the left frame, then select a subcategory from the drop down list, and click on the search button.

To View Images

Users with browsers 4.0 or higher have two choices to view the images:

  1. Click on the thumbnail image to open a new window. This allows a viewer to open more than one window at a time.

  2. Click on the filename link to open the image in the same window. If you are viewing with a 3.0 or lower browser version this is your only option.

Editing The Database

WARNING: Anyone who has access to the database admin pages MUST be made aware of the Standard Query Language (SQL) database command ‘DROP’.  Dropping a table or entire database is an unrecoverable deletion of the table or database.  Once the ‘drop’ command is issued, the data base or table is gone.  There is no undo button.

 This function is password protected and is accessed via the “Database Admin” link (NOTE: as the admin directory is password protected and is frame based, meaning a frame is opened that holds more than one html page, you may have to enter the password two or three times on first entry into the admin pages).  The technology used for the database is open source and free to use with no license fees required.  The database is MySQL (http://www.mysql.com/) and it is administered via the phpMyAdmin-2.2.6 web application (http://www.phpmyadmin.net/). 

Photos Table

  • Click on t_photos to open and then click [ Browse ] at the top.  Note: NEVER choose “Drop” or the table will be deleted permanently and is not recoverable (THERE IS NO ‘Undo button’!).  To edit a photo and its information, choose “Edit”.  On the new page, do not change “Function” but rather the associated “Value”.

  • The photoID number is generated by an automatic numbering system and must not be altered.  Using the edit choice, an entire record may be inserted, or a previous record may be updated.

  • To delete a record, select the “Delete” option for the appropriate record.

Photographers Table

  • Click on t_photographers to open and then click [ Browse ] at the top.  Note: NEVER choose “Drop” or the table will be deleted permanently and is not recoverable.  To edit a photo and its information, choose “Edit”.  On the new page, do not change “Function” but rather the associated “Value”. 

  • The photographerID number is generated by an automatic numbering system and must not be altered.  Using the edit choice, an entire record may be inserted, or a previous record may be updated.

  • To delete a record, select the “Delete” option for the appropriate record.

Six Category Tables

  • Topics may be added (cautiously!) to any of these tables.  They should not be deleted, and may only be edited for spelling corrections.  Any other changes will destroy the integrity of the relational database.

  • To add a new category, select table, select [Browse], make a note of the information you will be adding to the table then click on “insert new row” below the table, enter the information and click go.  For example; using the t_campaigns table, select t_campaigns from the table list, then select [ Browse ], note what the next campaignID number is in sequence and what the categoryID number is (in this case 7), then select ‘insert a new row’ from the bottom of the page (you may have to scroll down).  Leave the ‘Function’ section blank and enter the appropriate information you noted above, along with the campaign name, in the ‘Value’ column then click ‘Go’.  This will bring you to a page that tells you whether your SQL statement was run correctly or in error.

Categories Table

  • The table t_categories should not be altered in any way.  If an upper level category must be added to the database, then contact Kevin Murphy (email: kmurphy@htp.bcit.ca) as a new search page will also have to be added to the web site.

 

Backing Up The Database

Backing Up The Entire Database

  1. From the Database Admin page, click on the text just under the ‘Home’ link, which is the database name ‘####### (10)’.

  2. Scroll down to the bullet which states ‘View dump (schema) of database’. There you will see a list menu of all the tables in the database and next to it three radio buttons; ‘Structure only’, ‘Structure and data’, and ‘Data only’.

  3. Select the radio button ‘Structure and data’ then click on the ‘Go’ button under the five check boxes (Do not select any of the check boxes.)

  4. This will bring you to a page full of text titled ‘Database ####bc running on db.netnation.com’.

  5. Select all of the text from the first ‘#’ to the bottom of the page (leave out the title) and paste it into a text file and save that file as your backup of the entire database.  Alternatively, select ‘file > save as’ and save the html document as a text (.txt) file (ensure your cursor is in the proper frame window or you may save the wrong html file).  Open that file and either delete the title or place a ‘#’ mark in front of the title and save the file once again as your backup of the entire database.

 

Backing Up A Specific Table in the Database

  1. From the Database Admin page, click on the text just under the ‘Home’ link, which is the database name ‘####bc (10)’.

  2. Scroll down to the bullet which states ‘View dump (schema) of database’. There you will see a list menu of all the tables in the database and next to it three radio buttons; ‘Structure only’, ‘Structure and data’, and ‘Data only’.

  3. From the list menu select the table or tables to be backed up (iether the t_photos or the t_photographers are your main concerns here).

  4. Select the radio button ‘Structure and data’ then click on the ‘Go’ button under the five check boxes (Do not select any of the check boxes.)

  5. This will bring you to a page full of text titled ‘Database ####bc running on db.netnation.com’.

  6. Select all of the text from the first ‘#’ to the bottom of the page (leave out the title) and paste it into a text file and save that file as your backup of the tables or tables in the database.  Alternatively, select ‘file > save as’ and save the html document as a text (.txt) file (ensure your cursor is in the proper frame window or you may save the wrong html file).  Open that file and either delete the title or place a ‘#’ mark in front of the title and save the file once again as your backup of the table or tables in the database.

Downloading The FTP (File Transfer Protocol) Program

Go to http://www.ftpplanet.com/download.htm  and choose “English” below the free WS_FTP LE (limited edition) version and enter your email address.  (If you choose the installation tutorial, the program will guide you step by step.)  Save the download file to the desktop, temporary directory, or downloads directory.  After the program has been run, it can be stored there, deleted or copied to a floppy disk so that it can be installed on other computers.  This program (or some other FTP program) must be installed on each machine that will be used to upload image files to the server’s file system.  It is a small file (690 KB).  Double click on the downloaded file ws_ftple.exe file and select the radio button “education” and the check box for location “at school”.

Uploading Files Using FTP

  • There is an excellent tutorial on the web host Net Nation’s site at   http://www.netnation.com

  • Follow the links   FAQs (under New to Hosting?)  à  Technical FAQ’s à  Uploading/FTP FAQ  à  4. How do I use WS FTP?

  • On your machine, go to Programs à  WS_FTP  à  WS_FTP95 LE and complete information in Session Properties under the General and Startup tabs.

General Tab

  • Profile Name: ######

  • Host Name: somewhere.org

  • Host Type: Automatic detect

  • User ID: #######

  • Password: #######

Startup Tab

  • Initial Remote Site Folder: /HTML/imageDB

  • Initial Local Folder: Parent_imageDB (suggested title)

  • Note: As there are four subdirectories of importance for image storage (imagesHighRes, imagesPresentation, imagesWebOptimized, and imageThumbNails), it is suggested that you make a parent folder on your local machine for these four directories, titled Parent_imageDB in which to store the four directories.

  • When both tabs have been completed, click “Apply”, then “OK” then enter the password: 86trolls.

FTP Operation

  • The local files are on the left hand side and the remote files are on the right hand side.  Images can be sent or received.

  • Double clicking on a file is equivalent to clicking the  à  button so be careful when clicking!

  • Double clicking on a directory opens the directory but does not send it.

  • Double clicking on the   .  .  “ at the top of the local file list will move up a directory.

  • Open the equivalent directories on both the local (LHS) and remote (RHS) sites.

  • After creating, naming and storing an image on the local hard drive, locate the file, highlight it, and click  à  to send it to the remote site.

Designer’s Contact Information

This database and website was designed and developed by Kevin Murphy and Cynthia Caine.

If there are questions regarding it or its maintenance please contact Kevin Murphy at the following email address: kmurphy@htp.bcit.ca .

  

Education - Work Experience - Computer Skills - Research/Writing Skills -Volunteer Experience -References - Contact Info - Home - Top