Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Add general constraints in SQL 2. Description 2.1 Tables with Primary Keys The primary key for each table is underlined. Movies(movieID, name, year, rating, length,

Add general constraints in SQL

image text in transcribedimage text in transcribed

2. Description 2.1 Tables with Primary Keys The primary key for each table is underlined. Movies(movieID, name, year, rating, length, totalEarned) Theaters(theaterID, address, numSeats) TheaterSeats(theater D, seatNum, brokenSeat) Showings(theaterID, showingDate, startTime, movielD, priceCode) Customers(customerID, name, address, joinDate, status) Tickets(theaterID, seatNum, showingDate, startTime, customerID, ticketPrice) ModifyShowings(theaterID, showingDate, startTime, movieID) 2.4 Add General Constraints 1.In Tickets, ticketPrice must be positive. Please give a name to this constraint when you create it. We recommend that you use the name positive_tickePrice, but you may use another name. The other general constraints don't need names. 2. In Customers, joinDate must not be before November 27, 2015. 3. In Showings, if movieID is not NULL, then priceCode must also not be NULL. Write commands to add general constraints in the order the constraints are described above, and save your commands to the file general.sql. (Note that UNKNOWN for a Check constraint is okay, but FALSE isn't.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Multimedia Database Systems

Authors: V.S. Subrahmanian

1st Edition

1558604669, 978-1558604667

More Books

Students explore these related Databases questions

Question

Create a workflow analysis.

Answered: 3 weeks ago