Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider a 'Customer Order processing' database with three tables as given below 1. Customer - captures customer details cust_no cust_name C001 C002 C003 C004 John

image text in transcribed

Consider a 'Customer Order processing' database with three tables as given below 1. Customer - captures customer details cust_no cust_name C001 C002 C003 C004 John Joseph Peter Pan 2. Item - captures item details item_no item_name 10001 10002 10003 10004 10005 Shoes Umbrella Table TV Fan item_price 120.00 .50 50.00 1000.80 501.10 3. Orders. captures order details of the items bought by customer order_no | order_date | cust_no 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 2019-09-03 2019-01-09 2019-01-09 2019-01-09 2019-05-02 2019-01-03 2019-01-01 2019-11-11 2019-11-11 2019-01-09 C002 c002 C002 C003 C003 C003 C004 C004 C004 C004 item_nono_of_units_bought 10001 10003 10004 10004 10001 10003 10001 10002 10004 10003 Based on the tables given above, answer the following questions i) Write SQL syntax to 1) Create table Orders' with all necessary constraints. 2) Also write an SQL syntax to set the initial value of the column (order_no) to 1001 (order_no is auto_increment) ii) Write an SQL syntax to 1) Modify the table 'customer' and add an attribute 'cust_gender' char(1) 2) Also write an SQL syntax to rename the attribute 'cust_gender' to 'gender for the 'customer' table

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

Guide To Client Server Databases

Authors: Joe Salemi

2nd Edition

1562763105, 978-1562763107

More Books

Students also viewed these Databases questions

Question

Demonstrate how to use the Gaps Model for diagnosing and

Answered: 1 week ago