CSCI 470
Web Science
Spring 2015

Montana Tech
Computer Science & Software Engineering

Quotes Search Engine
This assignment is bigger than normal and is worth 60 points.
Leaving this one to the last minute is a bad idea!

You will be building a web application that allows users to find famous quotations in a large database of quotes. You will be learn to build a Ajax web application as well as build a MySQL database and interface with it via PHP.

Users search for a quote by typing in a search query. Users can also select from amoung the most popular or most recent searches in the application. The system then searches its database and returns matching quotes:

The application supports automatic suggestions as users type their search (similar to Google suggest). The suggestions will present the top searches made by the current user (based on their session ID). Below the suggestions based on a user's past searches, popular searches made by all users will appear.

Users can rate each quote between 1 and 5 stars. Each quote displays the community average rating for that particular quote:

The application also supports a simple administrator interface that allows past searches and ratings to be deleted either globally or only for a specific session ID:

You can should play with my completed quotes application to get a feel for how things should work.

Part 1: Database development

You already installed MySQL on your server as part of the Server Build 2 assignment. However, the easiest way to get the full text search feature used in this assignment works easiest with MySQL 5.6+: You will need to develop a MySQL database to support this application. The database will need at least three tables: For simplicity, in your database design you do not need to worry about having repeated authors or categories in the table of quotes (a more complex design would have separate tables for authors and categories). You imagine the specifics of your database's location, name, and login credentials will likely change. Additionally, you may also someday replace MySQL with another database package. Being a good software engineer, you want to minimize the impact of these axes of change by doing the following: Part 2: Search page
The search page consists of a text box in which users can enter commands, and lists of the the most popular and frequent searches. Search interface details: As the user types a query, suggested searches appear in a box below the text field. It works as follows: To the right of the search field, two lists appear containing hyperlinks that execute previous searches: After a search is executed, if there any matching quotations, they should appear below the search box and the most popular and recent searches: Part 3: Admin page
This is a simple page allowing an administrator to reset the state of the past searches or ratings. This can be done globally (deleting all search history or all ratings), or can be specific to a given session ID. Interface details:
Submission. I will be testing your application by logging into your VM, starting Apache and MySQL and then going to your quotes.php page. Submit all your source files (including your SQL script) to the Moodle dropbox. The Moodle timestamp is the completion time for the assignment.

Page last updated: April 01, 2015