DS0-001 practice question 14 of 15

A new retail store employee needs to be able to authenticate to a database. Which of the following commands should a database administrator use for this task?

Full set: 80 questions
Answer options
A: INSERT USER
B: ALLOW USER
C: CREATE USER Correct answer
D: ALTER USER
Correct Answer:
C. CREATE USER
Explanation

The CREATE USER command is the standard Data Control Language (DCL) statement used in most SQL-based database management systems to establish a new user account. This command allows a database administrator to define a new user's identity (username) and configure their authentication credentials, such as a password. Creating the user account is the essential first step before the new employee can authenticate to the database and be granted any necessary permissions.

Why Incorrect

A. INSERT USER: This is not a valid standard SQL command for user creation. User accounts are managed via specific DCL statements, not by directly inserting rows into system tables.
B. ALLOW USER: This is not a standard SQL command. Access control and permissions are typically managed with the GRANT and REVOKE commands after a user has been created.
D. ALTER USER: This command is used to modify the properties of an existing user account, such as changing a password or default settings. It cannot be used to create a new user.

References

1. Oracle Database SQL Language Reference

19c. (2023). CREATE USER. Oracle Corporation. Retrieved from Oracle Help Center.

Reference: In the "Purpose" section for the CREATE USER statement

it explicitly states

"Use the CREATE USER statement to create and configure a database user

which is an account through which you can log in to the database."

2. PostgreSQL 15 Documentation. (2023). Chapter 22. Database Roles

Section 22.2. Role Attributes. The PostgreSQL Global Development Group.

Reference: The documentation explains that CREATE USER is an alias for CREATE ROLE

but with the LOGIN privilege assumed by default. It states

"PostgreSQL manages database access permissions using the concept of roles... A role can be thought of as either a database user

or a group of database users..."

3. MySQL 8.0 Reference Manual. (2023). Section 13.7.1.3

CREATE USER Statement. Oracle Corporation.

Reference: The manual specifies

"The CREATE USER statement creates new MySQL accounts. To use it

you must have the global CREATE USER privilege or the INSERT privilege for the mysql database."

4. Ramakrishnan

R.

& Gehrke

J. (2003). Database Management Systems (3rd ed.). McGraw-Hill.

Reference: Chapter 5

"SQL: Queries

Constraints

Triggers

" and sections covering database security typically describe Data Control Language (DCL). Standard DCL includes GRANT

REVOKE

and commands for creating users/roles

universally represented by the concept behind CREATE USER.

Scroll to Top