MovieDB
Like the webmail client, this movie database front-end was for csci4131 – Internet Programming, and is written in python/cgi. The most notable difference between this and the webmail client, though, is that this program utilizes a database (as the name implies). Specifically, a MySQL database with a few different tables and various keys are used to store various aspects of the information about the movie. The schema was actually provided for us already, as defined here:
Spoiler
CREATE TABLE Movie (
MovieID int(11) NOT NULL auto_increment,
Title char(30),
Rating int(11),
DirectorID int(11),
PRIMARY KEY (MovieID)
);
CREATE TABLE ActorSet (
ActorSetID int(11) NOT NULL auto_increment,
MovieID int(11),
ActorID int(11),
PRIMARY KEY (ActorSetID)
);
CREATE TABLE Actor (
ActorID int(11) NOT NULL auto_increment,
FName char(30),
LName char(30),
PRIMARY KEY (ActorID)
);
CREATE TABLE Director (
DirectorID int(11) NOT NULL auto_increment,
FName char(30),
LName char(30),
PRIMARY KEY (DirectorID)
);
Anyway, here’s the code I wrote. Enjoy.
[syntax,moviedb.cgi,Python]