CockroachDB - the open source, cloud-native distributed SQL database.

Overview


CockroachDB is a cloud-native SQL database for building global, scalable cloud services that survive disasters.

What is CockroachDB?

CockroachDB is a distributed SQL database built on a transactional and strongly-consistent key-value store. It scales horizontally; survives disk, machine, rack, and even datacenter failures with minimal latency disruption and no manual intervention; supports strongly-consistent ACID transactions; and provides a familiar SQL API for structuring, manipulating, and querying data.

For more details, see our FAQ or architecture document.

Docs

For guidance on installation, development, deployment, and administration, see our User Documentation.

Quickstart

  1. Install CockroachDB.
  2. Start a local cluster and talk to it via the built-in SQL client.
  3. Learn more about CockroachDB SQL.
  4. Use a PostgreSQL-compatible driver or ORM to build an app with CockroachDB.
  5. Explore core features, such as data replication, automatic rebalancing, and fault tolerance and recovery.

Client Drivers

CockroachDB supports the PostgreSQL wire protocol, so you can use any available PostgreSQL client drivers to connect from various languages.

Deployment

  • Test Deployments - Easiest way to test an insecure, multi-node CockroachDB cluster.
  • Production Deployments
    • Manual - Steps to deploy a CockroachDB cluster manually on multiple machines.
    • Cloud - Guides for deploying CockroachDB on various cloud platforms.
    • Orchestration - Guides for running CockroachDB with popular open-source orchestration systems.

Need Help?

Building from source

See our wiki for more details.

Contributing

We welcome your contributions! If you're looking for issues to work on, try looking at the good first issue list. We do our best to tag issues suitable for new external contributors with that label, so it's a great way to find something you can help with!

See our wiki for more details.

