You have a table TSY.TABLE_RTF(rtf_id, rtf_category, rtf_descr, rtf_price) You do not want members of role CLERK see or modify the price. They also should not be able modify ID and Category. Their job is to search table by id or category and read/update the description. Provide trigger code to implement this scenario.
To implement the above scenario: Users have to create a role and then GRANT permission on that role.
CREATE ROLE clerk;
GRANT SELECT (rtf_id, rtf_category, rtf_descr), UPDATE (rtf_descr) on TSY.TABLE_RTF to CLERK
In the above command select(view) permission is granted on 3 columns only except rtf_price. Also, update permission is granted on rtf_descr column.
Like above you can also grant or deny INSERT and DELETE permission on a particular table
You have a table TSY.TABLE_RTF(rtf_id, rtf_category, rtf_descr, rtf_price) You do not want members of role CLERK...
1. Write an INSERT statement that adds this row to the Categories table: CategoryName: Brass Code the INSERT statement so SQL Server automatically generates the value for the CategoryID column. 2. Write an UPDATE statement that modifies the row you just added to the Categories table. This statement should change the Category Name column to “Woodwinds”, and it should use the CategoryID column to identify the row. 3.Write an INSERT statement that adds this row to the Products table: ProductID:...
1. This trigger is from Figure 16.2 of the text. Copy and run this trigger so it is created in the ap database. You can run the UPDATE below to test it. Notice two things. The error message appears as a pink screen just like a syntax error would. Also, if you then query the invoices table, the UPDATE statement did not execute. The trigger prevented the erroneous UPDATE from changing the data. DELIMITER // CREATE TRIGGER invoices_before_update BEFORE UPDATE...
Task 1: Use the HR schema to implement the following scenario. The megacorp company want to expand its operation to New Zealand (NZ) by establishing a new department “Research and Development” department ID “280” located in Auckland city. The new department has the location ID “3300”, address “AUT City Campus, WT Building” and postal code “1010”. You and 4 of your friends are hired to work in the new department as “IT_PROG”. This position comes with a salary package of...
Hi guys! I need some help with this Web Design mini project. Any
help will be appreciated a rated. Thanks in advance!
Here is the project: (It must be implemented using JSP and
MySQL) not PHP
I
need help with the code implementation!
Mini Facebook A. Description You are asked to implement a social network B. Requirements You are to implement a computer system with the following capabilities 1. User accounts including: sign up, login, and logout. 2. Each user...
You have been asked to create a query that will join the Production.Products table with the Production.Categories table. From the Products table show the product name and unit price. From the Categories table show the category name and description. For the query sort by two columns: first by category name in ascending order and then by unit price in descending order. Provide the full SQL statement for the answer. TSQLV4
You have made a career plan, networked with professionals in that field, undergone experiences, and acquired skill sets that would apply to the career path you have chosen. For the last several weeks, you have conducted a job search that has involved creating a resume, searching for jobs via job posting sites, networking, and perhaps attending a job fair. Now, all of your work has paid off and you have an interview scheduled for an entry-level position in a manufacturing...
PROGRAM DESCRIPTION Implement a hash table class. Your hash table should resolve collisions by chaining and use the multiplication method to generate hash keys. You may use your own linked list code from a previous assignment or you can use a standard sequence container. Partial definitions for the hash table class and a generic data class are provided (C++ and Java versions). You may use them as a starting point if you wish. If you choose to design your own...
Q2. The following unnormalized table named Employee. Transform
it to third normal form (3NF). You don’t need to provide the
process of normalizing the data, just include the final tables.
Table.
Table. Employee empl id first_name last_name job title email user role Administrator, 10158 Jane Ford IT Analystjford@sgi.sk.caBase_Employee, Systems Base Employee, BI_Power_User Systems Power User 10196 Lisa Duffy Medical Consult duffy@sgi.sk.ca Adie Noels Rand 10602 Sarah sadie@sgi.sk.ca Driver Examiner mnoels@sqi.sk.caBase Employee IT Architect 10615 10628 Mellissa Am Clerk 5 arand@sgi.sk.caCreative_Dev
Please provide a SQL Table diagram with their relationships based on the following prompt: Consider the design of a database for an online store. Each item is identified by a unique item ID, a title, a description of the item, the date the item is posted, price, and a list of categories (each category is a single word in lower cases). Only registered users can post, buy, and review an item. Each registered user is identified by a user ID,...
Using SQL, how do you update multiple rows (Task_system) to match (Task_name)? I want all task_system to say the letter "V" instead of "W" Notice how the id_numbers are different I want to be able to update all that say W to V throughout the whole table. Please and thank you. EX: ID_NUm task_system Task_name 1 w -System V 2 W -System V 5 W -System V 9 w -System V