Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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, Literature

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

Step: 3

blur-text-image

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

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions

Question

5. Develop a self-management module for a training program.

Answered: 1 week ago