Question: use BikeStores; - - 1 ) Create a view named CUSTOMER _ OPEN _ ORDERS. It consists of the customer id , last name, first
use BikeStores;
Create a view named CUSTOMEROPENORDERS. It consists of the customer id last name, first name, zip code, and order id for every customer that has an open order. HINT: use order status from the orders table to accomplish this. Pending; Processing; Rejected; and Completed. You'll want to include the rows with and values in this view.
What are ways a view can increase security in a production system? Include your answer in a comment here, making sure to include sufficient explanation to show your understanding.
Create a command using the CUSTOMEROPENORDERS view to retrieve the customer last name, zip code and balance where the zip code is in New York. Hint the first three digits of New York ZIP Codes are So you'll need to use a LEFT function using the first three digits of the ZIP Code to accomplish this.
Create view named PRODUCTSUMMARY that returns product ID productname, category name, and brand name. You will need to join three tables: categories, products, and brands to accomplish this.
Create a query of your new view that lists all the records from the PRODUCTSUMMARY view where the product ID is
Write but do not execute a command to give hypothetical user John permission to retrieve data from the productsummary view.
Create a query that allows hypothetical users Sally and Mary the permission to add new categories to the Categories table.
Users John, Sally and Mary must be able to update the orderstatus in the Orders table. Create a query that gives them permissions.
Create an Index on the Order Date field of the Orders table.
Going forward, we will only deliver to Texas, California, New York and New Jersey. Make sure that the customers' addresses are in one of these states by adding a check constraint to our view.
to test your constraint, try to execute the following insert statement you should get an error!
insert into customersfirstname, lastname, phone, email, street, city, state, zipcode
values Lisa'Thoendel','emthoendel@mccneb.edu', Giles Road','LaVista',NE;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
