Question: 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

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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!