Mysql database ...LOGIN

Mysql database introduction

The purpose of database

When many friends first started learning databases, it was difficult to understand the role of databases. It’s unclear what relationship the database has to our real life and virtual life.

We use this chapter to speed up beginners' understanding of databases and database systems.

Nowadays, everything we see that is related to daily life and needs to be recorded is basically placed in the database:

  1. ID card information is placed in the system of the Ministry of Public Security
  2. Bank card balances and transaction records, transfer information
  3. Hotel booking information (all databases have been stolen and information leaked in some way)
  4. Planes, trains, cars Online ticket purchase records
  5. Various websites, QQ, online shopping, Tieba, favorite music, movie collection information
  6. Mobile phone records, balance, bus card balance, water bill , electricity bills, lottery purchase records
  7. Game equipment, levels, magic, strength, attack capabilities and other information
  8. US aircraft carriers are also using the mysql database to manage aircraft carrier-related information

... ...and so on

Everything in our lives is recorded in the database. You can think about how important the database is!

In the 21st century, what will happen to the world if humans do not have databases?

Five basic units of database

  1. Database server
  2. Database
  3. Data table
  4. Data field
  5. Data row

We will now explain the five basic units above:

  1. Database server. Refers to a computer used to run database services. In small and medium-sized enterprises, it is usually one unit. When the amount of data storage and calculation is very large, multiple units can exist. Multiple database servers work together to store or compute. Since data security is very important, we often back up the data in the database server.

  2. database. There can be multiple databases in a database server. Mainly used for classification. We can build traffic information databases, game databases, hotel reservation databases... Mainly used to divide data for different purposes into large blocks according to business.

  3. data sheet. For example in the game database. According to this game, it is divided into different data tables. Specifically used to distinguish different data in the game. For example: user data (user, password); character data; all equipment and equipment information; user's recharge information; medicine, magic potion information... etc.

  4. data fields , also called data column. It is the columns in the tables we see every day. In the table, we will split a user table into columns. As shown below (Table 1): user number, user name, gender, and age are fields. In a real database, the data fields need to be changed to English and written as: id, username, sex, and age.

  5. Data row. The real data exists in each row of the table. Fields (columns) divide the format in which a table should store data. And rows are real data. Each row needs to follow the specifications and requirements of the data fields (columns) to store data.

(Table 1)

##User numberUser nameGenderAge##12##3Ning ZetaoMale22Next Section
<?php echo "Hello Mysql"; ?>
submitReset Code
ChapterCourseware
    None
李文凯Male 18
京田16