Write a script that implements the following design in a database named my_web_db: downloads products users product_id INT O product_name VARCHAR(45) user_id INT ? download_id INT O email_address VARCHAR (100) user_id INT O first_name VARCHAR(45) O download_date DATETIME Indexes Olast_name VARCHAR(45) O filename VARCHAR(50) Indexes O product_id INT Indexes In the Downloads table, the user_id and product_id columns are the foreign keys. Include a statement to drop the database if it already exists. Include statements to create and select the database. Include any indexes that you think are necessary. Specify the utf8mb4 character set for all tables. Specify the InnoDB storage engine for all tables.

Principles of Information Systems (MindTap Course List)
12th Edition
ISBN:9781285867168
Author:Ralph Stair, George Reynolds
Publisher:Ralph Stair, George Reynolds
Chapter5: Database Systems And Applications
Section: Chapter Questions
Problem 15SAT: An in-memory database (IMDB) is a database management system that stores the entire database in...
icon
Related questions
Question
100%
Write a script that implements the following design in a database named
my_web_db:
users
downloads
products
product_id INT
O product_name VARCHAR(45)
user_id INT
download_id INT
email_address VARCHAR(100)
user_id INT
O first_name VARCHAR(45)
KO download_date DATETIME
Indexes
Olast_name VARCHAR(45)
O filename VARCHAR (50)
Indexes
O product_id INT
Indexes
In the Downloads table, the user_id and product_id columns are the foreign
keys.
Include a statement to drop the database if it already exists.
Include statements to create and select the database.
Include any indexes that you think are necessary.
Specify the utf8mb4 character set for all tables.
Specify the InnoDB storage engine for all tables.
Transcribed Image Text:Write a script that implements the following design in a database named my_web_db: users downloads products product_id INT O product_name VARCHAR(45) user_id INT download_id INT email_address VARCHAR(100) user_id INT O first_name VARCHAR(45) KO download_date DATETIME Indexes Olast_name VARCHAR(45) O filename VARCHAR (50) Indexes O product_id INT Indexes In the Downloads table, the user_id and product_id columns are the foreign keys. Include a statement to drop the database if it already exists. Include statements to create and select the database. Include any indexes that you think are necessary. Specify the utf8mb4 character set for all tables. Specify the InnoDB storage engine for all tables.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr