NoSQL Guide » CouchDB https://nosqlguide.com Tips and tricks for developers using NoSQL databases. Mon, 06 Oct 2014 06:25:04 +0000 en-US hourly 1 http://wordpress.org/?v=3.9.2 Intro to CouchDB – A NoSQL Document Store https://nosqlguide.com/document-store/intro-to-couchdb-a-nosql-document-store/ https://nosqlguide.com/document-store/intro-to-couchdb-a-nosql-document-store/#comments Wed, 13 Aug 2014 07:00:27 +0000 https://nosqlguide.com/?p=186 Apache CouchDB (or just CouchDB) takes database technology to the Internet, even using the standard HTTP web protocol for reading and writing data. CouchDB is also designed to handle huge quantities of information with little structure while remaining highly scalable and reliable.   The name ‘Couch’ is an acronym formed from ‘Cluster of unreliable commodity hardware’.  Following its first release in 2005, CouchDB became an Apache project in 2008, with the first stable version available in 2010. While CouchDB is usually categorized as a NoSQL data store, it also offers the possibility of ACID (Atomic Consistent Isolated Durable) transaction properties.

Built-In Support for Concurrency and Fault-Tolerance

CouchDB uses the Erlang programming language as its development platform. Erlang has a long-standing history in the telecommunications sector as the basis for reliable systems. It also has two further properties that carry over into CouchDB. Firstly, it can take advantage of multiple CPU cores for higher performance. Secondly, it is well-adapted to small devices as well as large systems. Consequently, CouchDB is available on Android systems as well as Apple Mac, BSD Unix, Linux, Solaris and Windows. It is licensed under the Apache 2.0 License, giving the user the royalty-free right to use and modify the software. The original creator of CouchDB, Damian Katz, has also built a new version named Couchbase, with a memcached-style API instead of HTTP, and enhancements such as cluster auto-sharding.  Their website offers a detailed comparison of Couchbase vs CouchDB for additional information.

When Would You Choose CouchDB?

CouchDB is a natural candidate for collaborative web applications in particular and for web apps and document-oriented applications in general. CRM and CMS systems can benefit from its capabilities, with their requirements for accumulating and occasionally changing data, and running predefined queries. CouchDB emphasizes effective detection and resolution of data conflicts too, and facilitates offline working (for example in mobile apps) as well as online. Multi-site deployment is enhanced through the use of master-to-master replication of data.

Getting Started with CouchDB

CouchDB can be installed on the systems mentioned above, and is also available as a hosted service from three providers: Cloudant, offering CouchDB hosting and Big Data analytics; Iris Couch, with CouchDB hosting and consultancy services; and Couchappy, targeting high-performance CouchDB hosting. Thanks to the HTTP API built into CouchDB, it can serve web apps directly. Documents in CouchDB can be accessed and indexes can be queried using a web browser. Validation functions for applications that require robust checks on new documents are also available.

Who Uses CouchDB Today?

With its web orientation, CouchDB is used in a variety of server-based and mobile applications, including online dating, car sales, blogs and Facebook applications. Some high-profile examples include the BBC (British Broadcasting Corporation) for its dynamic content platforms, Credit Suisse for internal commodities trading use and Infinigon for its social analytical trade signal system.  Publicly available software products using CouchDB address areas such as site creation, message board creation and management, presentation, brainstorming and idea management, project tracking, and cloud federation.

 

]]>
https://nosqlguide.com/document-store/intro-to-couchdb-a-nosql-document-store/feed/ 0
Guide to Document Databases – NoSQL Explained https://nosqlguide.com/document-store/nosql-databases-explained-document-databases/ https://nosqlguide.com/document-store/nosql-databases-explained-document-databases/#comments Wed, 30 Apr 2014 02:41:18 +0000 https://nosqlguide.com/?p=73 How do you store and retrieve different kinds of documents in traditional databases that use fixed data schemas? The answer is ‘with difficulty’. Traditional SQL or relational databases have rigidly defined ways of organizing their data. Once the schema is in place, any application using that database can only add or retrieve records that match that schema. However, another approach – that of the NoSQL (‘Not only SQL’) document database – allows a much more flexible solution.

Documents for Speed and Flexibility

NoSQL document databases use the concept of a document instead of a table or ‘relation’. They are designed to handle semi-structured data that simply don’t fit into relational databases. NoSQL databases in general have come to the forefront as the limitations of relational databases in an increasingly Big Data world have become apparent. Among further advantages of NoSQL databases or stores as they are also known are increased scalability and speed of data storage and retrieval. Whether you choose to use an RDBMS (relational database management system) or NoSQL database will depend on your application and your requirements. Both have roles to play.

Handling Document Structure

At the simplest level, document databases store pairs composed of a key and a ‘document’, which is a more or less complex data structure. A document can itself contain different pairs of key values, key arrays and possibly also nested documents. Compared with NoSQL key value stores where the objects held are not interpreted by the database system, NoSQL document stores do recognize the structure of the documents being held. Documents can also be grouped into collections. On the other hand, like a key value store (and other NoSQL databases), a document store can partition and replicate data for automatic recovery.

APIs and Document Encoding

An API or a query language then allows users and applications to retrieve documents based on their content, or the values of certain fields. The structure of the fields in the documents is dynamic. Users can freely modify, add or remove fields from existing documents. Frequently used document encodings to allow fields to be used like this include XML, JSON (JavaScript Object Notation), PDF and Microsoft Office formats (such as MS Word and Excel).

Possible Uses

Users of NoSQL document stores include publishing and media companies. They can store different text-heavy data on one platform for access for e-learning and research via content-driven applications. More generally, organizations that generate large collections of data see benefit in using NoSQL document databases to bring different data types together. Departments can cross-reference each other’s information so that enterprise-wide understanding is improved and silo thinking avoided.

Examples of NoSQL Document Database Systems

Popular NoSQL document database solutions include CouchDB, MongoDB and RavenDB. All of these solutions are Open Source, although they have different backgrounds and profiles. CouchDB is part of the Apache Software Foundation: it accepts queries using JavaScript and offers data views as simple JSON objects. It also offers eventual consistency: this is data synchronization between different machines on a ‘sooner or later’ basis.

By comparison, MongoDB offers both eventual and immediate consistency. In this sense, MongoDB is closer to an RDBMS and a guarantee of no data loss. While it runs under Linux, Mac OS X and Windows, MongoDB does not offer an Android version (CouchDB does). For Windows platform users, RavenDB offers similar NoSQL document store functionality, plus an integrated .NET API for application integration.

]]>
https://nosqlguide.com/document-store/nosql-databases-explained-document-databases/feed/ 0