nosql简介_NoSQL简介

nosql简介

NoSQL, as many of you may already know, is basically a database used to manage huge sets of unstructured data, where in the data is not stored in tabular relations like relational databases. Most of the currently existing Relational Databases have failed in solving some of the complex modern problems like :

众所周知,NoSQL基本上是一个用于管理大量非结构化数据的数据库,其中数据没有像关系数据库那样以表格关系存储。 当前大多数现有的关系数据库都无法解决一些复杂的现代问题,例如:

  • Continuosly changing nature of data - structured, semi-structured, unstructured and polymorphic data.

    数据的性质不断变化-结构化,半结构化,非结构化和多态数据。

  • Applications now serve millions of users in different geo-locations, in different timezones and have to be up and running all the time, with data integrity maintained

    应用程序现在为不同地理位置,不同时区的数百万用户提供服务,并且必须始终保持运行并保持数据完整性

  • Applications are becoming more distributed with many moving towards cloud computing.

    应用程序越来越分散,许多应用程序都向云计算转移。

NoSQL plays a vital role in an enterprise application which needs to access and analyze a massive set of data that is being made available on multiple virtual servers (remote based) in the cloud infrastructure and mainly when the data set is not structured. Hence, the NoSQL database is designed to overcome the Performance, Scalability, Data Modelling and Distribution limitations that are seen in the Relational Databases.

NoSQL在企业应用程序中扮演着至关重要的角色,该企业应用程序需要访问和分析在云基础架构中的多个虚拟服务器(基于远程)上可用的大量数据,并且主要是在数据集没有结构化的情况下。 因此,NoSQL数据库旨在克服关系数据库中出现的性能,可伸缩性,数据建模和分发方面的限制。

什么是结构化数据? (What is Structured Data?)

Structured data is usually text files, with defined column titles and data in rows. Such data can easily be visulaized in form of charts and can be processed using data mining tools.

结构化数据通常是文本文件,具有定义的列标题和行中的数据。 可以轻松地以图表形式对此类数据进行可视化,并可以使用数据挖掘工具对其进行处理。

什么是非结构化数据? (What is Unstructured Data?)

Unstructured data can be anything like video file, image file, PDF, Emails etc. What does these files have in common, nothing. Structured Information can be extracted from unstructured data, but the process is time consuming. And as more and more modern data is unstructured, there was a need to have something to store such data for growing applications, hence setting path for NoSQL.

非结构化数据可以是视频文件,图像文件,PDF,电子邮件等任何内容。这些文件的共同点是什么,什么也没有。 可以从非结构化数据中提取结构化信息,但是该过程很耗时。 而且,由于越来越多的现代数据是非结构化的,因此有必要为不断增长的应用程序存储此类数据,从而为NoSQL设置路径。

NoSQL数据库类型 (NoSQL Database Types)

Following are the NoSQL database types :

以下是NoSQL数据库类型:

  • Document Databases : In this type, key is paired with a complex data structure called as Document. Example : MongoDB

    文档数据库:在这种类型中,密钥与称为文档的复杂数据结构配对。 示例:MongoDB

  • Graph stores : This type of database is ususally used to store networked data. Where in we can relate data based on some existing data.

    图形存储:通常使用这种类型的数据库来存储网络数据。 我们可以根据现有数据在何处关联数据。

  • Key-Value stores : These are the simplest NoSQL databases. In this each is stored with a key to identify it. In some Key-value databases, we can even save the typr of the data saved along, like in Redis.

    键值存储:这些是最简单的NoSQL数据库。 在其中每个都存储有用于识别它的密钥。 在某些键值数据库中,我们甚至可以保存数据的键入,例如在Redis中。

  • Wide-column stores : Used to store large data sets(store columns of data together). Example : Cassandra(Used in Facebook), HBase etc.

    宽列存储:用于存储大型数据集(将数据列存储在一起)。 例如:Cassandra(在Facebook中使用),HBase等。

NoSQL数据库的一些优点 (Some Advantages of NoSQL Databases)

Here we will be discussing some of the main advantages of NoSQL databases with examples.

在这里,我们将通过示例讨论NoSQL数据库的一些主要优点。

动态架构 (Dynamic Schemas)

