Question: Database & table creation [5 mins] [5 marks] 1. Create a database called moviedb 2. Create these table with appropriate datatype a. movies (movie id,
![Database & table creation [5 mins] [5 marks] 1. Create a](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f332b2843e9_25766f332b1ec6d5.jpg)
Database & table creation [5 mins] [5 marks] 1. Create a database called moviedb 2. Create these table with appropriate datatype a. movies (movie id, title, category) [movie_id increments automatically, add CHECK on the category to only accept ("Action', 'Animation', 'Drama', 'Super Hero')] casts (cast id, first_name, last_name, movie_id) ALTER (5 mins] [5 marks] Use and show each alter commands without dropping the existing table. 3. Add a column name 'age' in the casts table exactly after the 'last_name' column. a. HINT: search for AFTER command in the MySQL manual 4. Add two columns in the movies table as: 'IMDB_rating (FLOAT type), 'Box_office_earning' (INT type) 5. Change the 'Box_office_earning' column name to 'BO_earns_m$' (FLOAT Type) INSERT [15 mins) (13 marks] MOVIES Table IMDB_rating 7.6 BO_earns_m$ 240.00 N 3 movie id title category 1 ASSASSIN'S Animation CREED: EMBERS 2 Real Steel Action 3 La La Land Drama 4 Aquaman Super Hero 5 Game of Thrones Drama 6 Breaking Bad Drama 7 Stranger Things Sci-Fi Did you find any problems in the table data insertions? Why? 7.00 8.00 6.9 9.2 9.4 8.7 299.30 448.90 1148.0 228.00 80.00 378.00 CASTS Table age cast id 1 2 first_name Roger Craig Hugh last_name Smith Jackman movie_id 1 2 45 52
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
