Those things about Nosql databases

1..Nosql overview:

       With the advent of the era of cloud computing and big data, Internet technology has already realized that data can be accessed and captured through third-party platforms. Users' personal information, social networks, geographic locations, user-generated data, and user action logs have grown exponentially. If you want to mine these user data, the SQL relational database has been unable to meet the needs and development of these businesses, and the SQL relational database has become inadequate, exposing many insurmountable problems, while the non-relational database is due to its own characteristics have developed very rapidly. The emergence of NoSQL databases better compensates and satisfies more, complex and huge data processing and analysis.

 

      NoSQL , NoSQL = Not Only SQL, which means "more than just SQL", these types of data stores do not require a fixed schema and can be scaled horizontally without redundant operations.

 

2. Features of Nosql:

  •  Ease of expansion is outstanding
  • High performance for large data volume
  • Diverse and flexible data models
  • The limitations of traditional SQL relational data prompted the development of NoSQL

3.3V+H:

  • 3V in the era of big data
  1. Mass-Volume
  2. Variety - Variety
  3. Real-time-Velocity
  • 3H in the Internet Age
  1. High concurrency
  2. Highly scalable
  3. high performance

4. Introduction to NoSQL data model

  • Aggregate model:
  1. K - V key-value storage model : Key-value storage, that is, Key-Value storage, or KV storage for short, is a way of NoSQL storage. Data is organized, indexed, and stored in key-value pairs. KV storage is very suitable for business data that does not involve too many data relationships and business relationships. At the same time, it can effectively reduce the number of reads and writes to disk, and has better read and write performance than SQL database storage.
  2. BSON storage model : Binary Serialized Document Format, is a storage format in binary form. It adopts the name and pair representation method similar to C language structure, supports embedded document objects and array objects, and is lightweight and traversable. It can effectively describe unstructured data and structured data.
  3. Column family storage model : Bigtable-Style Data Model, a database using a "big table format data model" is often referred to as a "column store database", and perhaps the best way to understand the column family model is to think of it as a two-level Two-Level Aggregate Structure
  4. Graph storage model : stores vertex and edge information, and some support adding annotations for modeling things, such as social graphs and various objects in the real world. The content of the IMDB (Internet Movie Database) site constitutes a complex image, which is generally used to find the path of graphics breakpoints, or the attributes of paths between endpoints.

5. NoSQL database classification:



 

 6. NoSQL data CAP and BASE:

  • CAID of traditional SQL relational data:

     
  • CAP of NOSQL relational database:  CAP principle obeys the principle:

  1. CA--> Traditional Oracle database
  2. AP--> Choice of most website architectures
  3. CP--> Redis、Mongodb

PS:

  1.  When it comes to distributed architecture, you must make a trade-off, and you can only make a trade-off between consistency and availability. No NoSQL system can guarantee these three points at the same time.
  2. There is a balance between consistency and availability.
  3. More than most web applications, in fact, do not need strong consistency.
  4. So sacrifice C for P, which is the current direction of distributed database products
  5. The choice of consistency and availability:

    For web 2.0 websites, many of the main features of relational databases are often useless:

  • Database transaction consistency requirements: Many web real-time systems do not require strict database transactions, and the requirements for read consistency are very low. In some cases, the requirements for write consistency are not high. Allows for eventual consistency.

  • Real-time write and read requirements of databases: For relational databases, if you query immediately after inserting a piece of data, you can definitely read the data, but for many web applications, such high real-time performance is not required , for example, after a message is sent, it is completely acceptable for my subscribers to see this dynamic after a few seconds or even a dozen seconds.

  • 对复杂的SQL查询,特别是多表关联查询的需求:任何大数据量的web系统,都非常忌讳多个大表的关联查询,以及复杂的数据分析类型的报表查询,特别是SNS类型的网站,从需求以及产品设计角度,就避免了这种情况的产生。单表的主键查询,以及单表的简单条件分页查询,SQL的功能极大的弱化。

 

  • NOSQL的BASE原理:
  • BASE就是为了解决关系数据库强一致性引起的问题而引起的可用性降低而提出的解决方案。
  • BASE其实是三个术语的缩写:
  •     基本可用(Basically Available)
  •     软状态(Soft state)
  •     最终一致(Eventually consistent)
      它的思想是通过让系统放松对某一时刻数据一致性的要求来换取系统整体伸缩性和性能上改观。缘由就在于大型系统往往由于地域分布和极高性能的要求,不可能采用分布式事务来完成这些指标,要想获得这些指标,必须采用另外一种方式来实现。
  •   分布式系统与集群:
    分布式系统(Distributed System):由多台计算机和通信的软件组件通过计算机网络连接(本地网络或广域网)组成。分布式系统是建立在网络之上的软件系统。正是因为软件的特性,所以分布式系统具有高度的内聚性和透明性。
 因此,网络和分布式系统之间的区别更多的在于高层软件(特别是操作系统),而不是硬件。分布式系统可以应用在在不同的平台上如:Pc、工作站、局域网和广域网上等。 集群:是一种用于集团调度指挥通信,主要应用在专业移动通信领域。该系统具有的可用信道可为系统的全体用户共用,具有自动选择信道功能,它是共享资源、分担费用、共用信道设备及服务的多用途、高效能的无线调度通信系统。
  • 简单来讲:
  • 1分布式:不同的多台服务器上面部署不同的服务模块(工程),他们之间通过Rpc/Rmi之间通信和调用,对外提供服务和组内协作。
  • 2集群:不同的多台服务器上面部署相同的服务模块,通过分布式调度软件进行统一的调度,对外提供服务和访问。
 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326187347&siteId=291194637