diff --git a/movies-lab/5-creating-tables/creating-tables.md b/movies-lab/5-creating-tables/creating-tables.md index 5471e8b8..cdd0c0dc 100644 --- a/movies-lab/5-creating-tables/creating-tables.md +++ b/movies-lab/5-creating-tables/creating-tables.md @@ -28,7 +28,6 @@ The first table you need to create is the movie\_users table. It is very simple, ``` movie_users - id /pk username /unique ``` @@ -148,8 +147,7 @@ You will need a table to store some basic movie information in addition to the u ``` - watchlist - id /pk + watchlist /unique movie_id, user_id movie_id user_id /fk movie_users watched_yn @@ -159,7 +157,6 @@ You will need a table to store some basic movie information in addition to the u release_date runtime num vote_average num - movie_id, user_id /unique ``` * Note the /unique directive in the last line of the Quick SQL code. In the movie\_users table, you created a unique key by using the /unique directive for the username column. This prevents the same user from getting put into the table more than once by making sure the username is always unique. In the watchlist table, the unique key actually comes from two different columns: movie\_id and user\_id. A singleĀ user cannot add the same movie to the watchlist table more than once. Unique keys are extremely helpful when it comes to maintaining the integrity of the data in your local tables. diff --git a/movies-lab/6-creating-details-buttons/images/add-ssc.png b/movies-lab/6-creating-details-buttons/images/add-ssc.png index 8e19b26b..f4d2e831 100644 Binary files a/movies-lab/6-creating-details-buttons/images/add-ssc.png and b/movies-lab/6-creating-details-buttons/images/add-ssc.png differ