Couchbase Server 4.0 BETA

Query without compromise. Scale in multiple dimensions. Really.

What's Couchbase Server? section

What's Couchbase Server?

Couchbase Server is an open source NoSQL database. Imagine a document database with integrated caching, cross data center replication, and mobile synchronization. Now, add querying and secondary indexing.

It's not a dream. Couchbase Server 4.0, now in beta.

Query, Scale, Repeat section

Query, Scale, Repeat

Querying with N1QL

N1QL enables you to query a document database without limitations and without compromise - sort, filter, transform, group, and combine data with a query. That’s right. You can combine data from multiple documents with a JOIN. That flexible data model you were promised? This is it. You’re no longer limited to “single table” and “table per query” data models.

N1QL is a declarative query language that extends SQL for JSON. However, developers can rely on native framework integration or a fluent API to build queries in addition to writing query statements.

// Query Statement
SELECT * FROM databases WHERE category='NoSQL'

// Results

{
    "name": "Couchbase Server 4.0",
    "version": "Beta",
    "category": "NoSQL",
    "features": [
        {
            "name": "N1QL",
            "capabilities": [
                "JOIN", "NEST", "UNNEST"
            ]
        }
    ]
}

N1QL Query Documentation

// Fluent API
bucket.query(Query.simple(select("name").from("databases").where(x("category").eq(s("NoSQL")))));

// Query Statement
bucket.query(Query.simple("SELECT name FROM databases WHERE category='NoSQL'"));

Java Query Documentation

// LINQ
var query = from db in bucket.Queryable<Database>(bucket)
where db.category == "NoSQL"
select db.name;

// Query Statement
var queryRequest = new QueryRequest().Statement("SELECT name FROM databases WHERE category='NoSQL'");

.NET Query Documentation

// Query Statement
bucket.query(couchbase.N1qlQuery.fromString("SELECT name FROM databases WHERE category='NoSQL'"));

Node.js Query Documentation

// Query Statement
$bucket->query(CouchbaseN1qlQuery::fromString("SELECT name FROM databases WHERE category='NoSQL'"));

PHP Query Documentation

// Query Statement
lcb_CMDN1QL cmd = {0};
cmd.query = “SELECT name FROM databases WHERE category='NoSQL'”;

C/C++ Query Documentation

// Query Statement
bucket.n1ql_query(N1QLQuery(“SELECT name FROM databases WHERE category='NoSQL'”));

Python Query Documentation

You can improve query performance with secondary indexes. Want to create a bunch of indexes? Go for it. Want to create a compound index on multiple fields? Go for it. Worried about what will happen to query performance as the number of nodes increases? Don't. We implemented global secondary indexes. The key word being "global". A global secondary index is not partitioned. It's a whole index. After all, it's a lot faster to check a whole index on one node than it is to check a partial index on every node.

Query, Scale, Repeat section

Multi-Dimensional Scaling

What if you decomposed a database into a set of services: one for querying, one for indexing, and one for storage? What if you could run different services on different nodes to not only avoid resource contention, but to optimize hardware? What if you could scale a single service?

You can. We call it Multi-Dimensional Scaling.

You can find out everything there is to know about Couchbase Server 4.0 here.

Beta Downloads and SDKs

Get Started

Install Couchbase Server 4.0 Beta and the sample app.

Step one Download Couchbase Server 4.0 Beta

Logos OS How to install Download
Windows Install Instructions Download

Windows Installation Instructions

  1. Locate and double click the download to install it.
  2. Get Couchbase Server up and running quickly by following the instructions in the Getting Started Guide
Ubuntu 14.04 Install Instructions Download

Ubuntu 14.04 Installation Instructions

  1. Download or transfer the download to your Ubuntu system.
  2. Install the package using the dpkg command as a privileged user under sudo.
    For example: sudo dpkg –i couchbase-server-enterprise_4.0.0-beta-ubuntu14.04_amd64.deb
  3. Get Couchbase Server up and running quickly by following the instructions in the Getting Started Guide
