Graphic window operation database

Use the graphical window to operate the database: (use navicate to operate)
We use navicate, we need to download navicate in the window, after downloading, open, click on the connection and a window will pop up: the
Insert picture description here
user name and password are set when you configure the mysql database , IP is the ubuntu ip address in the virtual machine, check it through ifconfig

After the connection is successful, the current database will be displayed under the connection name.
Double-click to select the database, you can edit this database.
Next time you enter this software, double-click to complete the connection, edit operation

Database operation: create and delete
(1) Create a database
Right-click on the name of the connection, select New Database, a pop-up window, and follow the prompts to fill in
Insert picture description here
so that the database is built

(2) Delete operation of the database: right-click on the database and select delete database to complete the delete operation

Table operations in the graphical interface: Table operations, including commonly used create, delete, and modify operations.
When the database is highlighted, it indicates that the database is currently operating. You can create a table in the data.
One entity corresponds to one table and is used to store a specific structure. data
click the New table, pop-ups, follow the prompts to fill in the information, create a data table
Insert picture description here

The name of the primary key is generally id, set to int type, unsigned number, automatic growth (automatic growth means that the value of this field is maintained by the mysql system, no manual maintenance is required), and the non-empty
string varchar type needs to set the length, which is the most How many characters are included
Click on the Add field to add a new field
Click Save to define the name for the table

(3) Data operation-for the data operation in the
table, after the table is created successfully, you can see on the right side, double-click the table to open a new window
Insert picture description here
In this window, you can add, modify, and delete data (addition, deletion, and modification of data)

Commonly used to delete data: physical deletion and logical deletion
Physical deletion: is to completely delete the data from the database. Once the data is deleted, it cannot be retrieved. Physical deletion of
logical deletion is generally not recommended : generally for important data, an isDelete column is set , The type is bit, which means logical deletion—that is, to provide a flag for each data, and use this flag to judge the visibility of the
data. The importance of data needs to be determined according to actual development.

Published 129 original articles · Like 43 · Visits 100,000+

Guess you like

Origin blog.csdn.net/nbxuwentao/article/details/104417117