From the course: Advanced MySQL Database Administration
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Challenge: Adding a product to order items - MySQL Tutorial
From the course: Advanced MySQL Database Administration
Challenge: Adding a product to order items
- [Instructor] All right. We're ready for your assignment on adding the product to the order_items table. So in your last assignment, you updated the database to include a products table. Now, Sally needs your help updating the order_items table to add a new column that will track which product was sold. She'd like you to add a column and call it product_id. For this assignment, don't worry about back-populating the data, just add the column here. Once you complete this, you should see this additional column, product_id, and all of the values are just going to be null. Like I said, don't worry about back-populating it, just add the column, and we'll worry about the back population later. If this one gives you trouble, go for the review lecture on alter table, try to get the answer on your own here, and then come back and watch the solution video and we'll show you how it's done. Good luck.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Overview of alter, update, and key relationships1m 29s
-
(Locked)
Review: Altering tables5m 24s
-
Review: Updating records7m 55s
-
(Locked)
Review: Table relationships and cardinality4m 55s
-
(Locked)
Challenge: Introducing a new product1m 8s
-
(Locked)
Solution: Introducing a new product4m 18s
-
(Locked)
Challenge: Adding a product to order items55s
-
(Locked)
Solution: Adding a product to order items1m 45s
-
(Locked)
Challenge: Updating product data in order items1m 19s
-
(Locked)
Solution: Updating product data in order items2m 20s
-
(Locked)
Challenge: Primary key to foreign key mapping1m 17s
-
(Locked)
Solution: Primary key to foreign key mapping4m 17s
-
(Locked)
Challenge: Import 2013 Q1 data37s
-
(Locked)
Solution: Import 2013 Q1 data3m 28s
-
(Locked)
-
-
-
-
-
-
-
-
-