Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

NOTE: The answer should return the database/tables below modified. No new data (

ID: 3727279 • Letter: N

Question

NOTE: The answer should return the database/tables below modified. No new data (beyond possibly IDs should be created).

Below are tables that exist in a database. Construct/add the tables in such a way that they are in inner join able, but most importantly are still in at least second normal form. The database as-is being in third normal form. Primary Keys are Red movie(movieid, budget, homepage, release date, revenue, runtime, status, original language, original_title, tagline, title, vote_average, vote_vount, overview, popularity genre(genreid, name) keywords(keywordid, name) production_companies(id, name) production_countries(name, iso_3166_1) spoken_languages(name, iso_639_1)

Explanation / Answer

1) movie Table :-

CREATE TABLE `movie` (

`movieid` INT NOT NULL AUTO_INCREMENT,

`budget` INT NOT NULL,

`homepage` VARCHAR(45) NOT NULL,

`release_date` DATE NOT NULL,

`revenue` INT NOT NULL,

`runtime` INT NOT NULL,

`status` VARCHAR(45) NULL,

`original_language` VARCHAR(45) NULL,

`original_title` VARCHAR(45) NULL,

`tagline` VARCHAR(45) NULL,

`title` VARCHAR(45) NULL,

`vote_average` INT NULL,

`vote_count` INT NULL,

`overview` VARCHAR(45) NULL,

`popularity` VARCHAR(45) NULL,

PRIMARY KEY (`movieid`)

);

-----------------------------------------------------------------

2) Genre Table :-

CREATE TABLE `genre` (

`genreid` INT NOT NULL AUTO_INCREMENT,

`name` VARCHAR(45) NULL,

PRIMARY KEY (`genreid`)

);

---------------------------------------------------------------------------------

3) Keywords table:-

CREATE TABLE `keywords` (
`keywordid` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(45) NULL,
PRIMARY KEY (`keywordid`)

);

-------------------------------------------------------------------------------

4) Production Companies table:-

CREATE TABLE `production_companies` (
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(45) NULL,
PRIMARY KEY (`id`)

);

----------------------------------------------------------------------------

5) production_countries table:-

CREATE TABLE `production_ccountries` (
`id` INT NOT NULL AUTO_INCREMENT,
`iso_3166_1` VARCHAR(45) NULL,
PRIMARY KEY (`id`)

);

---------------------------------------------------------------------------

6) spoken_languages table :

CREATE TABLE `spoken_languages` (
`id` INT NOT NULL AUTO_INCREMENT,
`iso_639_1` VARCHAR(45) NULL,
PRIMARY KEY (`id`)

);