Engineering discussion takes place on our public mailing list, [email protected], and feel free to join our Community Slack (there's a dedicated #contributors channel!) to ask questions, discuss your ideas, or connect with other contributors.

Design

For an in-depth discussion of the CockroachDB architecture, see our Architecture Guide. For the original design motivation, see our design doc.

Comparison with Other Databases

To see how key features of CockroachDB stack up against other databases, check out CockroachDB in Comparison.

See Also

Issues
  • sql/pgwire: fix a leak of accounted for memory

    sql/pgwire: fix a leak of accounted for memory

    @rafiss, can I get a suggestion on where to add an automated test?

    Fixes https://github.com/cockroachdb/cockroach/issues/83034.

    sql/pgwire: fix a leak of accounted for memory

    This commit fixes a bug where in case client-provided session params failed to parse, CRDB leaked accounted for memory.

    Release note (bug fix): In case client-provided session params fail to parse, CRDB no longer leaks accounted for memory.

    opened by joshimhoff 1
  • release-22.1: fixes on app filter

    release-22.1: fixes on app filter

    Backport 1/1 commits from #78095. Backport 1/1 commits from #83008.

    /cc @cockroachdb/release


    ui: sort items in the sql activity dropdown menu Fixes https://github.com/cockroachdb/cockroach/issues/78081.

    Previously, app names in the dropdown menu for the stmts, txns, and sessions pages were unsorted. This change sorts these app names.

    Release note (ui change): app names and database names in the dropdown menu are sorted.


    ui: proper handle of unset app name Previously, if a filter for unset app name was selected on Statement page, the Stament Details page was not finding the correct values. Now if no filter is selected, no search params is passed to the Details page. If there is an empty value for the appNames on request, is looking for unset.

    This commit also creates a constant for the unset value and replaces all places to use the constant instead.

    Fixes https://github.com/cockroachdb/cockroach/issues/83002

    Release note (bug fix): Statement Details now find the stats when the unset app filter is selected.


    Release justification: bug fixes

    opened by maryliag 2
  • release-22.1: ui: add period label to SQL Activity pages

    release-22.1: ui: add period label to SQL Activity pages

    Backport 1/1 commits from #83103

    /cc @cockroachdb/release


    This commit adds the period label with information about the period to which we're showing information from. The label is added to Statement, Statement Details, Transaction and Transaction Details pages.

    Partially addresses #82914 Fixes #74523

    This commit also removed the tab Exec Stats from the Statement Details page.

    Fixes #74526

    Release note (ui change): Add period label to pages Statement, Statement Details and Transaction, with information about the period to which we're showing information from. Removal of exec stats tab under Statement Details page.


    Release justification: low risk change

    opened by maryliag 2
  • kvserver: make `server.consistency_check.interval` public

    kvserver: make `server.consistency_check.interval` public

    This setting is private, but referenced from the description on the public server.consistency_check.max_rate setting. We've seen cases where users need to disable consistency checks due to starvation, which is done by setting interval to 0, so it seems helpful to expose this setting publicly as well.

    Resolves #83190. Touches #77432.

    Release note: None

    opened by erikgrinaker 1
  • cdc: Compute virtual columns

    cdc: Compute virtual columns

    Add an option to allow computation of virtual columns when using cdc expressions.

    We should be a bit careful when using this option on the feed with multiple column families. Compute expression can only ever reference a single column family at a time.

    Jira issue: CRDB-17005

    C-enhancement A-cdc T-cdc A-cdc-expressions 
    opened by miretskiy 1
Owner
CockroachDB
the scalable, survivable, SQL database
CockroachDB
TiDB is an open source distributed HTAP database compatible with the MySQL protocol

Slack Channel Twitter: @PingCAP Reddit Mailing list: lists.tidb.io For support, please contact PingCAP What is TiDB? TiDB ("Ti" stands for Titanium) i

PingCAP 31.7k Jun 29, 2022
"Go SQL DB" is a relational database that supports SQL queries for research purposes

A pure golang SQL database for database theory research

auxten 680 Jun 26, 2022
LBADD: An experimental, distributed SQL database

LBADD Let's build a distributed database. LBADD is an experimental distributed SQL database, written in Go. The goal of this project is to build a dat

Tom Arrell 379 May 22, 2022
A course to build the SQL layer of a distributed database.

TinySQL TinySQL is a course designed to teach you how to implement a distributed relational database in Go. TinySQL is also the name of the simplifed

TiDB Incubator 979 Jun 26, 2022
Beerus-DB: a database operation framework, currently only supports Mysql, Use [go-sql-driver/mysql] to do database connection and basic operations

Beerus-DB · Beerus-DB is a database operation framework, currently only supports Mysql, Use [go-sql-driver/mysql] to do database connection and basic

Beerus 6 Mar 5, 2022
Couchbase - distributed NoSQL cloud database

couchbase Couchbase is distributed NoSQL cloud database. create Scope CREATE SCO

Md Abu. Raihan 2 Feb 16, 2022
An open-source graph database

Cayley is an open-source database for Linked Data. It is inspired by the graph database behind Google's Knowledge Graph (formerly Freebase). Documenta

Cayley 14.2k Jun 29, 2022
LinDB is an open-source Time Series Database which provides high performance, high availability and horizontal scalability.

LinDB is an open-source Time Series Database which provides high performance, high availability and horizontal scalability. LinDB stores all monitoring data of ELEME Inc, there is 88TB incremental writes per day and 2.7PB total raw data.

LinDB 2.3k Jun 29, 2022
Native, Protobuf & SQL-compliant objects used by offensive security tools.

Attacked Infrastructure Modular Specification (AIMS) Overview This repository aims to gather various declarations/specification of elements faced or n

null 0 Nov 19, 2021
Native GraphQL Database with graph backend

The Only Native GraphQL Database With A Graph Backend. Dgraph is a horizontally scalable and distributed GraphQL database with a graph backend. It pro

Dgraph 18.1k Jun 24, 2022
A decentralized, trusted, high performance, SQL database with blockchain features

中文简介 CovenantSQL(CQL) is a Byzantine Fault Tolerant relational database built on SQLite: ServerLess: Free, High Availabile, Auto Sync Database Service

CovenantSQL 1.3k Jun 21, 2022
☄ The golang convenient converter supports Database to Struct, SQL to Struct, and JSON to Struct.

Gormat - Cross platform gopher tool The golang convenient converter supports Database to Struct, SQL to Struct, and JSON to Struct. 中文说明 Features Data

永林 271 Jun 21, 2022
Dolt is a SQL database that you can fork, clone, branch, merge, push and pull just like a git repository.

Dolt is a SQL database that you can fork, clone, branch, merge, push and pull just like a git repository. Connect to Dolt just like any MySQL database to run queries or update the data using SQL commands. Use the command line interface to import CSV files, commit your changes, push them to a remote, or merge your teammate's changes.

DoltHub 12.2k Jun 28, 2022
DonutDB: A SQL database implemented on DynamoDB and SQLite

DonutDB: A SQL database implemented on DynamoDB and SQLite

Peter Sanford 96 Jun 15, 2022
This is a simple Golang application that executes SQL commands to clean up a mirror node's database.

This is a simple Golang application that executes SQL commands to clean up a mirror node's database.

Tom 1 Jan 24, 2022
Distributed reliable key-value store for the most critical data of a distributed system

etcd Note: The master branch may be in an unstable or even broken state during development. Please use releases instead of the master branch in order

etcd-io 40.3k Jun 27, 2022
The lightweight, distributed relational database built on SQLite.

rqlite is a lightweight, distributed relational database, which uses SQLite as its storage engine. Forming a cluster is very straightforward, it grace

rqlite 10.6k Jun 26, 2022
TalariaDB is a distributed, highly available, and low latency time-series database for Presto

TalariaDB is a distributed, highly available, and low latency time-series database that stores real-time data. It's built on top of Badger DB.

Grab 97 Jun 18, 2022
Redwood is a highly-configurable, distributed, realtime database that manages a state tree shared among many peers

Redwood is a highly-configurable, distributed, realtime database that manages a state tree shared among many peers. Imagine something like a Redux store, but distributed across all users of an application, that offers offline editing and is resilient to poor connectivity.

Redwood 634 Jun 28, 2022