A data analyst is creating a sales fact table that is expected to grow to roughly 1.9 billion rows over the next few years. The DBMS offers the standard SQL integer types SMALLINT (2 bytes), INT (4 bytes) and BIGINT (8 bytes). Management has asked for the smallest numeric data type that can still uniquely identify every future row with a non-negative, whole-number surrogate key. Which data type should the analyst choose for the key column?
INT stores whole numbers using 4 bytes and has a signed range of β2,147,483,648 to 2,147,483,647, so it can accommodate more than 2 billion positive values-enough for the projected 1.9 billion rows-while using half the storage of BIGINT. SMALLINT's maximum of 32,767 is much too small, and DECIMAL(10,0) also covers the range but consumes extra bytes and precision that are unnecessary for a simple integer key. Therefore, INT is the most space-efficient choice that still meets the requirement.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Why is INT the most appropriate choice for the surrogate key in this scenario?
Open an interactive chat with Bash
What is the difference in storage between INT and BIGINT?
Open an interactive chat with Bash
Why is DECIMAL(10,0) not suitable for this key column?
Open an interactive chat with Bash
CompTIA Data+ DA0-002 (V2)
Data Concepts and Environments
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .