CIT 597 Turning in the Phone Book assignment
Fall 2007, David Matuszek

My apologies for providing this information so late.

If you can, please create a database named "phonebook" containing a table named phonebook, with columns name (as the primary key) and number. The names should include David Matuszek, John Smith, and Santa Claus. If you do this according to the directions below, I can use my own database, which will greatly simplify testing.

Please collect all files (Tomcat's servlet directory, your client-side HTML and JavaScript, and possibly a database) into a single file, and zip it up to submit it via Blackboard.

I created this database and exported it, but didn't have time to figure out how to import it. Thanks to Mike Mattozzi and Daniel Sheiner for working this out. Here are the directions:

  1. Make sure the MySQL server is running.
  2. Create the database with: mysql -u root phonebook < create.sql
  3. Import the data with: mysql -u root phonebook < phonebook.sql

Here is a link to the file create.sql, or you can copy and paste from the code below:

drop table if exists phonebook;
create table phonebook (
    name      varchar(30)    not null,
    number    varchar(15)    not null,
    primary key(name)
) engine=InnoDB;

Here is a link to the file phonebook.sql, or you can copy and paste from the code below:

# MySQL-Front 3.2  (Build 13.48)

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES latin1 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='SYSTEM' */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE */;
/*!40101 SET SQL_MODE='' */;


# Host: localhost    Database: phonebook
# ------------------------------------------------------
# Server version 4.1.9-max
INSERT INTO `phonebook` (`name`,`number`) VALUES ('David Matuszek','1-215-808-8122');
INSERT INTO `phonebook` (`name`,`number`) VALUES ('John Smith','555-1234');
INSERT INTO `phonebook` (`name`,`number`) VALUES ('John Doe','1-800-555-1212');
INSERT INTO `phonebook` (`name`,`number`) VALUES ('Mary Smith','1-900-123-4567');
INSERT INTO `phonebook` (`name`,`number`) VALUES ('Santa Claus','1-000-000-0001');

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;