I. Database Foundation 1, what is a database
1. Database is a container (usually a file or a set of files) that holds organized data
2. A database is a collection of data that is stored in an organized way
Note: Database software should be called a DBMS (database management system).
A database is a container created and manipulated through a DBMS
2. Table
A table is a structured list of data of a particular type
The name of the table is unique (cannot use the same table name in the same database, but can be in a different database)
3. Mode
Schema: Information about the layout and characteristics of databases and tables.
4. Columns and data types
A field in the column table. All tables are made up of one or more columns.
The type of data allowed by the data type (Datetype). Each table column has a corresponding data type that restricts (or allows) the data stored in that column. (plays an important role in optimizing the disk)
The table is made up of columns. A column stores information about a portion of a table.
Note: Data types restrict the kinds of data that can be stored in columns, help you sort the data correctly, and play an important role in disk optimization.
5, line
A record in the row table
6. Primary key
1. Each row in the table should have a column (or set of columns) that uniquely identifies itself.
2, primary key (primary key) a column (or set of columns) whose value uniquely distinguishes each row in the table.
3, as the primary key conditions:
A. Any two rows do not have the same primary key value.
B. Each row must have a primary key value (the primary key column does not allow null values).
Ii. about SQL 1, what is SQL
SQL is an abbreviation for Structured Query language. A language used specifically to communicate with a database.
2. Advantages of SQL
1. SQL is supported by almost all important DBMS
2, simple and easy to learn. Statements are all made up of highly descriptive English words.
3, can be very complex and advanced database operations.
MySQL Basics-1 Database Basics