建立數據庫
第一步:
第二步:
第三步:
如圖彈出彈框,繼續點擊Apply按鈕,最后點擊Finish按鈕完成數據庫的建立
創建表與添加字段
雙擊!!! 一下剛剛建立好的數據庫,然后再創建表,不然會出錯,右鍵點擊Tables 然后點擊Create new tables ,填寫表名,以及字段的信息,之后點擊 apply ,一張表就建完了。
PK: primary key (column is part of a pk) 主鍵
NN: not null (column is nullable) 是否為空
-UQ: unique (column is part of a unique key) 外鍵
AI: auto increment (the column is auto incremented when rows are inserted) 自動增加
BIN: binary (if dt is a blob or similar, this indicates that is binary data, rather than text) 二進制
UN: unsigned (for integer types, see docs: “10.2. Numeric Types”)
-ZF: zero fill (rather a display related flag, see docs: “10.2. Numeric Types”)