MySQL database introduction and mysql display command _mysql

Source: Internet
Author: User
Tags db2 create database

below to introduce the MySQL database introduction, details as follows:

Mysql

Database:

Oracle, DB2, SQL Server, MySQL, Access, Mangodb, bigtable

relational database

Large

Oracle, DB2

Medium - sized

SQL Server, MySQL

Small

Access

Non-relational database

Mangodb, BigTable

What is a relational database?

The so-called relational database is the database that uses the relational model to organize the data.

What is a non-relational database?

A database that does not use the relational model to organize data, that is, a non-relational database

Relational model

The relational model is the two-dimensional table model, and the relational database organizes the data by the relation between the two-dimension table and the table.

Relationship:

Relationship is understandable as a two-dimensional table, each two-dimensional table in the database, is the data table.

Tuples: Can be understood as a row in a two-dimensional table that corresponds to a record in a data table in a database.

Attribute: is understood as a column in a two-dimensional table that corresponds to a field in a datasheet in a database.

Field: is the value range of the attribute, which is the value limit (field type) of the field in the datasheet in the database.

Keyword: is a set of properties used to uniquely identify a tuple, the primary key field in the database datasheet.

Several concepts in the database:

Data: Storage objects for a database

Database: A collection of databases that are used in a computer for long-term storage of data, shared, and managed.

Datasheet: Table

Records: Record

Fields: Field (column)

DBMS (db Management System): Database management systems, a large software for managing databases, primarily for creating, deleting, and maintaining databases.

MySQL Object structure relationship

The MySQL display command looks like this:

Although now a variety of graphical management tools to facilitate the management of MySQL, but occasionally still need to manually input instructions to use more convenient, the following is some of the commands to extract, for their own use of the memo.

1. Display the list of databases.

show databases;

2, display the data table in the library:

Use MySQL;
Show tables;

3, display the structure of the data table:

describe table name;

4, build the library:

Create database library name;

5, the establishment of the table:

Use library name;

CREATE TABLE table name (field set list);

6, delete the database and delete the table:

drop Database library name;
The drop table table name;

7. Empty the record of the table:

Delete from table name;

8, display the records in the table:

SELECT * FROM table name

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.