2017-09-05 19:10:55
First, the database definition
Essentially, a database is a collection of information that can exist for a long time, often for many years. Generally speaking, the term "database" refers to a collection of data that is managed by a database management system. The database management system DBMS will meet:
- Allows the user to create a new database and specify its schema (the logical structure of the data) using a specialized data definition language.
- Give users the ability to query data and modify data in the appropriate language, which is often referred to as query language.
- Supports long-term storage of very large amounts of data, allowing funny access data to be queried and data modified.
- is the persistence of data that can be recovered from failures, multiple types of errors, or intentional misuse.
- Controlling multiple users to access data at the same time does not allow inappropriate interaction between users (known as isolation), and does not occur in parts of the data (known as atomicity) that do not perform a partial, rather than complete, data operation.
Ii. Types of DBMS
DBMS mainly through the data preservation format to classify, at this stage there are mainly the following 5 kinds:
- Hierarchical database (Hierarchical database,hdb)
One of the oldest databases, it shows the data in a hierarchical way. The hierarchical database was once the mainstream of the database, but with the popularization of the relational database, it is now seldom used.
- relational database (relational Database,rdb)
Is now the most widely used database. The relational database was born in 1969 and has a long history, and as with Excel worksheets, it uses a two-dimensional table structure to manage data, so it's easy to understand. It also uses the SQL language specifically for data manipulation. This type of DBMS is called a relational database management system (RDBMS). There are several ways to compare Representative RDBMS
Oracle DB: Oracle's RDBMS
SQL Server: Microsoft's RDBMS
Mysql: Open Source RDBMS
PostgreSQL: Open Source RDBMS, more academic
- Object-oriented database (oriented DATABASE,OODB)
There is a language in the programming language called object-oriented. This kind of database takes the data and the operation of the data together and manages it in the object, hence the name. An object-oriented database is a database that is used to protect these objects.
- XML database (XML DATABASE,XMLDB)
In recent years, XML has become more and more popular as a form of data communication on the network. XML databases can handle large amounts of data in XML in a high-speed manner.
- Key-Value Storage System (Key-value STORE,KVS)
This is a database that is purely used to hold a combination of primary keys and values used by the query. A reader with experience in programming languages can think of it as an associative array or as a hash table. In recent years, with the application of the key-value storage system, the primary key of the storage system is people's concern.
Python mysql-Database Basics