
Answer-first summary for fast verification
Answer: DESCRIBE DATABASE customer360;
The correct answer is **C. DESCRIBE DATABASE customer360;** because: 1. **DESCRIBE DATABASE** command in Spark SQL/Databricks shows detailed information about a database including its location, comment, and properties. 2. When you run `DESCRIBE DATABASE customer360;`, it displays the database metadata including the `Location` field which shows the HDFS or cloud storage path where the database is stored. 3. The other options are incorrect: - **A. DESCRIBE LOCATION customer360;** - There is no such command as `DESCRIBE LOCATION` in Spark SQL - **B. DROP DATABASE customer360;** - This would delete the database, not show its location - **D. ALTER DATABASE customer360 SET DBPROPERTIES ('location' = '/user');** - This sets a property but doesn't return the current location - **E. USE DATABASE customer360;** - This switches to the database but doesn't display its location **Example output of DESCRIBE DATABASE:** ``` Database Name: customer360 Description: Location: dbfs:/user/hive/warehouse/customer360.db Properties: ```
Author: Keng Suppaseth
Ultimate access to all questions.
Which of the following commands will return the location of database customer360?
A
DESCRIBE LOCATION customer360;
B
DROP DATABASE customer360;
C
DESCRIBE DATABASE customer360;
D
ALTER DATABASE customer360 SET DBPROPERTIES ('location' = '/user');
E
USE DATABASE customer360;
No comments yet.