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

Additional information is given below for each attribute. You should assume attr

ID: 3699736 • Letter: A

Question

Additional information is given below for each attribute. You should assume attributes are required unless stated otherwise:

• Movie
– MID: An auto-generated ID value.
– Title: A title that is no longer than 127 characters.
– Gross: A currency value. Should be capable of holding two decimal places.

– DateReleased: A month/day/year value.

• Actor

--AID: An auto-generated ID value.

– FirstName: A first name.
– LastName: A last name.
– CreditedAs: An optional attribute for listing an alternate name an actor is credited as.

• User
– Username: A username.

• Reviews
– Username: A foreign key referencing the username from the User table.

– MID: A foreign key referencing the MID from the Movie table.

– Review: A textual review of the movie.

• Stars
– MID: A foreign key referencing the MID from the Movie table.

– AID: A foreign key referencing the AID from the Actor table.

Building the Database

In SQLite, write the SQL statements to create the MovieReview database outlined in the ER diagram

Can anyone help me create this database in SQLlite? This is what I have so far:

CREATE TABLE Movie (

MID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,

Title TEXT NOT NULL,

Gross REAL NOT NULL,

DateReleased TEXT NOT NULL

);

CREATE TABLE Actor (

AID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,

FirstName TEXT NOT NULL,

LastName Text NOT NULL,

CreditedAs Text

);

CREATE TABLE User (

Username TEXT PRIMARY KEY NOT NULL,

JOINED DATE NOT NULL

);

CREATE TABLE Reviews (

Review BLOB NOT NULL,

FOREIGN KEY (Username) REFERENCES User (Username),

FOREIGN KEY (MID) REFERENCES Movie (MID)

);

CREATE TABLE Stars (

FOREIGN KEY (AID) REFERENCES ACTOR (AID),

FOREIGN KEY (MID) REFERENCES Movie (MID),

)

;

Gross MID DateReleased Title Movie MID MID Usemame. AID Stars Reviews Review FirstName Actor LastName User Joined AID CreditedAs

Explanation / Answer

Basically,what you have answered is how we create the database.There is no further addition to the SQL statements already mentioned by you

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote