Difficulty: Easy
Correct Answer: All of the above.
Explanation:
Introduction / Context:
Creating a robust table schema is critical for data integrity and efficiency. Choices made during CREATE TABLE strongly influence validation, storage, query performance, and application correctness.
Given Data / Assumptions:
Concept / Approach:
Data types constrain the shape of values and impact storage and function semantics. Primary keys uniquely identify rows and are the basis for relationships and indexing. Default values prevent NULLs or missing values where appropriate and standardize behavior for inserts without explicit column values.
Step-by-Step Solution:
Verification / Alternative check:
Review any well-designed schema; you will find types, keys, and often defaults specified to enforce constraints and usability.
Why Other Options Are Wrong:
Common Pitfalls:
Deferring primary key decisions or overusing broad types (like text for everything) can degrade integrity and performance. Inconsistent defaults can create ambiguous data states.
Final Answer:
All of the above.
Discussion & Comments