Difficulty: Easy
Correct Answer: CREATE SCHEMA
Explanation:
Introduction / Context:
When initializing a new application schema, it is helpful to create tables, views, and privileges together to ensure the database is left in a consistent state. SQL provides a statement that lets you bundle such DDL in one logical unit.
Given Data / Assumptions:
Concept / Approach:
The CREATE SCHEMA statement defines a schema and can include a set of subordinate DDL statements within it. This lets a database apply the set as one coherent definition. CREATE PACKAGE is a program unit construct in some vendors (not generic SQL for DDL grouping). CREATE CLUSTER is a storage/organization feature in certain engines, unrelated to bundling mixed DDL with grants.
Step-by-Step Solution:
Verification / Alternative check:
Standards and vendor docs show CREATE SCHEMA supporting contained CREATE TABLE/VIEW and GRANT, applying them as one schema definition unit.
Why Other Options Are Wrong:
Common Pitfalls:
Mixing transactional assumptions across engines; some databases auto-commit DDL, so use migration tools or explicit schema scripts for safe deployment.
Final Answer:
CREATE SCHEMA
Discussion & Comments