A Guide to SQL
9th Edition
ISBN: 9781111527273
Author: Philip J. Pratt
Publisher: Course Technology Ptr
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 7, Problem 4TD
Write, but do not execute, the commands to grant the following privileges:
- a. User Ashton must be able to retrieve data from the ITEM table.
- b. Users Kelly and Morgan must be able to add new orders and order lines.
- c. User James must be able to change the price for all items.
- d. User Danielson must be able to delete customers.
- e. All users must be able to retrieve each customer’s number, name, street, city, state, and postal code.
- f. f User Pere7 must be able to create an index on the ORDFRS table.
- g. User Washington must be able to change the structure of the ITEM table.
- h. User Grinstead must have all privileges on the ORDERS table.
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
Which of the following statement(s) is(are) correct? Group of answer choices Both a. and b. Neither a. nor b. a. The default cut-off value in two-class classifiers is 0.5. b. The cut-off value can be adjusted to accept more records in high value class and to accept more misclassification errors where the misclassification error is low.
Which result set requires a JOIN?
a.)
Showing all album titles with artist IDs
b.)
Showing all album titles with artists' names
c.)
Showing all artist names with artist IDs
d.)
Showing all album titles with both artist ID and album ID
Task 4:
The Development team of InstantStay wants to ensure that all email data of the users are lowercase. Otherwise, their login system could have problems finding the users. Therefore, they want you to ensure that each email in the table will always be lowercase after a new user is added. Create a TRIGGER called email_insert that will SET new email addresses to lowercase and run before new emails are added to the USERS table.
Task: Create a TRIGGER to ensure all new email address are lowercase
(SQL Database Test): Create a TRIGGER when adding new email to enforce a lowercase standard
(SQL Database Test): The TRIGGER converts new emails to a lowercase format
Chapter 7 Solutions
A Guide to SQL
Ch. 7 - What is a view?Ch. 7 - Which command creates a view?Ch. 7 - Prob. 3RQCh. 7 - What happens when a user retrieves data from a...Ch. 7 - What are three advantages of using views?Ch. 7 - Which command deletes a view?Ch. 7 - Prob. 8RQCh. 7 - Which command terminates previously granted...Ch. 7 - Prob. 10RQCh. 7 - How do you create an index? How do you create a...
Ch. 7 - Prob. 12RQCh. 7 - Does the DBMS or the user make the choice of which...Ch. 7 - Describe the information the DBMS maintains in the...Ch. 7 - The CUSTOMER table contains a foreign key,...Ch. 7 - Prob. 16RQCh. 7 - Prob. 17RQCh. 7 - Prob. 18RQCh. 7 - Prob. 19RQCh. 7 - When would you usually specify primary key...Ch. 7 - Prob. 21RQCh. 7 - Prob. 22RQCh. 7 - Prob. 23RQCh. 7 - Use SQL to make the following changes to the TAL...Ch. 7 - Create a view named ITEM_ORDER. It consists of the...Ch. 7 - Create a view named ORDER_TOTAL. It consists of...Ch. 7 - Write, but do not execute, the commands to grant...Ch. 7 - Prob. 5TDCh. 7 - Perform the following tasks: a. Create an index...Ch. 7 - Delete the index named ITEM_INDEX3.Ch. 7 - Write the commands to obtain the following...Ch. 7 - Prob. 9TDCh. 7 - Prob. 10TDCh. 7 - Toys Galore currently has a credit limit of 7,500....Ch. 7 - Use SQL to make the following changes to the...Ch. 7 - Create a view named RESERVATION_CUSTOMER. It...Ch. 7 - Create a view named TRIP_INVENTORY. It consists of...Ch. 7 - Write, but do not execute, the commands to grant...Ch. 7 - Prob. 5CATCh. 7 - Create the following indexes: a. Create an index...Ch. 7 - Prob. 7CATCh. 7 - Write the commands to obtain the following...Ch. 7 - Prob. 9CATCh. 7 - Ensure that the only legal values for the TYPE...Ch. 7 - Prob. 11CATCh. 7 - Use SQL to make the following changes to the...Ch. 7 - Create a view named CONDO_OWNERS. It consists of...Ch. 7 - Create a view named CONDO_FEES. It consists of two...Ch. 7 - Write, but do not execute, the commands to grant...Ch. 7 - Prob. 5SCGCh. 7 - Prob. 6SCGCh. 7 - Delete the OWNER_INDEX 3 index from the OWNER...Ch. 7 - Write the commands to obtain the following...Ch. 7 - Prob. 9SCGCh. 7 - Ensure that the only legal values for the BDRMS...Ch. 7 - Prob. 11SCG
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
Leap Year Detector Design a program that asks the user to enter a year, and then displays a message indicating ...
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
A magic number is _______. a. a number that is mathematically undefined b. an unexplained value that appears in...
Starting Out with Python (4th Edition)
The ____________ is always transparent.
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
How does a computers main memory differ from its auxiliary memory?
Java: An Introduction to Problem Solving and Programming (7th Edition)
Computers can do many different jobs because they can be_____.
Starting Out with C++: Early Objects (9th Edition)
Convert each of the following binary representations to its equivalent base ten form: a. 101010 b. 100001 c. 10...
Computer Science: An Overview (12th Edition)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Execute a command that undoes the previous deletion.arrow_forwardThe SERVICE_REQUEST table uses the CHAR data type for the DESCRIPTION and STATUS fields. Is there an alternate data type that could be used to store the values in these fields? Justify your reason for choosing an alternate data type or for leaving the data type as CHAR.arrow_forwardWhich of the following is a correct statement? a. A commit is issued implicitly when a user exits SQL Developer or SQLPlus. b. A commit is issued implicitly when a DDL command is executed. c. A commit is issued automatically when a DML command is executed. d. All of the above are correct. e. Both a and b are correct. f. Both a and c are correct.arrow_forward
- Write and execute the command to retrieve the item ID, description, invoice number, and quoted price for all invoices in the ITEM_INVOICE VIEW for items with a quoted prices that exceed $100. I have been trying this solution and it is incorrect: SELECT i.item_id, i.description, l.invoice_num, l.quoted_priceFROM item iINNER JOIN invoice_line l ON i.item_id = l.item_idWHERE i.item_id IN ( SELECT item_id FROM item_invoice WHERE quoted_price > 100);arrow_forward01.q. Give some more detail about the differences between DROP, DELETE, and TRUNCATE commands clearly?.arrow_forwardWrite a script that creates and calls a stored procedure named spInsertDepartment. First, code a statement that creates a procedure that adds a new row to the Departments table. To do that, this procedure should have one parameter for the department name. Code at least two EXEC statements that test this procedure. (Note that this table does not allow duplicate department names.)arrow_forward
- Which of the following statements DOES NOT delete the last value in the list lst? a) 1st.pop( b) 1st.remove(-1) c) 1st = lst[:-1] d) 1st.pop(len(lst)-1)arrow_forwardwrite step - by - step command CREATE BELOW TABLE CREATE TABLE empl (month INT, emp VARCHAR (15), dept VARCHAR (15), salary INT); INSERT INTO empl VALUES (1, "Oliver", "HR", 9000), (1, "George", "IT", 8000), (3, "Harry", "HR", 20000), (6, "Jack", "IT", 110123), (6, "Jacob", "SALES", 3000), (12, "Noah", "SALES", 101000), (12, "Charlie", "IT", 123456); 1.Count total no of Employee 2.Find the lowest salaries in each dept 3.Find month-wise maximum salaries 4.Find the sum all employee salaries 5.Find the AVG of salaries in each deptarrow_forwardCreate a trigger named InstructorInsertSalaryTR that fires when a new row is added to the Instructors table. Throw an error when multiple rows are inserted. When there is only one row inserted, validate that the AnnualSalary value is positive (strictly greater than zero) and less than or equal to 120000. Throw an error with appropriate message if the salary value is negative or too big. Also, if the salary value is between 0 and 10000, assume that there was a mistake of entering monthly salary instead of annual salary, and multiply the salary value by 12. For example, if the new value of the salary is 5000, it should be changed to 60000. No need to validate any other data from the inserted row. Test the trigger with appropriate INSERT statements. There should be four cases: 1) with negative salary, 2) with positive salary <= 10000, 3) with salary greater that 10000 and less than or equal to 120000, and 4) with salary > 120000.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageA Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology Ptr
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
dml in sql with examples; Author: Education 4u;https://www.youtube.com/watch?v=WvOseanUdk4;License: Standard YouTube License, CC-BY