MySQL database: Concepts data

Basic definitions

Data: Total base object is stored in the database
definition: record descriptor objective things
types: numeric, text, graphics, images, sound, etc.
database: DB stores a collection of data
the DBMS: database management system
layer between the user and the operating system data management software
scientific organize and store data efficiently acquire and maintain data
database systems: DBS
computer system introduced after the system database
database administrator: DBA

SQL: database query language
DDL: Data Definition Language
DQL: Data Query Language
DML: Data Manipulation Language
DCL: Data Control Language
TPL: transaction processing language
CCL: Pointer Control Language

The database includes
16 Table
7 view
three storage procedure
3 function database

After building a database built form, generating the corresponding file in the data directory, the role of different file types

.frm description file structure can be opened directly
.MYD expression data file is
.MYI table data file is any index tree data
.opt record character set and order
.IBD a MySQL data file, the index file is also called an independent table space
can not be read directly
ibdata1 shared table space
undo storage table space
.IDB intelligent database system is an object database management systems.
.PAR swap file, the main file name under Windows environment

In MySQL, the difference between char and varchar

Difference format:
char is a type of fixed length, suitable for use in ID number, phone number, etc. given format usual
type varchar is a variable length, suitable for use in variable-length attribute of
text length is not provided, when no Knowing the maximum length of the property, suitable for text
query speed: char at the expense of space efficiency in return for time efficiency.
char fastest into the spaces need to use trim () remove spaces
varchar followed by
text slowest

Guess you like

Origin www.cnblogs.com/yanlzy/p/11908915.html