In MySQL Workbench, column flags can be used with a column to maintain integrity. The column flags are as follows − PK − Primary Key. NN − NOT NULL. BIN − Binary.
mysql flags are used by the compiler and set the enviroment you wish to work in.
Red colored: (Part of) Foreign key. Blue lined Diamond: Simple attribute (no key)
UN : unsigned (for integer types)
PK - Primary Key
NN - Not Null
BIN - Binary (stores data as binary strings. There is no character set so sorting and comparison is based on the numeric values of the bytes in the values.)
UN - Unsigned (non-negative numbers only. so if the range is -500 to 500, instead its 0 - 1000, the range is the same but it starts at 0)
UQ - Create/remove Unique Key
ZF - Zero-Filled (if the length is 5 like INT(5) then every field is filled with 0’s to the 5th digit. 12 = 00012, 400 = 00400, etc. )
AI - Auto Increment
G - Generated column. i.e. value generated by a formula based on the other columns
Here is the source of these column flags
http://dev.mysql.com/doc/workbench/en/wb-table-editor-columns-tab.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With