DBA: Learn MySQL and grammar quickly

Source: Internet
Author: User
Tags dba mysql functions

First, what is MySQL?

MySQL is a relational database management system, where relational databases store data in different tables rather than putting all of the data in a large warehouse, which increases speed and increases flexibility.
MySQL is open source, so you don't have to pay an extra fee.
MySQL supports a large database. You can handle large databases that have thousands records.
MySQL uses the standard SQL data language form.
MySQL can run on multiple systems and supports multiple languages. These programming languages include C, C + +, Python, Java, Perl, PHP, Eiffel, Ruby, and Tcl.
MySQL has good support for PHP, which is currently the most popular web development language.
MySQL support large database, support 50 million records of Data Warehouse, 32-bit system table file maximum support 4gb,64 bit system to support the largest table file is 8TB.
MySQL can be customized, using the GPL protocol, you can modify the source code to develop their own MySQL system.
If you need to modify the code for commercial use, you can use it for commercial purposes by purchasing the official Enterprise version.

Ii. What is the use of the database?

A database is a warehouse that organizes, stores, and manages data according to its structure, and each database has one or more different APIs for creating, accessing, managing, searching, and replicating the saved data. You can also store data in a file, but it is relatively slow to read and write data in a file. So a relational database management system (RDBMS) is used to store and manage large amounts of data. The so-called relational database is a database based on the relational model, which uses mathematical concepts and methods such as set algebra to process data in the database.
The RDBMS is the feature of the relational database management system (relational Management Systems):

    • 1. The data appears in tabular form
    • 2. Various record names for each behavior
    • 3. Data fields corresponding to record names for each column
    • 4. A number of rows and columns form a single sheet
    • 5. A number of forms form database
Iii. related knowledge of RDBMS

Library: A database is a collection of related tables.
Table: A table is a matrix of data. Tables in a database look like a simple spreadsheet.
Columns: A column (the data element) contains the same data, such as the postal code.
Row: a row (= tuple, or record) is a set of related data, such as a user's subscribed data.
Redundancy: Stores twice times the data, redundancy reduces performance, but improves the security of the data.
Primary key: The primary key is unique, and only one primary key can be included in a data table.
FOREIGN key: A foreign key is used to correlate two tables and is typically used for federated query data.
Composite key: Composite key (key combination) Multiple columns are used as an index key, and are typically applied to composite indexes.
Index: Use an index to quickly access specific information in a database table. An index is a structure that sorts the values of one or more columns in a database table. A directory similar to a book.
Referential integrity: Referential integrity requires that references to non-existent entities are not allowed in the relationship. and entity integrity are the integrity constraints that the relational model must satisfy in order to ensure the consistency of the data.

Iv. mysql format and PHP syntax

mysqli function format
MySQL PHP function format

mysqli_function(value,value)mysqli_connect($connect)mysqli_query($connect,‘SQL语句‘)mysqli_fetch_array()mysqli_close()

PHP syntax for calling MySQL functions

[[email protected] web]# vim index.php<?$retval = mysqli_funtion(value,value);if ( !$retval ){    die (‘error‘)}?>

DBA: Learn MySQL and grammar quickly

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.