Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write an SQL script that builds a database to match the relational model provided. These SQL statements in the script must be provided in the
Write an SQL script that builds a database to match the relational model provided. These SQL statements in the script must be provided in the correct order.
OKTOMOOK relational model Customers (customerNumber, firstName, lastName, Address, city, State, postcode, region, email) Books (ISBN, title, pubDate, PublD, Cost, Retail, Discount, category) Orders (orderNumber, customerNumber, orderDate, shipDate, street, city, state, postCode, shipCost) Ordersltems (orderNumber, itemNumber, ISBN, quantity, paidEach) Author (authorlD, firstName, lastName) Wrote ISBN, authorlD) Publishers (publd, name, contact, phone) FOREIGN KEYS Orders (customerNumber) is dependent on Customers(customerNumber) Orders (orderNumber) is dependent on Ordersltems(orderNumber) Wrote (authorlD) is dependent on Author (authorlD) Wrote(ISBN) is dependent on Books(ISBN) Books(publD) is dependent on Publishers(publD) OTHER CONSTRAINTS The domain of customer(state) and orders(shipState) are [QLD, VIC, NSW, WA, TAS, NT, SA] ISBN must be a 13-digit number and may begin with a zero The publisher name and book title are both mandatory The default Orderltems(quantity) is 1 The Book(category) are Fitness, Children, Computer, Cooking, Business, LiteratureStep 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