当前位置:网站首页>MySQL develops small mall management system
MySQL develops small mall management system
2022-07-04 09:42:00 【Stay a little star】
One 、MySQL workbench Use
1、 open MySQL workbench The main interface of can be seen
2、 Connect to the existing database ( For example, the local instance mysql 80)
The password when connecting is set during installation , You can only use this machine without designing a password , Fill in the pop-up interface sql After the connection information of the database, click “Test connection” Can test connection . After successful connection, skip to the following page .
Upper figure 124 Three areas are commonly used :
① Area 1“Navigator” Of “Administration” Are links to some common functions . and Schemas It's like a database , The database we will write later can be found in schemas see . The area in the figure above 1 What exists is the name of the database that has been created .
② Area 4 Displays the relevant information of the currently operated database and its tables
③ Area 2 For writing SQL, Conduct data operation, etc
3、 Create database
Click on schemas, Then right-click in the blank to select create schemas, In this way, you can create a new database , Fill in the database name and charset/collation I can click Apply To create (charset/collation Can be adjusted according to their own needs 、 I used it here utf-8 Of charset). As long as you don't report mistakes, you'll go all the way Apply That's it .
After success Navigator In the view
These files store tables separately 、 View 、 stored procedure 、 Method .
4、 Create a table
Right click tables choice create table You can create a new table
Fill in... In turn Table Name and charset、engine etc. ( frequently-used engine Yes InnoDB and MyISAM). After filling in the information of the entity, fill in the attribute information below :
PK:primary key Primary key
NN:not null Non empty
UQ:unique unique index
BIN:binary binary data ( Than text Bigger )
UN:unsigned Unsigned ( Nonnegative number )
ZF:zero fill fill 0 For example, the field content is 1 int(4), The content is displayed as 0001
AI:auto increment Self increasing
After selecting, click Apply, Automatically generate related sql Statement to create a table .
5、 Add data
stay Navigator Find the newly created table , Click the lightning sign to enter the data adding interface :
add to 、 Click... After making changes Apply You can save it to the database .
We'll use query Page to check the database we created and its saved data :
Got the data we just saved .yeah!
**** Some commonly used database operation instructions :
1、 Database operation
show databases; // List databases
use database_name // Use database_name database
create database data_name // Create a data_name The database of
drop database data_name // Delete one named data_name The database of
2、 Table operations
show tables // List all the tables
create talbe tab_name(id int(10) not null auto_increment primary key,name varchar(40),pwd varchar(40)) charset=gb2312; Create a file called tab_name New table of
drop table tab_name Delete the name tab_name Data sheet for
describe tab_name // The display name is tab_name The data structure of the table
show columns from tab_name // ditto
delete from tab_name // Will table tab_name The records in are cleared
select * from tab_name // Display table tab_name Records in
边栏推荐
- DR6018-CP01-wifi6-Qualcomm-IPQ6010-IPQ6018-FAMILY-2T2R-2.5G-ETH-port-CP01-802-11AX-MU-MIMO-OFDMA
- Global and Chinese markets of water heaters in Saudi Arabia 2022-2028: Research Report on technology, participants, trends, market size and share
- Write a jison parser from scratch (2/10): learn the correct posture of the parser generator parser generator
- PHP book borrowing management system, with complete functions, supports user foreground management and background management, and supports the latest version of PHP 7 x. Database mysql
- Log cannot be recorded after log4net is deployed to the server
- 2022-2028 global edible probiotic raw material industry research and trend analysis report
- The child container margin top acts on the parent container
- Write a jison parser from scratch (4/10): detailed explanation of the syntax format of the jison parser generator
- lolcat
- Global and Chinese market of air fryer 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢
2022-2028 global industry research and trend analysis report on anterior segment and fundus OTC detectors
ArrayBuffer
How web pages interact with applets
Hands on deep learning (34) -- sequence model
Hands on deep learning (35) -- text preprocessing (NLP)
自动化的优点有哪些?
How can people not love the amazing design of XXL job
Ultimate bug finding method - two points
2022-2028 global intelligent interactive tablet industry research and trend analysis report
回复评论的sql
随机推荐
mmclassification 标注文件生成
Daughter love: frequency spectrum analysis of a piece of music
C语言指针经典面试题——第一弹
AMLOGIC gsensor debugging
lolcat
Golang type comparison
If you can quickly generate a dictionary from two lists
How web pages interact with applets
Golang defer
Write a mobile date selector component by yourself
Function comparison between cs5261 and ag9310 demoboard test board | cost advantage of cs5261 replacing ange ag9310
How can people not love the amazing design of XXL job
Golang defer
Some points needing attention in PMP learning
Fabric of kubernetes CNI plug-in
Hands on deep learning (33) -- style transfer
Mmclassification annotation file generation
What are the advantages of automation?
Multilingual Wikipedia website source code development part II
[on February 11, 2022, the latest and most fully available script library collection of the whole network, a total of 23]