CPSC 343 Database Theory and Practice Fall 2004

CPSC 343 Announcements

[11/5] A note on cookies: Consider the following design for homework #5 exercise #3 - the first page has a form element called "sname" for entering the sailor's name and the second page creates a cookie called "sname" to store the sailor's name for later (using setcookie("sname",$_REQUEST["sname"],time()+300)). You may notice that whatever name you enter the first time will persist - even if you go back and enter a new name, you'll still be stuck with the same sailor. What seems to be happening is this: $_REQUEST is an array containing all of the values of form elements in the recently-submitted form and all of the values of cookies. When you set the sname cookie, it will stick around for 5 minutes (the time()+300) bit and its value will be sent to every page requested from the webserver until the cookie expires. So, the second time you get to your second page there are two values for things called "sname" - one is the value you typed into the form the second time, and the other is the value of the cookie that you set for the last sailor. It seems that the cookie value "wins" so that $_REQUEST["sname"] is the value of the cookie rather than the value from the form. There are several possible fixes:

Also note that the value of a cookie persists until it expires, even if you've redeployed into tomcat in the meatime. This is because the cookies are stored in the user's web browser and so are unaffected by changes to the webserver.

[11/2] I have posted a sample design for the application design phase of the project on the syllabus page. It isn't complete, but it provides a useful starting point for the design of the presentation tier and the application logic.

[10/29] Tomcat and PHP aren't getting along for some reason - it runs fine for a while, but after serving several PHP pages it crashes. It is currently set up to automatically restart when it dies so if you try to reload a page and get a "could not connect to remote server" error, wait a moment and try again. If the problem persists or you get a different error, let me know.

[10/29] Homework #5 has been posted.

[10/22] The SQL query tips/hints which were part of homework #4 have been moved to a separate document.

[10/21] Solutions for homework #3 have been posted.

[10/19] I have pushed back the due dates for the next two project phases (logical design and application design) by two days, to allow a little more time to revise the ER diagrams. The logical design is now due Wed 10/27.

[10/12] Solutions for the exam have been posted. Extra credit opportunity: you can earn up to 12 points of extra credit (4 points per topic), applied to the exam, if you convince me that you know the following topics:

See me if you are interested in this opportunity. "Showing me that you know the topic" will probably involve you working through a problem or two, explaining what you are doing. You'll need to demonstrate pretty good mastery of the topic in order to earn extra credit - the points will be more-or-less all-or-nothing.

[10/8] Homework #3 has been posted on the syllabus page, along with solutions to some of the chapter 4 exercises not assigned.

[9/26] Solutions for some of the problems in chapter 19 (normalization) have been posted.

[9/26] There will be no office hours on Tuesday 9/28, Wednesday 9/29, or Friday 10/1 this week. I hope to have email access on those days, but I can't guarantee it. I will definitely answer any emails sent Tuesday-Saturday by Saturday evening at the latest.

[9/20] Fixed! I've worked out why MySQL wasn't enforcing the foreign key constraints (pesky differences between RedHat and SuSE Linux) and I've updated the MySQL directions to reflect the new steps. You don't need to redo anything you've already done on the homework (I'll count doing it the way that the directions previously said to do it as correct), but if you create new tables you should check out the proper way to do it.

[9/20] Something is wonky with MySQL and the foreign key constraints - it doesn't seem to be creating InnoDB tables like it should, so it will accept but not enforce your foreign key constraints. Write them like they should be written, and I'm working on trying to figure out what the problem is. (It used to work!)

[9/20] Homework #1 solutions have been posted on the syllabus page.

[9/13] Homework #2 has been posted on the syllabus page.

[9/13] ERD updates: Saving seems to work (finally), and another problem with printing and aggregates has been resolved.

[9/10] ERD updates:

[9/9] The ER diagram for the record company example from class has been posted on the syllabus page. It may not be exactly the same as the version from class because the file didn't save for some reason, but it should be very similar.

[9/6] The solution for exercise 2.3 has been posted on the syllabus page as an example of ER design.

[9/6] Homework #1 has been posted on the syllabus page. You may work on the last problem in a group and turn in a single solution for the group. (Only for the last problem!)

[8/27] Welcome to CPSC 343! You should take a few minutes to familiarize yourself with the course website, since all important information will be posted here. Check back often for new information.

Valid HTML 4.01!