Ubuntu 12.04 Install Instructions Download

Ubuntu 12.04 Installation Instructions

  1. Download or transfer the download to your Ubuntu system.
  2. Install the package using the dpkg command as a privileged user under sudo.
    For example: sudo dpkg –i couchbase-server-enterprise_4.0.0-beta-ubuntu12.04_amd64.deb
  3. Get Couchbase Server up and running quickly by following the instructions in the Getting Started Guide
Red Hat 7 Install Instructions Download

Red Hat 7 Installation Instructions

  1. Download or transfer the download to your CentOS or Red Hat system.
  2. Install the package using the rpm command as a privileged user under sudo.
    For example: sudo rpm --install couchbase-server-enterprise-4.0.0-beta-centos7.x86_64.rpm
  3. Get Couchbase Server up and running quickly by following the instructions in the Getting Started Guide
Red Hat 6 Install Instructions Download

Red Hat 6 Installation Instructions

  1. Download or transfer the download to your CentOS or Red Hat system.
  2. Install the package using the rpm command as a privileged user under sudo.
    For example: sudo rpm --install couchbase-server-enterprise-4.0.0-beta-centos6.x86_64.rpm
  3. Get Couchbase Server up and running quickly by following the instructions in the Getting Started Guide
Mac OS X Install instructions Download Hyper-V Virtual Machine

Mac OS X Installation Instructions

  1. Locate and double click the download to unzip it.
  2. Click and drag the enclosed Couchbase Server application to the Applications folder.
    Your web browser should then open to the web console from which you can configure your new Couchbase Server installation.
  3. Double click the Couchbase Server application in the applications folder.
  4. Get Couchbase Server up and running quickly by following the instructions in the Getting Started Guide
Debian 7 Install instructions Download Hyper-V Virtual Machine

Debian 7 Installation Instructions

  1. Download or transfer the download to your Debian system.
  2. Install the package using the dpkg command as a priviledged user under sudo.
    For example: sudo dpkg –i couchbase-server-enterprise_4.0.0-beta-debian7_amd64.deb
  3. Get Couchbase Server up and running quickly by following the instructions in the Getting Started Guide
SuSE Linux 11 Install instructions Download Hyper-V Virtual Machine

SuSE Linux 11 Installation Instructions

  1. Download or transfer the download to your SuSE system.
  2. Install the package using the rpm command as a privilged user under sudo.
    For example: sudo rpm —install couchbase-server-enterprise-4.0.0-beta-suse11.3.x86_64.rpm
  3. Get Couchbase Server up and running quickly by following the instructions in the Getting Started Guide
Oracle Linux 6 Install instructions Download Hyper-V Virtual Machine

Oracle Linux 6 Installation Instructions

  1. Download or transfer the download to your Oracle system.
  2. Install the package using the rpm command as a privilged user under sudo.
    For example: sudo rpm --install couchbase-server-enterprise-4.0.0-beta-oel6.x86_64.rpm
  3. Get Couchbase Server up and running quickly by following the instructions in the Getting Started Guide

Step two (optional) Install the Sample App

This sample application demonstrates how documents are queried by logging all queries to the console. You can learn more about the data model, application architecture, and queries in its documentation.

  1. Install Couchbase Server 4.0 (no need for setup and configuration)
  2. Install Node.js
  3. Enter the following commands in a terminal

    
    mkdir ~/try-cb
    git clone https://github.com/ToddGreenstein/try-cb-nodejs.git ~/try-cb
    cd ~/try-cb
    npm install
    node app.js
    							

    Do not close the terminal

  4. Enter the following command in a new terminal
    
    curl -v -X POST http://localhost:3000/api/status/provisionCB
    							

    This performs setup and configuration for you (User: Administrator, Pass: password)

  5. Wait until you see the following
    
    INDEXES ONLINE: [ { '$1': 7 } ]
    { indexes: 'built' }
    						
  6. Go to http://localhost:3000 in a browser
  7. Find a flight!
  8. Type control-c in the first terminal to shut down the travel app