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