Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started