Database Administration With SQL – Quizz

For each question below, select the best answer. To select the best answer, click on the circle located on the left of this answer. When all questions are answered, click on the Submit button

Question 1

In the case the database is installed on the same computer as the one used by the administrator, which of the following you can give as a database server’s address?:
localhost.
local.
host.
you leave the database server’s address empty.

Question 2

Which of the following syntax is correct?:
CREATE USER 'arjunj'@'localhost' IDENTIFIED WITH 'helloThisIsMyPassword!';
CREATE USER 'arjunj'@'localhost' IDENTIFIED BY 'helloThisIsMyPassword!';
CREATE USERNAME 'arjunj'@'localhost' IDENTIFIED BY 'helloThisIsMyPassword!';
CREATE USERNAME 'arjunj' SERVER 'localhost' IDENTIFIED BY 'helloThisIsMyPassword!';

Question 3

To add the right to insert table CLIENTS on all databases located on the server, you use (choose the best answer):
GRANT INSERT ON *.* TO 'arjunj'@'localhost'
GRANT INSERT ON CLIENTS.* FOR 'arjunj'@'localhost'
GRANT INSERT ON *.CLIENTS TO 'arjunj'@'localhost'
GRANT INSERT ON CLIENTS.* TO 'arjunj'@'localhost'

Question 4

Which of the following statements lets the user select, delete and insert on the clients table?:
GRANT UPDATE, DELETE, INSERT ON marketing.clients TO 'arjunj'@'localhost'
GRANT UPDATE, DELETE, INSERT ON marketing.clients FOR 'arjunj'@'localhost'
GRANT SELECT, DELETE, INSERT ON marketing.clients TO 'arjunj'@'localhost'
REVOKE SELECT, DELETE, INSERT ON marketing.clients TO 'arjunj'@'localhost'

Question 5

Which of the following statements will not let the user select, delete and insert on the clients table (assuming that previously he had no right)?:
GRANT UPDATE, SELECT, DELETE, INSERT ON marketing.clients TO 'arjunj'@'localhost'
GRANT ALL ON marketing.clients FOR 'arjunj'@'localhost'
GRANT UPDATE, DELETE, INSERT ON marketing.* FOR 'arjunj'@'localhost'
GRANT UPDATE, SELECT, DELETE, INSERT ON marketing.* FOR 'arjunj'@'localhost'

Question 6

What is the DROP USER command doing (select the best answer)?:
Revokes all the rights from a user.
Clones a user.
Takes off the user from the database’s list of users.
Reset the user’s password.

Question 7

Which of the following syntax is correct?:
SET PASSWORD FOR 'jarjun'@'localhost' = PASSWORD('helloWorld123')
SET PASSWORD='helloWorld123' FOR 'jarjun'@'localhost'
SET PASSWORD='helloWorld123' WHERE 'jarjun'@'localhost'
SET PASSWORD FOR USER 'jarjun'@'localhost' = PASSWORD('helloWorld123')

 

 

Once you have completed the quiz, calculated your score and reviewed your answers, I invite you to go to the next lesson: Index, Unique Key, Primary Key.
 
Share on:

Something not clear? Ask your question here:

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 
 

Author:
Last udpated: September 10, 2017
Created: September 2, 2014