I have got a column of images in my MySQL database, but I would like to know what column flag I should use? (PK, NN, UQ, BIN, UN, ZF, AI) Or do they even matter?
Edit: maybe I should mention that it's a blob datatype
Thanks..
I have got a column of images in my MySQL database, but I would like to know what column flag I should use? (PK, NN, UQ, BIN, UN, ZF, AI) Or do they even matter?
Edit: maybe I should mention that it's a blob datatype
Thanks..
First: Understand what each flag means:
PK
: Primary key: Meant for primary keys (obviously, a BLOB can't be a PK)NN
: Not nullable: Is the field mandatory? If it is, use this flagUQ
: Unique: Forces a unique index on the column (again, not a good idea on a BLOB)BIN
: Binary: Stores strings as binary strings (not necesary for BLOB)UN
: Unsigned: Only non-negative numbers (could a BLOB be positive or negative?)ZF
: Zero-fill: Left-pad number values with zeros (do I really need to say anything related to BLOBs regarding this?)AI
: Auto-incremental (Do I really need to explain this?)