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

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 c
1
,
c
2
,
c
3
,
c
4
,
c
5.
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.emp
s
p
sp
part_structurespj
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.emp
s
p
sp
part_structure
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

Students also viewed these Databases questions

Question

Have I incorporated my research into my outline effectively?

Answered: 1 week ago