In the 21st century, mankind entered the "Information Explosion era", a large number of data, information constantly produced, along with how to secure, efficient storage, retrieval and management of them. The use of databases enables efficient storage of data, efficient access, easy sharing, and security control.
The need to use a database
Using a database enables efficient and well-organized storage of data, enabling people to manage data more quickly and easily. The database has the following characteristics:
(1) can be structured to store a large amount of data information, convenient for users to effectively search and access
(2) can effectively maintain the consistency of data information, integrity, reduce data redundancy
(3) can meet the sharing and security requirements of the application
Basic concepts of the database
(1) Data sheet
The symbolic record describing a thing is called data. Data includes numbers, text, graphics, images, sounds, and more.
In the database, the data is stored in the form of "record" in a uniform format, and the same format and type of data are uniformly stored together, forming a table. Each row in the table is called a record that describes the information for an object; Each column is called a field that describes the properties of an object.
650) this.width=650; "src=" Https://s5.51cto.com/oss/201711/16/a1e58600aae1d795b4eebec180c24c98.png "title=" Yang Shufan 03.png "alt=" A1e58600aae1d795b4eebec180c24c98.png "/>
(2) database
A database (DATABASE,DB) is a collection of tables, a collection of related data stored in a certain organization, with minimal redundancy and high data independence, which can be shared by a variety of users.
650) this.width=650; "src=" Https://s1.51cto.com/oss/201711/16/ac7a2dcace4e75df1daca0fd5960b1ca.png "title=" Yang Shufan 01.png "alt=" Ac7a2dcace4e75df1daca0fd5960b1ca.png "/>
(3) Primary key and foreign key
PRIMARY key: each row of records in a data table is unique, not identical records are allowed, and the uniqueness of the record can be guaranteed by defining a primary key (primary key, Primary key). A primary key consists of one or more fields, whose value is unique and does not allow null values (NULL). A table can have only one primary key
650) this.width=650; "src=" Https://s1.51cto.com/oss/201711/16/355693e9405cce27a4e1e44996159e1d.png "title=" Yang Shufan 04.png "alt=" 355693e9405cce27a4e1e44996159e1d.png "/>
foreign keys : A database typically consists of multiple tables, which can be associated with foreign keys (Foreign key).
(4) Data integrity
Data integrity refers to the accuracy and reliability of data, he is to prevent the existence of the database does not conform to the semantic provisions of the data can prevent the error message input \ Output caused invalid operation or error message, it is divided into the following four categories:
1) Entity integrity: A property that requires a primary key cannot have a null value, forcing the integrity of the primary key in the table. As in, each student has a number that uniquely represents the student's information, which is usually set to the student's primary key, so the number cannot be empty according to the entity integrity rules
2) Domain integrity: also column integrity, specify the validity of a specific column, such as, the "gender" field can only take the value "male" and "female", so that some invalid values are not entered
3) Referential integrity: If two tables are associated, it is required not to allow references to non-existent tuples to be constrained by a foreign key
4) User-defined integrity: determined by the application environment, defines the constraints of a specific data, must meet the semantic requirements of the data involved
(5) Database management System (DBMS)
Database Management System,dbms is the system software to organize, manage and access the database resources effectively, and supports the operation of the database with the support of the operating system.
(6) database system (DBS)
Database System,dbms is a human ﹣ system composed of hardware, operating system, database, DBMS, application software and database user (including database administrator). Users can manipulate databases via DBMS or database application software
(7) database administrator (DBA)
Database ADMINISTRATOR,DBA is responsible for the database update and backup, database system maintenance, user management and so on, to ensure the normal operation of the database system, has a high level of business, more senior personnel.
650) this.width=650; "src=" Https://s4.51cto.com/oss/201711/16/10f96e663c1cc896a3d80019c9c8f5fc.png "title=" Yang Shufan 02.png "alt=" 10f96e663c1cc896a3d80019c9c8f5fc.png "/>
Introduction to today's mainstream database
In the growing database today, the mainstream database represents a mature database technology, understand the common database, you can know the extent of the development of database technology, as well as the future direction of development.
SQL Server
|
Microsoft Company Products |
For Windows operating systems |
Simple, easy to use |
Oracle |
Oracle's Products |
For all major platforms |
Safe, perfect and complex to operate |
DB2 |
IBM's Products |
For all major platforms |
Large, safe and perfect |
My SQL |
Oracle Corporation Acquisitions |
Linux operating system |
Open source, small size, fast, stable |
This article is from the "Yang Shufan" blog, make sure to keep this source http://yangshufan.blog.51cto.com/13004230/1982637
Basic concepts of the database