Recall & Review
beginner
What does the INT data type represent in SQL?
INT is used to store whole numbers without decimals, like 1, 100, or -50.
Click to reveal answer
intermediate
How is VARCHAR different from CHAR in SQL?
VARCHAR stores variable-length text, saving space by only using what is needed, while CHAR always uses fixed length, padding with spaces if needed.
Click to reveal answer
beginner
What kind of data does the DATE type store?
DATE stores calendar dates in the format YYYY-MM-DD, like 2024-06-01.
Click to reveal answer
intermediate
Explain the DECIMAL data type and when to use it.
DECIMAL stores numbers with exact precision and scale, useful for money or measurements where decimals matter, like 10.99 or 123.456.
Click to reveal answer
intermediate
Why choose VARCHAR(50) instead of VARCHAR(255)?
Choosing VARCHAR(50) limits text to 50 characters, saving storage and improving speed if you know data won't be longer than 50 characters.
Click to reveal answer
Which data type should you use to store a person's age?
✗ Incorrect
Age is a whole number, so INT is the best choice.
What is the maximum length of text stored in VARCHAR(100)?
✗ Incorrect
VARCHAR(100) can store up to 100 characters.
Which data type is best for storing a birthdate?
✗ Incorrect
DATE stores calendar dates like birthdates.
If you need to store a price like 19.99, which data type is best?
✗ Incorrect
DECIMAL stores numbers with decimals accurately.
What happens if you store text longer than VARCHAR(50) in a VARCHAR(50) column?
✗ Incorrect
Most SQL systems reject or error if text exceeds VARCHAR length.
Describe the main differences and uses of INT, VARCHAR, DATE, and DECIMAL data types in SQL.
Think about what kind of data each type holds and why.
You got /4 concepts.
Explain why choosing the right column data type matters when designing a database.
Consider how data type affects space and correctness.
You got /4 concepts.