Introduction to mysql-Database operations

Source: Internet
Author: User
1. Creating a database means dividing a space in the database system to store the corresponding data 1. Create database name 2. Display database: Show databases;2. Delete Database 1. Syntax: drop database name; 3. Database Storage engine (table type) 1. Displays the MySQL-supported storage engine: Show ENGINES, or show engines\g2. Display MySQL support engine: show VARIABLES like "hava%"; 3. View MySQL default engine:  SHOW VARIABLES like ' storage_engine '; 4. Modify the default engine: My.ini change Default-storage-engine=innodb to Efault-storage-engine=myisam and restart the service for the modification to take effect. 4. Introduction to Database Engine 1. InnoDB engine 1. Support auto-Grow column auto_increment. The autogrow column cannot be empty, and the value must be unique. MySQL specifies that the self-growth column must be primary key 2. Support foreign key (FOREIGN key). The table where the foreign key resides is the child table, and the foreign key depends on the table as the parent table. The field in the parent table that is associated with the outer table key must be the primary key. When you delete, update a piece of information from the parent table, the child table must also have a corresponding change. 3. The table structure of the created table is stored in the. frm file. Data and indexes are stored in table spaces defined by Innodb_data_home_dir and Innodb_data_file_path. 4. Advantages: Provide good management of things, crash repair ability and concurrency control. Disadvantage reading and writing efficiency is slightly worse, occupy a relatively large space. 2.MyISAM engine 1. Advantages: Small footprint, fast processing speed. Cons: The concurrency and integrity of things are not supported.

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.