[Database MySQL] basic concepts

One: What is a database

1: The database is a warehouse used to organize, store and manage data

Today's world is an Internet world full of data, full of large amounts of data. There are many sources of data, such as travel records, consumption records, web pages browsed, messages sent, and so on. In addition to text type data, images, music, and sound are all data.

In order to facilitate the management of data in the Internet world, there is the concept of database management system (abbreviation: database). Users can perform operations such as adding, querying, updating, and deleting data in the database .

2: Common database classification

  • MySQL database (currently the most widely used and most popular open source free database; Community (community free version) + Enterprise (enterprise paid version))
  • Oracle database (fee) is also the name of the Oracle company
  • SQL Server database (charged)
  • Mongodb database (Community + Enterprise)
  • Redis (also common)

【Note】

Among them, MySQL, Oracle, and SQL Server belong to traditional databases (also known as relational databases or SQL databases). The design concepts of these three are the same, and their usage is similar.

Mongodb is a new type of database (also known as: non-relational database or NoSQL database), which makes up for the defects of traditional databases to a certain extent.

3: Data organization structure of traditional database

Data organization structure: refers to the structure in which the data is stored.
The data organization structure of traditional databases is similar to the data organization structure in Excel.

In a traditional database, the data structure is divided into four major components: database, table, row, and field.

  • The database is similar to an Excel workbook
  • The data table is similar to an Excel worksheet
  • The data row is similar to each row of data in Excel
  • Fields are similar to Excel columns
  • Each field has a corresponding data type

4: The relationship among libraries, tables, rows, and fields in actual development

① In actual project development, in general, each project corresponds to an independent database.
② Different data needs to be stored in different tables in the database. For example, user data is stored in the users table, and book data is stored in the books table.
③ The specific information stored in each table is determined by the field. For example, we can design three fields: id, username, and password for the users table.
④ The rows in the table represent each specific data.

Guess you like

Origin blog.csdn.net/qq_43490212/article/details/112919275