You must be wondering what does dynamic schema means? In Relational Databases like Oracle, MySQL we define table structures, right? For example, if we want to save records of Student Data, then we will have to create a table named Student, add columns to it, like student_id, student_name etc, this is called defined schema, where in we define the structure before saving any data.

您一定想知道动态模式意味着什么? 在像Oracle,MySQL这样的关系数据库中,我们定义表结构,对吗? 例如,如果要保存Student Data的记录,则必须创建一个名为Student的表,并向其中添加列,例如student_idstudent_name等,这称为已定义模式,在此我们定义结构,然后保存任何数据。

If in future we plan to add some more related data in our Student table, then we will have to add a new column to our table. Which is easy, if we have less data in our tables, but what if we have millions of records. Migration to the updated schema would be a hectic job. NoSQL databases solve this problem, as in a NoSQL database, schema definition is not required.

如果将来我们计划在学生表中添加更多相关数据,那么我们将不得不在表中添加新列。 如果表中的数据较少,这很容易,但是如果我们有数百万的记录,该怎么办。 迁移到更新的架构将是一件繁重的工作。 NoSQL数据库解决了此问题,因为在NoSQL数据库中,不需要架构定义。

分片 (Sharding)

In Sharding, large databases are partitioned into small, faster and easily manageable databases.

在分片中,大型数据库被划分为小型,快速且易于管理的数据库。

The (classic) Relational Databases follow a vertical architecture where in a single server holds the data, as all the data is related. Relational Databases does not provide Sharding feature by default, to achieve this a lot of efforts has to be put in, because transactional integrity(Inserting/Updating data in transactions), Multiple table JOINS etc cannot be easily achieved in distributed architecture in case of Relational Databases.

(经典的)关系数据库遵循垂直架构,在该架构中,由于所有数据都是相关的,因此在单个服务器中保存数据。 关系数据库默认情况下不提供分片功能,为此必须付出很多努力,因为在关系型情况下,事务完整性(在事务中插入/更新数据),多表JOINS等在分布式体系结构中不易实现数据库。

NoSQL Databases have the Sharding feature as default. No additional efforts required. They automatically spread the data across servers, fetch the data in the fastest time from the server which is free, while maintaining the integrity of data.

NoSQL数据库默认具有分片功能。 无需额外的努力。 它们自动在服务器之间分布数据,在最快的时间内从免费服务器中获取数据,同时保持数据完整性。

复写 (Replication)

Auto data replication is also supported in NoSQL databases by default. Hence, if one DB server goes down, data is restored using its copy created on another server in network.

默认情况下,NoSQL数据库还支持自动数据复制。 因此,如果一台数据库服务器出现故障,将使用在网络中另一台服务器上创建的副本来还原数据。

集成缓存 (Integrated Caching)

Many NoSQL databases have support for Integrated Caching, where in the frequently demanded data is stored in cache to make the queries fater.

许多NoSQL数据库都支持集成缓存,其中经常需要的数据存储在缓存中以使查询更胖。

MongoDB-NoSQL数据库 (MongoDB - NoSQL Database)

MongoDB is a NoSQL database written in C++ language. Some of its drivers use the C programming language as the base. MongoDB is a document oriented database where it stores data in collections instead of tables. The best part of MongoDB is that the drivers are available for almost all the popular programming languages.

MongoDB是用C ++语言编写的NoSQL数据库。 它的某些驱动程序使用C编程语言作为基础。 MongoDB是一个面向文档的数据库,它将数据存储在集合中而不是表中。 MongoDB最好的部分是驱动程序可用于几乎所有流行的编程语言。

In today's competitive technological world, every company has started hosting its enterprise applications over the cloud in order to expand the business globally, provide faster services and to personalise the customer's experience with the application and overall business. And NoSQL has become the first choice in database technology for developing such applications.

在当今竞争激烈的技术世界中,每家公司都已开始通过云托管其企业应用程序,以便在全球范围内扩展业务,提供更快的服务并通过应用程序和整体业务个性化客户的体验。 NoSQL已成为开发此类应用程序的数据库技术的首选。

翻译自: https://www.studytonight.com/mongodb/what-is-nosql

nosql简介

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值