Question

In: Computer Science

Database - Data Control Language    Exercise Write few system and object privileges. Create user with...

Database - Data Control Language   

Exercise

Write few system and object privileges.

Create user with your name and grant above discussed system and object privileges to the user created. Revoke update and select from the user which you have created.

Solutions

Expert Solution

System privileges allow users to perform a particular database operation or class of database operations. For example, in order to create a table, the user will require the create table privilege.

Also, the Objects have privileges associated with them, such as insert, update, and delete a table.

Create user with your name and grant system privileges to the user created.

CREATE USER user_name IDENTIFIED BY abcd1234; // abcd1234 is your password and can be anything
GRANT CONNECT, RESOURCE, DBA TO user_name;
GRANT CREATE SESSION GRANT ANY PRIVILEGE TO user_name;
GRANT UNLIMITED TABLESPACE TO user_name;
GRANT
  SELECT,
  INSERT,
  UPDATE,
  DELETE
ON
  schema.customer
TO
  user_name; // customer is your table
REVOKE ALL PRIVILEGES FROM user_name;

Create user with your name and grant object privileges to the user created.

First, create a new user called user_name and grant the CREATE SESSION to the user:

CREATE USER user_name IDENTIFIED BY abcd1234;  //abcd1234 -> can be any strong string and that will be your password 
GRANT CREATE SESSION TO user_name;

Second, grant the SELECT object privilege on the ot.customers table (or any table that you want to create) to the user_name user:

GRANT SELECT ON customers TO user_name;
REVOKE ALL PRIVILEGES FROM user_name;

Related Solutions

Write a GUI that allows the user to do the following: Create a new Patient Database...
Write a GUI that allows the user to do the following: Create a new Patient Database if it doesn’t exist yet by the click of a button. Create a second button that populates the database with the appropriate Asset table if it does not exist yet, and fill the table with at least 10 patients. Connect to the Patient Database and display all current patients in a List by default. You will have to create a Patient Class. This class...
Consider a multi-user system running a database server, with a role-based access control (RBAC) system. One...
Consider a multi-user system running a database server, with a role-based access control (RBAC) system. One role in this system is Database Developer, for those responsible for creating and populating new databases and database applications. A second role is Database Administrator, responsible for managing the configuration of the database server and database user accounts. Make two lists, one for each of these two roles, with names of permissions that might be assigned to each role. Be as specific as possible....
Database exercise: inpatient cases Create database using name RUMKIT Create tables below in that database patient(idPatient,...
Database exercise: inpatient cases Create database using name RUMKIT Create tables below in that database patient(idPatient, fullName, biologicalMother, birthdate, address) doctor(idDr, fullName, specialization, consulRates) inpatient(idPatient, entryTime, outTime, idDr, idRoom). Please make entryTime as column that is going to be filled automatically when care record is being add room(idRoom, roomName, cost) fill the data above to each table Create sql query and relational algebra expressions for the query Please give me detailed answer so I could learn from it. Thank you...
In this exercise, you will create a basic data management system for students in the Department...
In this exercise, you will create a basic data management system for students in the Department of Computer Science and Information Technology using the linked list. You must write two classes – Student class attached, and StudentChart. Student class consists of student data. StudentChart class contains a linked list of all students in the department. For this purpose, you must fulfill the following interfaces (note - fields of the objects should be marked as private). Class: Student chart Class of...
whats the purpose of the following: source data structure source database object metadata an Oracle Database...
whats the purpose of the following: source data structure source database object metadata an Oracle Database Module SQL Server Database ODBC Model Warehouse Builder ODBC module for SQL Server
Linux Create a simple 'user' file -user name, user id, some few other fields (at your...
Linux Create a simple 'user' file -user name, user id, some few other fields (at your discretion). Name it 'users'. Enter about 10 entries there. Create a simple 'user_data' file -user name, phone, address etc at your discretion.. User names in both files should match. So there would be 10 users in both files. You probably want to do these files as tab -separated, rather than space separated.
(JAVA) Create a program that creates a mini database of numbers that allows the user to:...
(JAVA) Create a program that creates a mini database of numbers that allows the user to: reset the database, print the database, add a number to the database, find the sum of the elements in the database, or quit. In main, you will declare an array of 10 integers (this is a requirement). Then you will define the following methods: • printArray (int[ ] arr) – this takes in an array and prints it • initArray (int[ ] arr) –...
Create a menu-based program that will allow the user to calculate the area for a few...
Create a menu-based program that will allow the user to calculate the area for a few different shapes: square, rectangle, parallelogram, and circle. Refer to the Sample Output in this document to see what menu options you should use. Create PI as a global constant variable. Main Function use do-while to repeat program until user chooses option 5 call the displayMenu function get user choice & validate with while loop depending on user’s choice, get the data required to calculate...
Create a menu-based program that will allow the user to calculate the area for a few...
Create a menu-based program that will allow the user to calculate the area for a few different shapes: square, rectangle, parallelogram, and circle. Refer to the Sample Output in this document to see what menu options you should use. Create PI as a global constant variable. Main Function use do-while to repeat program until user chooses option 5 call the displayMenu function get user choice & validate with while loop depending on user’s choice, get the data required to calculate...
Redesigning a database involves the process of reverse engineering a legacy database to create a data...
Redesigning a database involves the process of reverse engineering a legacy database to create a data model. There are a host of software tools available to assist with this process. Identify 2 separate tools that will reverse engineer an existing database. What database management systems (Microsoft SQL, Oracle, MySQL, DB2…) will this system work with (list all that apply)? Briefly describe how the tools work for reverse engineering an existing database and the output that the tool provides.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT