A beginner's database, a record of what you've learned. I used the MySQL database to manage with MySQL Workbench. Here's a quick introduction to using MySQL Workbench to build a database, create a new table, and add data to a table.
Click on the "Plus" icon to create a new connection,
For example, first enter the database account password, account default is root, fill in the Password and click "OK", the connection is established, after the completion of the establishment, there will be a rectangular box, double-click it, appear the page shown
Click the button in the red circle in the image to create a new schema, the database (personal understanding). ), modify the value of name, such as MyDatabase, click Apply, then point to apply, then click Finish as shown
The database is built!!!
The next step is how to create a table
First to be!!! Double click!!! Just set up the database MyDatabase, and then create the table, otherwise it will be wrong, right click on tables and then click Create New tables, fill in the table name, and the table column information, then click Apply, a table is completed
Pk:primary Key (column is part of a PK) primary key
Nn:not Null (column is nullable) is empty
-uq:unique (column is part of a unique key) foreign key
Ai:auto Increment (the column is auto incremented if rows are inserted) automatically increases
Bin:binary (if DT is a blob or similar, this indicates is binary data, rather than text) binary
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 ")
The following page appears
Next, add data to the built-in tb_student table.
Right-click Tb_student, and then click Select Rows Limit 1000
Adding data to a table in a database is roughly what it looks like in MySQL Workbench.
There is nothing wrong with the above, but also ask the great God for advice.
Use MySQL workbench to build a database, create a new table, add data to a table