Question: can you make a sql query that would check to see if a user was a manager or a admin and then allow them to

can you make a sql query that would check to see if a user was a manager or a admin and then allow them to update the information of any
product given the storeID. Manager can only update the product information (number of
units, price per unit) of the store he/she manages. Product and ProductUpdates tables will
need to be updated accordingly if any updates take place. Manager and admins can also view the
information of last 5 recent updates of his/her store(s).
Product(table):storeID,productName,numberOfUnits,pricePerUnit(columns)
Productupdates(table):updateNumber,managerID,storeID,productName,updatedOn(columns)
users(tables):userID,name,password,latitude,longitude,type(columns)(types = customer, admin, and manager)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!