Program: Create a Database design

We want to build a simple application that implements a mini digg.com

I suggest you visit digg.com to see what it does.

The way it would work, is that users accounts are created. The each member can post a url to a web link they would like to submit and their comments on the link. Other users then can vote up or down for each entry that was submitted.

A really simple database structure would be to use two tables:

Table 1: Users

Fields:
Field namesdescriptions
user_email
the email address of the user, this will also be the sign in user name (serves as a primary key for this table)
user_name
the name the user wants to go by



Table 2: Entries:

Field namesdescriptions
entry_id
an autoincrementing id number for each entry that serves as a primary key
url
the url of the entry provided by a user
user_email
the user who submitted the entry (forms relationship with user table)
description
comment entered by the user to tell something about the link
created_on
date and time submitted (use DATETIME sql datatype)
vote
current vote number, this just a number that can be negative or positive, every vote up

Field names and descriptions
entry_id: an automatically up counting id number for each entry
url: the url of the entry provided by a user
user_email: the user who submitted the entry
description: comment entered by the user to tell something about the link
created_on: date and time submitted (use DATETIME sql datatype)
vote: current vote number, this just a number that can be negative or positive, every vote up increases it, every vote down decreases it

Your assignment is to use phpmyadmin on the cbis3 server and create this database called yourUserName_sitevotes in your area (put your username in place of yourUserName). You will need to choose appropriate data type and sizes for each field for the two tables. You do not need to create the table using sql statements, you can create the two tables interactivly using phpmyadmin. Make sure you have watched both videos for phpMyAdmin before you start.

When you are done, submit a statement that you are done on this page.