CIS 336 help Making Decisions/uophelp.com CIS 336 help Making Decisions/uophelp.com | Page 56
availability, high-demand environment is an advanced topic, study of which is outside the
scope of this course. Use the outline below to construct your script. Show all commands
in your answer sheet along with the output of the commands.
lock table customers write;
set foreign_key_checks = 0;
– Replace this comment with your ALTER TABLE command to add the auto_increment
feature to the PK field
set foreign_key_checks = 1;
unlock tables;
–statements to insert two rows into the table
–verify auto_increment with a select statement
2. The Vice President of Marketing for your firm wants the firm‘s sales representatives to
be able to directly view and edit customer details, but only for the state to which a
particular sales representative is assigned. You have suggested that this need can be
addressed with a view. For example, a view could be created for one particular state, and
user account permissions for accessing that view granted only to sales representatives
from that state. The VP has asked you to quickly create a simple proof-of-concept
demonstrating how this might work. Complete the following steps:
a. Construct a view on the customers table called CA_CUSTOMERS that consists of all
data about customers that live in California.
b. Display the data using this view to verify that only customers that reside in California
are visible.
c. Prove that It is possible to add or update records through this view by updating the
record for Karina Lacy to change the spelling of Karina‘s last name to Lacie.
d. Display the data using the customer table to verify that the change has been made.
Show all commands in your answer sheet along with the output of the commands.
3. The Senior Customer Service Manager has requested the ability to create a report at
any time that will show shipped orders that took some specified number of days to fulfill.