Learn about database ----- Day 1-some basic concepts of database ----- day1-
One database every Day ----- Day 1-some basic concepts of the database
---- Reprinted with the source: coder-pig
This section introduces:
This section describes some basic concepts of database names so that you can have a basic understanding of the database!
1. "Database" and "Database Management System"
A: databases are simply "warehouses that store data"
Database Management System (DBMS) is a System that manages the former,
At present, there are many DBMS systems that are commonly used: MSSQL, MySQL, El, SQLITE, and other database management systems.
MSSQL 2008 is used. Of course, you can select the corresponding DBMS as needed. Maybe you can directly use Android
You can also learn with built-in SQLite! DBMS is used to manage databases. To maintain or search for data, we only need
Tell him according to SQL specifications. For example, if we are looking for someone, we only need to tell DBMS the characteristics of this person and he will help us find them,
It's none of our work! We don't have to worry about how the underlying layer is implemented, so we can put more energy into it.
To business system development!
Simply put:
We only need to tell DBMS, "what to do", rather than "how to do", DBMS will decide a better one.
How to complete the operation!
2. Database-related terms:
3. Table Association concept:
In actual development, we may encounter this situation:
Looking at this table, we found that the company's related information is repeated. Can we extract the information about the company?
Okay, so let's extract the content from it! Write another company information table!
Next, create an association for the two tables, that is, modify the personnel table. The new personnel table is as follows:
We can query the corresponding company information based on the company ID. When the company information changes, the changes will also become obsolete.
The preceding method of associating two tables through the primary key of the second table is called "Table Association"
The field associated with other tables is also called "foreign key", for example, "company number"