This exercise requires you to have access to Oracle Express (or a similar SQL da
ID: 3819846 • Letter: T
Question
This exercise requires you to have access to Oracle Express (or a similar SQL database).
Instructions
All documents and SQL code must be zipped into a single file and uploaded to Blackboard
All SQL code must run error-free for full credit
All SQL code must be commented appropriately
Problem 1:
Write the SQL statement to create a table to store information on movies. The table must have attributes for the following:
Title of movie
Genre
Director
Writer
Date of release
Be sure to define an appropriate primary key for the table. Assume each movie has only one director and one producer.
Explanation / Answer
Create table MOVIES
(
Title varchar2(50) Primary key,
Genre varchar2(20) ,
Director varchar2(30) NOT NULL,
Writer varchar2(30) NOT NULL,
Producer varchar(30) NOT NULL,
DateOfRelease date
);
title of the Movie is unique and not null so ideal candidate of primary key. Director,Producer,Writer should be not null.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.