IT-Universitetet
/Courses Fall 2004 /Web Publishing with Databases

Web Publishing with Databases, Fall 2004 (W2)

Course Schedule Literature W2 News Group Hand-in

Teachers

Office

Martin Elsman (mael@itu.dk) - ME4E04 
Arne John Glenstrup (panic@itu.dk) - AJG 4E08 

Teaching Assistants

Office

Office Hours

Camilla Krag Jensen (ckj@itu.dk) News group News group help
Martin Koch Andersen (mkoch@itu.dk) 2E13 Tuesday 9-10
Lasse Steensgaard (xls@itu.dk) News group News group help
Jacob Friis Mathiasen (jfm@itu.dk) News group News group help

News

  • 2005-01-04: A preexamination session is held in Aud. 3 on January 5, 17-19. Teaching assistant Jacob Friis Mathiasen will answer your questions.
  • 2005-01-04: Yet an earlier exam set with solutions has been released for your pleasure.
  • 2004-08-06: Minor room change for exercises 14:30-16:30. They now take place in room 4A56 and LAB6 (4A54).
  • 2004-08-06: There are no exercise classes in the introductory week (31st August).
  • 2004-08-06: The first lecture is Tuesday 31st August at 17.00-19.00 in Auditorium 4 (room 4A60).

Course Goals

To learn to apply advanced Web techniques for developing realistic, useful Web sites, involving information interchange with a database. The course is focused on the possibilities the server side provides for constructing Web sites with a high degree of dynamic content. After the course, the successful student will be able to design and construct medium-sized Web applications using PHP, design small MySQL databases, and construct PHP scripts that interact with databases using SQL (Structured Query Language).

See also the course base description.

Prerequisites

As a prerequisite, students should know about HTML and be able to use HTML to construct simple Web pages. Students with no programming experience should be motivated and prepared to put extra effort into the problem sets.

Course Content

Based on knowledge about the construction of static Web sites, the course provides the student with techniques for creating Web sites that are programs and Web sites that are databases.

The students are introduced to basic programming with PHP (PHP Hypertext Preprocessor) on the Web server, for generating HTML code dynamically, and to database programming with SQL (Structured Query Language), for enriching Web pages with dynamic content.

The lectures and the weekly individual exercises teaches the student
  • basic PHP programming
  • to design and implement simple databases using SQL
  • to construct Web applications that
    • access simple databases from PHP using dynamically generated SQL
    • extract information from foreign Web sites
    • send emails to potential users
    • perform access control using Cookies
  • to describe and evaluate the mechanisms behind dynamic Web sites
  • to know about the techniques used for constructing advanced community Web sites

Course Format (When and where)

The course is built around 12 weekly lectures and 11 weekly exercises.

Lectures are on Tuesdays from 17.00-19.00 in Auditorium 4 (room 4A60), starting 31st August. There are exercise classes from 19.00 to 21.00 in rooms 4A56 and LAB6 (4A54), as well as from 14:30 to 16:30 in room 4A56 and LAB6 (4A54). Note: There are no exercise classes in the introductory week (31st August). Thus, the first exercise class is 7th September.

Each student must turn in (and get approved) at least 9 of the 11 weekly exercises within the given deadlines. This includes students joining the course late.

Students

See the student list.

How to get Help: The Course News Group

If you have questions to the exercises or the course, please use the news group it-c.courses.W2 or visit a teaching assistant in the office hours (see above). See Sysadm's news-howto. Do NOT email teaching assistants or lecturers at their personal email address for general exercise help.

Email to everyone on the course can be sent using the course mailing list: W2E2004_stud@itu.dk.

Examination Format

The examination format is a 4 hour written exam with all written material allowed. Grades are given in the 13-scale using external censorship. Besides the written exam, the students must have turned in at least 9 of 11 possible weekly problem set solutions within the given deadlines, and the solutions must be approved by the teachers.

Problem sets will be discussed in the exercise classes on the dates listed below. For a problem set solution to be approved, the student must turn in the solution to the problem set using the Hand-in system before the time 00.01 on the following course day. Solutions to problem set 11 should be turned in before the time 00.01 on 23rd November 2004.

