Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of usage scenarios of sql and each nosql Database

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces the example analysis of sql and various nosql database usage scenarios, which has a certain reference value, and interested friends can refer to it. I hope you will learn a lot after reading this article.

Why do I understand that sql is the backbone?

From a technical point of view alone

Relational grid fully embodies real affairs.

Pay attention to data such as transaction, audit, flash memory and so on, so how to put some particularly important data into sql. At least user information is important data in a system.

So sql must have, and the backbone of the data store

When will nosql be introduced?

First take a look at the process of sql-> sql + nosql.

Why does https://www.jb51.net/article/79236.htm use NoSQL?

These nosql?

For the java language:

Redis: for caching-extremely fast read speed (in memory)

MongoDb-both read and write transactions are balanced. Node.js developed json

Neo4j-.java is similar to SQL, but the query is faster, but the advanced features are charged. -Social (image database)

Cassandra-write data faster than read.-for log storage.

HBase offline analysis

My idea is:

In terms of java language:

-redis is used for caching (javabean in the value) and hot data that does not need to be stored

-mongoDb is used for content that is less important but needs to be stored.

-Cassandra is used to manage logs. It is strongly recommended to put logs in the database. )

-HBASE offline analysis, big data

-solr,ES-search inside the site and replace SQL, etc.

-or use neo4j instead of sql database, when there are transaction requirements, a separate thread with priority 2 is stored in sql.

NoSQL era

There are many NoSQL databases, such as MongoDB, Redis, Riak, HBase, Cassandra and so on. Each has one of the following features:

No longer use SQL language, such as MongoDB, Cassandra have their own query language

Usually open source projects

Born for cluster operation

Weakly structured-there are no strict restrictions on data structure types

Applicable scenario

Store user information, such as sessions, profiles, parameters, shopping carts, and so on. This information is generally linked to the ID (key), in this scenario the key-value database is a good choice.

Does not apply to scenarios

1) instead of querying by key, query by value. There is no way to query values in the Key-Value database at all.

2) the relationship between the data needs to be stored. You cannot associate data with two or more keys in an Key-Value database.

3) transaction support. You cannot roll back when a failure occurs in the Key-Value database.

Thank you for reading this article carefully. I hope the article "sample Analysis of sql and various nosql Database usage scenarios" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report