database , I believe it's not strange to everyone , Recently, many people have asked Xiaobian : I'm going to learn Python knowledge , Do you need to learn database ? Now let's take a look .

Yes, of course ! Study Python Little buddy , Whether engaged in Python Which direction of work , You can't do without a database , For example, web crawlers 、 data mining 、 Financial quantitative analysis 、 Artificial intelligence, etc , So the database plays a very important role . Let's follow Xiaobian to learn about database .

Database classification introduction :

There are three early database models , They are hierarchical databases 、 Network database and relational database . In today's Internet , There are usually two types of databases , That is, relational database and non relational database .

What are the mainstream relational databases ?

1. MySQL: The most widely used open source 、 Multi platform relational database , Support transactions 、 accord with ACID、 Support the majority SQL standard .

2. SQL Server: Support transactions 、 accord with ACID、 Support the majority SQL standard , It's commercial software , We need to pay attention to copyright and licence Licensing fees .

3. Oracle: Support transactions , According to the principle of relational database , accord with ACID, Support the majority SQL standard , Most powerful 、 The most complicated 、 Commercial database with the highest market share .

4. Postgresql: Open source 、 Multi platform 、 Relational database , The most powerful open source database , need Python Environmental Science , be based on postgresql Of time scaleDB, It is one of the most popular time series databases at present .

What are the non relational databases ?

Non relational databases are also known as nosql, As a supplement to relational databases , Can play the high efficiency and the high performance under the special scene and the characteristic question .

Common types of non relational databases are key value storage database and document oriented database .

The key value storage database is similar to hash, adopt key Do add 、 Delete 、 Inquire about 、 High performance , The advantage is simplicity 、 Easy to deploy 、 High concurrency , The main products are :

Redis: Open source 、Linux platform 、key-value Key value type nosql database , Simple and stable , Very mainstream 、 Full data in-momory, Locate in fast key value type nosql database .

Memcaced: An open source 、 High performance 、 Cache system with distributed memory objects , It can reduce the database load , Accelerating dynamic web application .

Document oriented databases are stored in the form of documents , Each document is a collection of data items , Each data item has a name and a corresponding value , The main products are :

MongoDB: Open source 、 Multi platform 、 Document type nosql database , Most like a relational database , Positioning on flexible nosql database . It is suitable for the website background database 、 Small file system 、 Log analysis system .