- Database Basics
- Database is a long-term storage in the computer, organized, shared, unified management, data collection. It is a computer software system that stores and manages data in accordance with the information structure. The database contains two levels of meaning: The warehouse where the data is stored, and the methods and techniques of data management.
- A database represents a collection of two-dimensional arrays used to store the logical structure of data and manipulation data. It consists of a vertical column and a horizontal row, which is called a record, is the organization of the data, the column is called a field, and each column represents an attribute of the record, with related descriptive information such as data type, data width, and so on.
- The data type determines the format in which the data is stored on the computer, representing different types of information. Common data types are: Integer data type, floating-point data type, exact decimal type, binary data type, date/Time data type, string data type.
- The primary key is also called the Master code and is used to uniquely identify each record in the table. (such as the number can be used as the primary key, the name is not possible, because there will be duplicate names)
- Database Technology Composition
- Database: A place to store data. A database may contain many files, and a database system usually contains many databases
- Database Management system: The software used to administer the database. DBMS can define data storage structure, provide operation mechanism of data, maintain database security, integrality and reliability.
- Database application: A software supplement to the management database used to improve the processing power of the database system. You can meet the higher requirements for data management and make the data management process more friendly.
- SQL language (structured query languate structured queries language)
- Data definition language: DROP, creat, alter and other statements
- Data Manipulation Language: Insert (insert), UPDATE (modify), delete (delete) statement
- Data Query Language: SELECT statement
- Data Control Language: GRANT, REVOKE, COMMIT, rollback, and other statements
- Database Access interface
-
-
- Open Data Interconnect (Open database Connectivity) provides a common interface for accessing different SQL databases
- Java database connection (Java DAA Base Connectivity) A standard way to connect a database to a Java application
- ADO is Microsoft in. NET Framework for developing a set of object-oriented class libraries for interacting with data sources
- PDO defines a lightweight, consistent interface for the PHP azimuth database, which provides a data access abstraction layer
- What is MySQL
- Client-Server Software
- The server is the storage and management center of the whole application system resources, and many clients handle the corresponding functions to realize the complete application together. In the client/server structure, the client user's request is routed to the database server, and the database server is processed to return the result to the user, thereby reducing the amount of network data transfer.
- MySQL version (until now, the latest is 5.6.21)
- Three numbers represent a different meaning.
- (5) Major version number, which describes the file format, all version 5 of the release version has the same file format
- (6) Release level, major version number and release level together constitute the release sequence number
- (21) The version number of the columns issued here
- The Community edition is completely free, but the official does not provide technical support. More suitable for beginners.
- For some older versions, the official will not provide technical support
- MySQL Advantage
- Fast speed
- Free for individual users
- Low complexity, easy to learn
- Ability to work on a wide range of system platforms (Windows, Linux, Unix, Mac OS) with strong portability
- Provides APIs for C, Java, PHP, Python and other languages
- Support Query Language
- Very flexible and secure access and password systems that allow host-based authentication
- Because MySQL is networked, it can be accessed from anywhere on the internet to improve the efficiency of data sharing.
- MySQL 5.6 New Features
- Sub-query optimization
- Enhanced Optimizer diagnostics function
- By strengthening the INNODB storage engine
- Dramatically increase availability
- New ICP and BKA, up to 280 times times higher specific queries
- InnoDB Full-Text search functionality, developers can resume full-text indexing on the InnoDB form to render text search results, speeding up the search for words and statements.
- Self-healing replication clusters
- Efficient replication of clusters
- Time-delayed replication
- Enhanced Perfromance_schema
- MySQL Tools
- MySQL Command-line utility
- Server-side Utility programs
- Mysqld:sql Daemon, which is the MySQL server process. After the program runs, the client can access the database by connecting to the server.
- Mysqld_safe: Server startup script. Added security features such as restarting the service and writing run time information to the error log file when an error occurs
- Mysql.server: Server startup script that uses a system that runs a directory that contains a specific level of script that runs the startup service. It calls Mysqld_safe to start the server
- Mysqld_multi: Server startup script. You can start or stop multiple servers installed on the system.
- Myisamchk: A utility used to describe, inspect, optimize, and maintain MyISAM tables.
- Mysqlbug:mysql bug script, which can be used to send bug reports to the MySQL messaging system.
- MYSQL_INSTALL_DB: The script creates a MySQL authorization table with default permissions, usually only once when MySQL is first installed on the system
- Client Utility Programs
- Myisampack: A tool that compresses the MyISAM table to produce a smaller read-only table.
- MySQL: a command-line tool that interactively enters SQL statements or executes them from a file in batch mode.
- Mysalaccess: Check for scripts that access permissions for host names, user names, and database combinations
- Mysqladmin: Client program to perform administrative operations
- Mysqlbinlog: Tool to read statements from binary logs
- Mysqlbinlog: checking, repairing, analyzing, and optimizing Table maintenance client Programs
- Mysqldump: Client program to dump MySQL database to a file
- Mysqlhotcopy: Quick backup of MyISAM or ISAM tools when the server is running
- MySQL import: Use the load DATA INFILE client for importing files into related tables
- Mysqlshow: Client program that displays information about databases, tables, columns, and indexes
- Perror: A tool that displays the meaning of the system or MySQL error code
- MySQL Workbench is the next generation of Visual Database design software that provides database administrators and developers with a complete set of visual database operating environments,
- Database design and Model building
- SQL Development
- Database management
Learn MySQL1---mysql basics from scratch