This configuration is the majority of the development and production deployment. When you run out of disk capacity, you add capacity. When you run out of CPU capacity, you migrate the workload to a larger machine with more sockets, more cores. Or these days, bigger VMs or containers.
The APP for server communication uses proprietary oracle protocol. Higher-level SDKs work on top of this.
This configuration is used mainly for development on your laptop, cloud, VM, or container. Single node deployment is rarely for production. In fact, Couchbase gives you a warning when you’ve deployed on a single node there’s only one copy of your data! High availability is built into the core.
The API for server communication is via REST API and Memcached binary protocol. All SDKs use REST or Memcached protocols underneath.
Connection for Memcached. For each request for data fetch, and modification, the query is a REST call.
->Databases
->Schema
-> Tables
-> Rows
-> Columns
One Oracle instance can have multiple databases.
One Oracle database can have multiple schemas and each schema can have multiple tables. Each table can have multiple partitions, indexes, constraints, triggers, etc.
-> Buckets
-> Scopes
-> Collections
-> JSON documents
-> Fields
One Couchbase instance can have up to 30 BUCKETS. Each bucket can have many scopes, each scope many collections. Within each scope, you can also create functions (in SQL, Javascript, Python).
Each JSON document will have a user-provided unique document key.
E.g: “cust.x817.022.4u2”
“cust.x2317.402.2742”
“parts.lkfh38.sldkv”
“parts.lkfh38.sldkv”
“parts.lkfh38.sldkv”
All the documents in Couchbase have to be JSON documents conforming to http://json.org/
Consider a simple 1-level JSON document.
Document Key: “cust:2984”
Doc: {“a”:1, “b”: True, “c”: “Hello”}
In your mind map, you can think of this document as a row, individual attributes, “a”, “b”, “c” as columns, the document key as a primary key.
This document contains simple scalar values.JSON can contain arrays and objects, arrays of objects, objects containing arrays. Attribute names are referenced from top-down (think of objects in Oracle. This will be discussed in detail in the “Database Types” section.
(Homogeneous deployment).
Each node in the cluster can have one or more combinations of the services: Data, Query, Index, Search, Analytics, and eventing. The cluster manager (co-ordinator) is aware of the distribution and availability of the services and will inform the services about each other.
The SDK is also aware of the data distribution, query, and FTS nodes. SDK tries to balance the workload among different query nodes for query workload, data nodes for data/KV workload, FTS nodes for search workload.
Multi-node deployment shares the same disk/storage. Hence, Shared Disk System. You can scale up to a point by adding more compute and sharing the same disk. Eventually, shared disk and IO throughput become the bottleneck. Transactions are supported by distributed lock manager which reaches a threshold with a small number of nodes. The developer is oblivious (for the most part) to the instances: single node or multi-node RAC. The SQL supported are the same and transactions work seamlessly in a multi-node environment. Oracle has developed a sophisticated distributed lock manager, buffer pool synchronization, etc to achieve this. It does require an expensive Infiniband to maintain speed and performance.
Despite this, it’s not uncommon to partition the workload between multiple RAC nodes to minimize the conflicts in locking, etc.
These services (data, index, query, search, analytics, and eventing) lend themselves to scale out seamlessly. You can have all of the services in each node and simply add new nodes with the same services. All the services will understand the multi-node topology. This makes Couchbase elastic.
Applications don’t use all of the services uniformly. The bottlenecks could be on data, indexer of the query. So, in Couchbase, your size and add new nodes simply to run the bottlenecked services. This will provide optimal resource utilization and better performance compared to a homogeneous deployment. It’ll give you flexibility and reduce your cost. The multi-dimensional scaling is as easy to deploy as any other configuration and manageability remains the same.
The SQL extensions include support for JSON and text search.
Oracle also has XML DB, supporting XML, XQuery, SQL/XML, etc.
The same language is supported for the operational workload (OLTP) and analytical workload (OLAP), just like RDBMS. Developers also get a simple GET and SET API for each document in a collection.
Couchbase also supports built-in SQL and JavaScript functions in the query service to support the equivalent of PL/SQL functionality.
Couchbase FTS (Full-Text Search) helps you create text index and search. This is fully integrated with N1QL
http://bit.ly/2vbcbOF
Oracle has a facility to create hot standby servers, schema-based replication, change capture, and probably more.
Across-multiple clusters, you can replicate the data with built-in XDCR (cross-data center replication).
Relationships between multiple types of documents (e.g. Orders to Customers) can be represented and processed. Either the child (orders) or the parent (customer) can store the primary key of the related documents and then JOIN them. This relationship is implied, not enforced by a constraint (e.g. Foreign Key Constraint) in Couchbase.