Creating a Database Structure
Why are we creating a Database Structure?
1. Go to cPanel > phpMyAdminÂ
2. Using the login details we created when making the database 'jasonve1_menu' log into phpMyAdmin
Using this info to create the tables/structure of the database:
-Â Â Â Â Â Â Â Â Â Â Table: Product
§  product_id – int, not null, primary key, autoincrement
§  name – varchar(255), not null
 -          Table: Dish
§  dish_id – int, not null, primary key, autoincrement
§  name – varchar(255), not null
 -          Table: Course
§  course_id – int, not null, primary key, autoincrement
§  name – varchar(255), not null
 -          Table: products_dishes
§  products_dishes_id – int, not null, primary key, autoincrement
§  product_id - int, not null, foreign key (Product.product_id)
§  dish_id - int, not null, foreign key (Dish.dish_id)
 -          Table: products_courses
§  products_courses_id – int, not null, primary key, autoincrement
§  product_id - int, not null, foreign key (Product.product_id)
§  course_id - int, not null, foreign key (Course.course_id)
5. For the first the first table. Create a Table
6. Add in the details for the 2 columns ie.
§  product_id – int, not null, primary key, autoincrement
§  name – varchar(255), not null
6. Do the same for the following
-Â Â Â Â Â Â Â Â Â Â Table: products_dishes
§  products_dishes_id – int, not null, primary key, autoincrement
§  product_id - int, not null, foreign key (Product.product_id)
§  dish_id - int, not null, foreign key (Dish.dish_id)
We have trouble creating a foreign key. So now what?