Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please provide witj screenshots of the code, using sql : Customer customer ( cno , cname, mileage ) #customer number, customer name, mileage Supplier s

please provide witj screenshots of the code, using sql :
Customer customer(cno, cname, mileage) #customer number, customer name, mileage
Supplier s(sno, sname, city) #Supplier number, supplier name, supplier city
Production product p(pno, pname, price) # product number, product name, weight
Supplied product product(sno, pno, qty) #Supplier number, product number, supply quantity
Stock stock(pno, stqty) # product number, stock quantity
Order order(ono, cno, pno, oqty) # order number, customer number, product number, order quantity
Sale sale(pno, sqty) # Order number, product number, sales volume
Return returned(ono, pno) # Order number, Product number
Order Cancel orderCancel(ono, cno, pno, tag) # Order number, customer number, product number, tag (displayed as 0 for order cancellation, 1 for return
)1) As an initial state, customer, s, and p enter 5 or more records. For example, enter records c1, c2, c3, c4, c5.
2) When inserted into a supplied product, it is triggered to enter or change the inventory table.
3) It is triggered when inserted into the order table, and if it exceeds the inventory quantity, it is triggered and inserted into the order cancellation table (the tag is set to 0). If it is less than the inventory quantity, decrease the quantity in the inventory table and insert or change it in the sales table (for existing sold products).
4. When a return occurs and an insertion into the returns table is triggered, the cancellation is inserted into the order cancellation table (tag to 1), the product quantity in the sales table is changed, and the inventory quantity in the inventory table is changed.
spj
j
6.22 Workbench.
s,p,sp, pp(=part_structure), dept, emp, j, spj[1]
Workbench.sp,sj,pj.
.
sp,pj,sjspj spje select
parts city parts warehouses locations
city. city city, locatio
city.
image text in transcribed

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

Relational Database And Transact SQL

Authors: Lucy Scott

1st Edition

1974679985, 978-1974679980

More Books

Students also viewed these Databases questions

Question

Solve the following 1,4 3 2TT 5x- 1+ (15 x) dx 5X

Answered: 1 week ago