In Snowflake, which statement correctly describes the relationship between databases and schemas?
Think about how folders and subfolders work on your computer.
In Snowflake, a database is like a main folder that holds multiple schemas, which are like subfolders. Each schema then contains tables.
Which Snowflake SQL command correctly creates a schema named sales_data inside the database company_db?
Remember the syntax for creating schemas inside a database.
The correct syntax to create a schema inside a specific database is CREATE SCHEMA schema_name IN DATABASE database_name;
You have multiple teams working on different projects. Which Snowflake structure best isolates data for security and management?
Think about isolating data for security and easier management.
Using multiple databases per team provides better isolation and control over access and resources compared to using schemas alone.
Which SQL command grants the role analyst_role usage rights on the schema marketing in the database company_db?
Usage on schema allows access to objects inside it without giving full database rights.
Granting USAGE on a schema allows the role to access objects inside the schema without granting full database privileges.
What happens when you run DROP SCHEMA company_db.sales_data; if the schema contains tables and views?
Think about safety measures to prevent accidental data loss.
Snowflake requires schemas to be empty before dropping. If objects exist, the drop command fails.