background preloader

NoSQL

Facebook Twitter

Introduction to NoSQL by Martin Fowler. MongoDB Tutorial. Sans titre. Because of the way they are structured, relational databases usually scale vertically – a single server has to host the entire database to ensure acceptable performance for cross- table joins and transactions.

sans titre

This gets expensive quickly, places limits on scale, and creates a relatively small number of failure points for database infrastructure. The solution to support rapidly growing applications is to scale horizontally, by adding servers instead of concentrating more capacity in a single server. "Sharding" a database across many server instances can be achieved with SQL databases, but usually is accomplished through SANs and other complex arrangements for making hardware act as a single server. Because the database does not provide this ability natively, development teams take on the work of deploying multiple relational databases across a number of machines. Data is stored in each database instance autonomously. NoSQL. Database class for storage and retrieval of modeled data A NoSQL (originally referring to "non SQL" or "non relational")[1] database provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases.

NoSQL

Such databases have existed since the late 1960s, but did not obtain the "NoSQL" moniker until a surge of popularity in the early 21st century,[2] triggered by the needs of Web 2.0 companies.[3][4] NoSQL databases are increasingly used in big data and real-time web applications.[5] NoSQL systems are also sometimes called "Not only SQL" to emphasize that they may support SQL-like query languages, or sit alongside SQL databases in polyglot persistent architectures.[6][7] History[edit] Types and examples[edit] There are various ways to classify NoSQL databases, with different categories and subcategories, some of which overlap. A more detailed classification is the following, based on one from Stephen Yen:[21][22] Not ACID. Set of properties (atomicity, consistency, isolation, durability) of database transactions intended to guarantee validity even in the event of errors, power failures, etc.

not ACID

According to Gray and Reuter, IMS supported ACID transactions as early as 1973 (although the term ACID came later).[3] Characteristics[edit] The characteristics of these four properties as defined by Reuter and Härder are as follows: Atomicity[edit] An example of an atomic transaction is a monetary transfer from bank account A to account B. Consistency[edit] Isolation[edit] Durability[edit] Examples[edit] The following examples further illustrate the ACID properties. CREATE TABLE acidtest (A INTEGER, B INTEGER, CHECK (A + B = 100)); Distributed transaction - difficult for both SQL and NoSQL. A distributed transaction is a database transaction in which two or more network hosts are involved.

Distributed transaction - difficult for both SQL and NoSQL

Usually, hosts provide transactional resources, while the transaction manager is responsible for creating and managing a global transaction that encompasses all operations against such resources. Real-time web. The real-time web is a network web using technologies and practices that enable users to receive information as soon as it is published by its authors, rather than requiring that they or their software check a source periodically for updates.

Real-time web

Difference from real-time computing[edit] The real-time web is fundamentally different from real-time computing since there is no knowing when, or if, a response will be received. The information types transmitted this way are often short messages, status updates, news alerts, or links to longer documents. The content is often "soft" in that it is based on the social web—people's opinions, attitudes, thoughts, and interests—as opposed to hard news or facts. True-realtime web (an "alternate" model)[edit] From another point of view, the real-time web consists in making the client interface (or the web side; or the web layer) of a web application, to communicate continuously with the corresponding real-time server, during every user connection. Scalability. Scalability is the capability of a system, network, or process to handle a growing amount of work, or its potential to be enlarged in order to accommodate that growth.[1] For example, it can refer to the capability of a system to increase its total output under an increased load when resources (typically hardware) are added.

Scalability

An analogous meaning is implied when the word is used in an economic context, where scalability of a company implies that the underlying business model offers the potential for economic growth within the company. Scalability, as a property of systems, is generally difficult to define[2] and in any particular case it is necessary to define the specific requirements for scalability on those dimensions that are deemed important.

Why are Relational Databases “Relational”? Many people wonder why relational databases are called “relational.”

Why are Relational Databases “Relational”?

Some think that it’s because of a logical entity-relationship model you often start your design with. Or, because you have tables and relationships (aka foreign keys) between them. But that’s not the case. The name comes from the mathematical notion of “relation.” It all started with E.