Database, we know is to store data warehouse, data can be text, images, audio and video (like this relatively large data is usually stored in the database is its corresponding storage address), then what is the relational database, simply speaking, is the database of the relationship between the various data, how this relationship should be established, We need to master some basic concepts first.
First, form
Relational databases consist of ' relationships ', which are often referred to as ' tables '.
Customers (Customer)
| CustomerID |
Name |
Address |
City |
| 1 |
Jacky |
Earth |
Small city |
Second, column
In the previous table, each column has a unique name, such as: Nam,city ... Each column has a related data type, such as CustomerID, which can be seen as integer data, while the other columns are string, and sometimes columns are called fields or attributes.
Three, the line
Each row in the previous table represents a customer, each row has the same format and field, and a row is also called a record.
Four, the value
The value of each column must be the same as the data type defined by the column.
Five, key
If we want to identify each row of records, we typically specify a column with unique values, such as the CustomerID column in the previous table, which does not allow duplicate values, which is often referred to as a key or a primary key.
MySQL Relational data concept