当前位置:网站首页>Mysql database literacy, do you really know what a database is
Mysql database literacy, do you really know what a database is
2022-06-28 12:59:00 【51CTO】

One 、 What is a database
database (DataBase,DB) Is a long-term storage in the computer 、 organized 、 Shared 、 Data collection under unified management . It is a computer software system that stores and manages data according to data structure . Database has two meanings : The one who keeps the data “ Warehouse ”, And the methods and techniques of data management .
Two 、 What stage has the database gone through in its development
The development of database can be roughly divided into the following stages : Manual management stage 、 File system phase 、 Database system phase 、 Advanced database stage .
3、 ... and 、 What are the characteristics of the database
The database is characterized by : Implement data sharing , Reduce data redundancy ; Use a specific data type ; High data independence ; With unified data control function .
Four 、 What are the tables in the database
In a relational database , A two-dimensional database is a set of tables , A logical structure used to store and manipulate data . It consists of vertical columns and horizontal rows .
Rows are called records , It's the unit that organizes the data ;
Columns are called fields , Each column represents an attribute of the record , There is corresponding description information , Such as data type 、 Data width, etc .
5、 ... and 、 What is the data type in the database
The data type determines the storage format of data in the computer , Represents different types of information . Commonly used data types are integer data types 、 Floating point data type 、 Exact decimal type 、 Binary data type 、 date / Time data type 、 String data type .
6、 ... and 、 What is a primary key
Primary key (Primary Key) Also known as the main code , Used to uniquely identify each record in the table . You can define one or more columns in a table as the primary key , On the primary key column There can be no two lines of the same value , Can't be null .
7、 ... and 、 What is the technical composition of the database
The database system consists of hardware part and software part . Hardware is mainly used to store data in the database , Including computers 、 Storage devices, etc .
The software part mainly includes DBMS、 Support DBMS The operating system running , And support the access technology of multi language application development .
8、 ... and 、sql What kinds of languages are there
(1) Data definition language (DDL):DROP、CREATE、ALTER Such statements .
(2) Data operation language (DML):INSERT( Insert )、UPDATE( modify )、DELETE( Delete ) sentence .
(3) Data query language (DQL):SELECT sentence .
(4) Data control language (DCL):GRANT、REVOKE、COMMIT、ROLLBACK Such statements .
For example, we use CREATE To create a table ;
The above command means , Create a name called YUNWEIJIA Table of , There are two fields , Namely ID and NAME, among ID It's the primary key ,NAME The length of cannot exceed 30;
Let's insert a piece of data into the new table ;
Then we insert a piece of data into our database ;
Reuse SELECT To view the contents of this database ;
Running results :

Nine 、 Database provider
Different programming languages have different database access interfaces , Programming languages execute through these interfaces SQL sentence , Database management . The main database access interfaces are ODBC、JDBC、ADO.NET and PDO.
ODBC
ODBC(Open Database Connectivity, Open database connection ) Technology for accessing different SQL Databases provide a common interface .ODBC Use SQL As a standard for accessing data . This interface provides maximum interoperability : An application can access different SQL Database management system (DBMS).
One is based on ODBC The application does not depend on any DBMS, Not directly with DBMS Dealing with , All database operations are performed by the corresponding DBMS Of ODBC Driver complete . in other words , Whether it's Access、MySQL still Oracle database , All available ODBC API Visit . thus it can be seen ,ODBC The biggest advantage of is that it can handle all databases in a unified way .
JDBC
JDBC(Java Data Base Connectivity,Java Database connection ) be used for Java A standard way for applications to connect to a database , It's one for execution SQL Of the statement Java API, It can provide unified access for a variety of relational databases , By a group Java Language written classes and interfaces .
ADD.NET
ADO.NET It's Microsoft. .NET A set of object-oriented class libraries developed and designed under the framework for interacting with data sources .ADO.NET Provides a pair of relational data 、XML And access to application data , Allow interaction with different types of data sources and databases .
PDO
PDO(PHP Data Object) by PHP Accessing the database defines a lightweight 、 A consistent interface , Provides a data access abstraction layer . such , Whatever database you use , You can query and get data through consistent functions .
Ten 、 What are the components of a database system
- database : A place for storing data .
- Database management system : Software for managing databases .
- Database management system : Software for managing databases .
database
A database may contain many files , A database system usually contains many databases .
Database management system (DBMS)
It's user creation 、 The software used to manage and maintain a database , Between the user and the operating system , Unified management of the database .DBMS Can define data storage structure , The operation mechanism of providing data , Maintain database security 、 Integrity and reliability .
Database applications
The use of database application can meet the higher requirements of data management , It can also make the data management process more intuitive and friendly . The database application is responsible for working with DBMS communicate , Access and management DBMS Data stored in , Allow users to insert 、 modify 、 Delete DB Data in .

