0
0
MySQLquery~5 mins

BLOB and binary types in MySQL - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does BLOB stand for in MySQL?
BLOB stands for Binary Large Object. It is used to store large amounts of binary data like images or files.
Click to reveal answer
intermediate
Name the four BLOB types in MySQL and their maximum storage sizes.
The four BLOB types are:<br>1. TINYBLOB - up to 255 bytes<br>2. BLOB - up to 65,535 bytes (64 KB)<br>3. MEDIUMBLOB - up to 16,777,215 bytes (16 MB)<br>4. LONGBLOB - up to 4,294,967,295 bytes (4 GB)
Click to reveal answer
intermediate
What is the difference between BINARY and VARBINARY types in MySQL?
BINARY stores fixed-length binary data, padding with zeros if needed.<br>VARBINARY stores variable-length binary data without padding.
Click to reveal answer
beginner
When should you use BLOB types instead of TEXT types in MySQL?
Use BLOB types when you need to store binary data like images or files.<br>Use TEXT types for storing text data.
Click to reveal answer
intermediate
How does MySQL treat BLOB data differently from character data?
MySQL treats BLOB data as raw bytes without character set or collation.<br>Character data is stored with encoding and collation rules.
Click to reveal answer
Which MySQL data type is best for storing a small image file?
ATEXT
BBLOB
CVARCHAR
DINT
What is the maximum size of a MEDIUMBLOB in MySQL?
A4 GB
B64 KB
C255 bytes
D16 MB
Which binary type stores fixed-length data padded with zeros if needed?
AVARBINARY
BTEXT
CBINARY
DBLOB
How does MySQL treat BLOB data compared to TEXT data?
ABLOB stores raw bytes, TEXT stores encoded characters
BBLOB is case-insensitive, TEXT is case-sensitive
CBLOB stores text, TEXT stores binary
DBoth are treated the same
Which BLOB type can store the largest amount of data?
ALONGBLOB
BBLOB
CMEDIUMBLOB
DTINYBLOB
Explain the differences between BINARY, VARBINARY, and BLOB types in MySQL.
Think about length and size differences and what kind of data each stores.
You got /4 concepts.
    Describe when and why you would choose a BLOB type over a TEXT type in a MySQL database.
    Consider the type of data you want to store and how MySQL treats it.
    You got /4 concepts.