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

Sqlite 1. a) Write CREATE TABLE commands to construct a database according to th

ID: 3598911 • Letter: S

Question

Sqlite 1. a) Write CREATE TABLE commands to construct a database according to the monograph in Figure 1. Remember to specify the correct keys, the correct foreign keys and determine which foreign keys may be null b) Write CREATE TABLE commands to construct a database according to the monograph in Figure 2. Remember to specify the correct keys, the correct foreign keys and determine which foreign keys may be null Figure 1: name address Stars title ear Stars-in Movies name Owns length genre Studios address Figure 2: row seat Bookings toCust toFlt Customers hone Flights SSNo number aircraft addr name

Explanation / Answer

Answer to Question Number 1a. Figure 1. :-

CREATE TABLE Stars(
name varchar(30) NOT NULL,
address varchar(255),
PRIMARY KEY (name)
);

CREATE TABLE Movies(
title varchar(255) NOT NULL,
year int NOT NULL,
length int,
genre varchar(30),
stars varchar(30) FOREIGN KEY REFERENCES Stars(name),
studio varchar(30) FOREIGN KEY REFERENCES Studios(name),
CONSTRAINT PK_movies PRIMARY KEY (title,year)
);

CREATE TABLE Studios(
name varchar(30) NOT NULL,
address varchar(255),
PRIMARY KEY (name)
);


**Please note : By the Diagram and arrow directions, assuming Stars are present in Movies and Studios are present in Movies.
If any clarifications are required, feel free to drop a comment.

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