You are allowed to discuss solution strategies with your fellow students, but you must code up your own answers yourself. Copying other students' solutions and submitting them will be considered as cheating at the exams, cf. ITU's Examination Regulations and ITU's notes on academic conduct and misconduct.

Furthermore, for approval of a problem set solution, the student must have completed correctly at least 50 percent of the problem set. (Percentage rates for the individual exercises are stated in the problem sets.) So to get a problem set approved, you should probably solve well over 60 percent to be on the safe side.

Note: When submitting a problem set solution to the Hand-in system, the whole solution must be turned in together (for all exercises in the problem set). If solutions to a problem set have been turned in several times, the last solution being turned in before the deadline is the one being rated.

Course Schedule

The schedule is preliminary

Day

Week

Topic

Literature

Teacher

Exercise Deadline

31/08 36 Course introduction. Static Web pages, HTML, HTML-forms. Slides. HTML overview, part 1, HTML overview, part 2. AJG    
07/09 37 Introduction to PHP. The first dynamic Web page. Variables, arithmetic expressions, conditional statements, string operations, while loops. Querying data from users, simple forms, form variables. Slides. PHP and MySQL Web Development, 1-49 AJG PS1
PS1-extra
13/09
14/09 38 PHP continued. For-loops. Built-in functions, random numbers. User defined functions, code reuse, functions for constructing a changeable Web page design. Strategies for Web sites that are programs. Slides. PHP and MySQL Web Development, 117-143 AJG PS2 20/09
21/09 39PHP continued. Form-variables in links. Radio buttons, select lists. Hidden form variables. Arrays. Example: throwing dices. Check boxes. Slides. PHP and MySQL Web Development, 71-94 AJG PS3 27/09
28/09 40 PHP continued. Regular expressions. Checking form variables. Fetching data from foreign Web sites. Slides. PHP and MySQL Web Development, 95-116 AJG PS4 04/10
05/10 41 File-based databases. Relational databases. Introduction to SQL (Structured Query Language). MySQL. Slides. PHP and MySQL Web Development, 51-69, 169-179 AJG PS5 11/10
12/10 42 SQL continued. Aggregate requests, calculated fields, outer joins, indexes, keys. Slides. PHP and MySQL Web Development, 181-221 ME PS6
PS6-extra
18/10
19/10 43 SQL continued. Connection to MySQL database from PHP on the Web server. Web sites that are databases. Database transactions via Web forms. Slides. PHP and MySQL Web Development, 223-240 ME PS7 25/10
26/10 44 Sending email. Text substitution with regular expressions. Example: Sending emails from mail list service. Eksample: On-line classification system. Slides. PHP and MySQL Web Development, 439-453 ME PS8 01/11
02/11 45 Dates. Example: Todo list service. Simple user authentication. Slides. PHP and MySQL Web Development, 379-386 ME PS9 08/11
09/11 46 Cookies and sessions. User authentication with cookies. Community sites. Explanation of an earlier exam. Slides. PHP and MySQL Web Development, 413-428 ME PS10 15/11
16/11 47 Publishing Web sites. Analysing user behavior. Explanation of an earlier exam. Slides. No reading ME PS11 22/11

Some ealier exam sets with solutions

Creating databases at ITU

To complete the exercises, you will need to create some databases at ITU's MySQL server. Creating a database is done using ITU's database administration service:

  1. Enter your UNIX user name and password, click on "Log ind"
  2. Click on "Create new database" ("Opret ny database").
  3. Enter a name for the database.
  4. Enter a user name of your choice (e.g., your UNIX user name) as the user name for the database.
  5. Enter a database password. Do NOT use your usual password; select a new, different password (because the password will be written in your .php files).
  6. Click on "Create" ("Opret").
  7. When you have finished, click on "Logout" ("Log ud").

Possible 4-Week Projects

  • The Web Pilot by Rasmus Møgelberg and Rasmus Lerchedahl Petersen.

Literature

  • Luke Welling og Laura Thomson. PHP and MySQL Web Development. Second Edition. Sams Publishing. ISBN: 0-672-32525-X. Februar 2003.
  • Peter Sestoft. HTML overview. An introduction to writing HTML documents. Translated into english by Martin Elsman.

Related Literature


Updated 12.10.2004
Arne John Glenstrup

til top