SQL or nosql--in the cloud computing environment who should be selected?

Source: Internet
Author: User
Keywords Data models extensions whether select complex

What is the real difference between NoSQL and SQL? Essentially, because different access patterns lead to differences in NoSQL and SQL scalability and performance.

NoSQL only allows data to be accessed in restricted predefined modes. For example, DHT (Distributed Hash Table) is accessed through the Hashtable API. Other NoSQL data service access modes are also restricted. Scalability and performance structures are therefore predictable and reliable.

In SQL, access patterns are not known beforehand, SQL is a common language that allows data to be accessed in a variety of ways, and programmers have limited control over the execution capabilities of SQL statements.

In other words, in SQL, the data model does not perform specific work and data. Emphasize the establishment of data integrity, simplicity, standardization and abstraction. This is extremely important for all large and complex applications.

Why NoSQL?

The method provided by NoSQL has great advantages for SQL databases. Because it allows new levels of application expansion. The new data services build the cloud and build the distributed based on the truly scalable architecture and architecture. This is very appealing for application development. No DBA, no complex SQL queries.

This is not a small problem, a good programmer is free to choose a data model, use familiar tools to write applications, reduce reliance on others, and test and optimize the code without making guesses or a black box (DB) count.

These are all the main advantages of NoSQL movement, but NoSQL is not omnipotent, in particular, the selection of data models, interface specifications and the current face of new services such as mobile business data processing problems, are nosql unavoidable.

NoSQL is not everything.

Data model

Without a unified, well-defined data model, there is a flaw in whatever technology is used.

The SQL data model defines highly structured data structures and a rigorous definition of the relationships between these structures. Query operations performed on such data models are more restrictive and may result in complex data traversal operations. But the complexity of the data structure and the complexity of the query causes the system to have the following limitations: For example, when the amount of data is increased to a machine that cannot be accommodated, we need to distribute different data tables to different machines, and if your structured data is not that strong, or the requirements for each row of data are more flexible, The possible relational data model is too strict; again, using a simple query language can lead to more complex logic in the application layer, but it simplifies the work of the storage system so that it only needs to respond to simple requests.

In addition, the NoSQL database is not uniquely suited to store large amounts of data or large data, and it is clear that SQL databases can be extremely scalable with good partitioning design.

Interface and interoperability issues

Admittedly, the NoSQL data service interface has yet to be regulated. DHT, for example, is a simple interface, but still has no standard semantics. Each DHT service uses its own set of interfaces. Another big problem is that different data structures, such as DHT and binary tree, are just as examples of shared data objects. Of all these services, pointers do not have intrinsic semantics. In fact, it is important for these services to handle interoperability as a developer's responsibility, especially when data is required to be accessed by multiple services. A simple example: background work is implemented by Java, Web service class work is implemented by PHP, data can be easily accessed from two domains data? Obviously, people can use Web services as front-end data access tiers, but nosql can make things more complex and reduce business agility, flexibility and performance while increasing development effort.

Mobile Services

In the mobile business world, you need a set of tools that are not only scalable but also easy to manage and stabilize, and have a fixed set up server on the cloud. When problems arise, it is not necessary to diagnose the problem by judging the entire system or the development platform, but through remote access-which is what the operational managers are facing, but it is difficult to achieve the service capabilities that NoSQL currently offers, even Amazon's hosting environment.

How does SQL and NoSQL combine?

All in all, on the NoSQL and SQL choices, you need to know the following:

Data model and Operation model: is your application-layer data Model A row, object, or document type? Does the system support you with some statistical work?

Reliability: When you update the data, will the new data be immediately written to the persistent storage? Is the new data synchronized to more than one machine?

Scalability: How large is your data, can the single machine be able to accommodate? Do you want to support your reading and writing?

Partitioning policy: Do you need a single piece of data to be present on multiple machines, given your requirements for extensibility, availability, or persistence? Whether you need to know which machine the data is on and whether you know.

Consistency: Are your data replicated to multiple machines, and how does the data at different points ensure consistency?

Transaction mechanism: Does your business need acid transaction mechanism?

Single-Machine performance: If you're going to persist data on a disk, which data structure will meet your needs (do you need to read more or write more)? Does the write operation become a disk bottleneck?

Load assessment: For a less readable application, such as Web applications that respond to user requests, we will always devote a lot of attention to the load. You may need to monitor the size of the data and summarize the data for multiple users. Do you need such a feature for your application scenario?

Implement SQL database using NoSQL schema?

Using the NoSQL infrastructure to implement the SQL database is a good solution. An SQL database is extensible, manageable, cloud-ready, highly available, fully built on the NoSQL Infrastructure (distributed), but still provides all the benefits of the SQL database, such as interoperability, well-defined semantics, and more.

This hybrid structure may not be as pure as a nosql service, but enough to meet 80% of the market needs for more stable systems, scalability, and cloud services.

This solution also allows for easy migration of existing applications to the cloud environment, thereby protecting the organization's huge investment in these applications.

In my opinion, the SQL database built on NoSQL can provide the highest value for those customers who are expected to be flexible and efficient during their growth.

(Responsible editor: admin)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.