11、 ... and 、mysql How to understand
MySQL Is a small relational database management system . With other large database management systems ( for example Oracle、DB2、SQL Server etc. ) comparison ,MySQL Small scale 、 Limited function , But it's small 、 Fast 、 The cost is low , And the functions provided are enough for slightly complex applications , These characteristics make MySQL Become the world's most popular open source database .
Twelve 、mysql The version is mainly divided into why
-
MySQL Community Server( Community server ): This version is completely free , But the government doesn't provide technical support . -
MySQL Enterprise Server( Enterprise server ): It can provide data warehouse applications for enterprises with high cost performance , Support ACID Business Handle , Provide complete submission 、 Roll back 、 Crash recovery and row level locking . But this version needs to be used for a fee , Official telephone technical support .
- MySQL 8.0 Is the latest development of stable (GA) Release series , Is a series that will perform new functions ;
- MySQL 8.0 It's more stable (GA) Release series . Re release only for vulnerability repair , There are no new features that will affect stability .
- MySQL 5.7 It's the previous stable ( product quality ) Release series . Only for serious vulnerability fixes and security fixes , No addition will affect the important functions of the series .
13、 ... and 、mysql What are the advantages
- Speed : Fast running speed .
- Price :
MySQL It's free for most individuals . - Easy to use : Compared with the setting and management of other large databases , It's less complicated , Easy to learn .
- Portability : Able to work on many different system platforms , for example
Windows、Linux、UNIX、Mac OS etc. . - Rich interfaces : Provided for
C、C++、Eiffel、Java、Perl、PHP、Python、Ruby and Tcl Languages like API. - Support query language :
MySQL Standards can be used SQL Grammar and support ODBC Applications for . - Security and connectivity : Very flexible and secure access and password system , Allow host based authentication . When connecting to the server , All password transmissions are encrypted , This ensures password security . because MySQL It's Networked , So it can be accessed anywhere on the Internet , Improve the efficiency of data sharing .
fourteen 、mysql What are the command line tools
-
mysqld:SQL daemon (MySQL Server process ). It must be after the program is run , The client can access the database by connecting to the server . -
mysqld_safe: Server startup script . stay UNIX and NetWare Recommended in mysqld_safe To start up mysqld The server .mysqld_safe Added some security features , For example, when an error occurs, restart the server and write the runtime information to the error log file . -
mysql.server: Server startup script . This script is used to use the 、 Run the script that starts the service 、 The system running the directory . It calls mysqld_safe To start up MySQL The server . -
mysql_multi: Server startup script , You can start or stop multiple servers installed on the system . -
myisamchk: Used to describe the 、 Check 、 Optimization and maintenance MyISAM Table utility . -
mysqlbug:MySQL Defect report scripts . It can be used to MySQL The email system sends defect reports . -
mysql_install_db: This script is created with default permissions MySQL Authorization Form . Usually just on the system First installation MySQL When the once .
15、 ... and 、mysql What are the utility programs on the client side
-
myisampack: Compress MyISAM surface , A tool to generate smaller read-only tables . -
mysql: Interactive input SQL Statements or command line tools that execute them in batch mode from files , It is also our most commonly used tool . -
mysqlaccess: Check access hostname 、 User name and database combination permission script . -
mysqladmin: A client program that performs administrative operations , for example Create or delete a database 、 Overload authorization table 、 Refresh the table to the hard disk and reopen the log file .mysqladmin It can also be used to retrieve versions 、 process , And the status of the server . -
mysqlbinlog: A tool for reading statements from binary logs . Include executed statements in the binary log file , Can be used to help the system Recover from a crash . -
mysqlcheck: Check 、 Repair 、 Analyze and optimize table maintenance clients for tables . -
mysqldump: take MySQL Dump the database to a file ( for example SQL Sentence or tab Separator text file ) The client program for . -
mysqlhotcopy: When the server is running , Fast backup MyISAM or ISAM Table tools . -
mysqlimport: Use LOAD DATA INFILE Client programs that import text files into related tables . -
mysqlshow: Display database 、 surface 、 Column and the client program that indexes the relevant information . -
perror: Display system or MySQL Tools for error code meaning .
sixteen 、mysql8.0 and 5.7 comparison , What features have been added
- The data dictionary ( Used to store information about database objects )
- Atomic data definition statement ( Even if the server pauses during operation , Transactions will also be committed , And keep the applicable changes to the data dictionary 、 Storage engine and binary log , Or roll back the transaction )
- Security and account management (8.0 Can support roles , Administrators uniformly add and delete , There is no need to specify permissions for each user )
- Resource management ( Support the creation and management of resource groups , It also allows the threads running in the server to be assigned to specific resource groups )
-
InnoDB Add on function - Character set support ( The default character set has been changed
latin1 by utf8mb4. The utf8mb4 There are several new collations for the character set , These include utf8mb4_ja_0900_as_cs) - enhance
JSON function - Data type support
- Query optimization
- Common table expression
- Window function
- Statistical histogram ( Using histogram , Users can make statistics of data distribution for one column of a table , Especially for fields without indexes . This can help the query optimizer find a better execution plan )
- Backup the lock ( The new type of backup lock is allowed during online backup
DML, At the same time, prevent operations that may cause inconsistent snapshots . The new backup lock is set by LOCK INSTANCE FOR BACKUP and UNLOCK INSTANCE Grammar support . The administrator has BACKUP_ADMIN Permission to use these statements .)
thus , In this paper, the end .
For more information, go to VX official account “ Operation and maintenance home ” , Get the latest article .
------ “ Operation and maintenance home ” ------
------ “ Operation and maintenance home ” ------
------ “ Operation and maintenance home ” ------
Interview with system operation and maintenance engineer , Nominations for excellent staff of operation and maintenance engineer ,tr O & M Engineer , I'm calling the operation and maintenance engineer for daily work ,IT Senior operation and maintenance engineer ;
Intelligent manufacturing operation and maintenance engineer training course , Remote office operation and maintenance engineer , Salary of Mindray medical operation and maintenance engineer , What does the backstage O & M engineer do ;
How about the wind operation and maintenance engineer , Inspur cloud operation and maintenance engineer , Sample certificate of medical equipment operation and maintenance engineer , Boyfriend of operation and maintenance engineer , The O & M engineer is grumpy .
边栏推荐
- The white paper on the panorama of the digital economy and the digitalization of consumer finance were released
- An idea plug-in that automatically generates unit tests, which improves the development efficiency by more than 70%!
- mysql数据库扫盲,你真的知道什么是数据库嘛
- 百度APP 基于Pipeline as Code的持续集成实践
- IPETRONIK数据采集设备携手Softing Q-Vision软件致力于ADAS测试方案
- flutter 系列之:flutter 中常用的 GridView layout 详解
- 弹性盒子自动换行小Demo
- 几百行代码实现一个 JSON 解析器
- 电驴怎么显示服务器列表,(转)如何更新电驴服务器列表(eMule Server List)
- Unity WebGL移动端去除警告
猜你喜欢
随机推荐
SHAREit實力出眾,登陸全球 IAP 實力榜 Top7
2022-06-28日报:LeCun最新论文:通往自主机器智能的道路
Realization of a springboard machine
How to handle the safest account opening when downloading the mobile app of Huatai Securities
认识启动函数,找到用户入口
centos6.5 php+mysql mysql库找不到
In fact, there are a lot of MATLAB learning and use materials (many documents and videos) on the official website of MATLAB
VS2012 VC新建一个空白窗口应用
Hundreds of lines of code to implement a JSON parser
百度APP 基于Pipeline as Code的持续集成实践
Jerry's wif interferes with Bluetooth [chapter]
pytorch基础
K3s one click installation script
async-validator.js數據校驗器
Tencent tangdaosheng: facing the new world of digital and real integration, developers are the most important "architects"
哪一个证券公司最好最安全 怎么办理开户最安全
scratch旅行相册 电子学会图形化编程scratch等级考试一级真题和答案解析2022年6月
Digital twin energy system, creating a "perspective" in the low-carbon era
Tencent has confirmed that QQ has stolen numbers on a large scale, iphone14 has no chance of type-C, and 5g, the fourth largest operator, has officially released numbers. Today, more big news is here
Go语学习笔记 - gorm使用 - 数据库配置、表新增 | Web框架Gin(七)







