This project demonstrates the use of an AppleScript to logout the current user, shutdown, or restart the computer based on a single "mode" parameter to the script.
These are several examples which each show how to set and retrieve a picture in a REAL Database (using the old and new 4.5 syntax) and in a MySQL database.