Pizza Kitchen

In this section you will take all of the skills you have developed and apply them to a larger problem. Pizza Kitchen is an independent pizza delivery company that specialises in making the finest pizzas out of the highest quality ingredients. The company wants to develop a online ordering system so that their customers can order from their laptops rather than via the phone.

This is where you come in! Using your knowledge of HTML forms and server-side scripting you will develop the online ordering system for Pizza Kitchen.

The Database

The first task involves developing the database that will be used to store the pizza types and customer orders. It has been decided that in this first version of the system only pizzas can be ordered online, so there is no need to think about drinks, side-orders or deserts.

The ER diagram below represents the design of the database:

ER diagram for the pizza kitchen database

The entities in this database are represented by the following entity descriptions:

  • Pizza(PizzaID, Name, Description, Cost)
  • Size(Inches, Cost)
  • Customer(CustomerID, FirstName, LastName, StreetAddress,Town,PostCode,EMailAddress)
  • CustomerOrder(OrderID, Date, DeliveryTime, _CustomerID_)
  • OrderItem(OrderItemID, _OrderID_, _PizzaID_, _Inches_, Quantity)

Remember that underlined attributes represent primary keys and italic attributes represent foreign keys.


Task 11

Write a script to create the given database structure as a MySQL database. You may need to investigate the datatypes MySQL supports.

Pizzas can have names up to 50 characters and descriptions of up to 300 characters.