当前位置:网站首页>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
边栏推荐
- Deadlock in channel
- Svg image quoted from CodeChina
- Function comparison between cs5261 and ag9310 demoboard test board | cost advantage of cs5261 replacing ange ag9310
- Kotlin:集合使用
- MySQL foundation 02 - installing MySQL in non docker version
- 26. Delete duplicates in the ordered array (fast and slow pointer de duplication)
- PHP personal album management system source code, realizes album classification and album grouping, as well as album image management. The database adopts Mysql to realize the login and registration f
- C # use smtpclient The sendasync method fails to send mail, and always returns canceled
- IIS configure FTP website
- Global and Chinese market of sampler 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢
How do microservices aggregate API documents? This wave of show~
How web pages interact with applets
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
How can people not love the amazing design of XXL job
Pcl:: fromrosmsg alarm failed to find match for field 'intensity'
Markdown syntax
Latex download installation record
智能网关助力提高工业数据采集和利用
Kubernetes CNI 插件之Fabric
2022-2028 global edible probiotic raw material industry research and trend analysis report
随机推荐
品牌连锁店5G/4G无线组网方案
Flutter 小技巧之 ListView 和 PageView 的各種花式嵌套
UML sequence diagram [easy to understand]
Launpad | 基礎知識
回复评论的sql
Summary of the most comprehensive CTF web question ideas (updating)
The child container margin top acts on the parent container
ArrayBuffer
Tkinter Huarong Road 4x4 tutorial II
Leetcode (Sword finger offer) - 35 Replication of complex linked list
If you can quickly generate a dictionary from two lists
2022-2028 global elastic strain sensor industry research and trend analysis report
26. Delete duplicates in the ordered array (fast and slow pointer de duplication)
2022-2028 global small batch batch batch furnace industry research and trend analysis report
Daughter love: frequency spectrum analysis of a piece of music
Golang Modules
Fatal error in golang: concurrent map writes
Solution to null JSON after serialization in golang
"How to connect the Internet" reading notes - FTTH
Global and Chinese market of air fryer 2022-2028: Research Report on technology, participants, trends, market size and share