CockroachDB: The Definitive Guide: Distributed Data at Scale
- Length: 500 pages
- Edition: 1
- Language: English
- Publisher: O'Reilly Media
- Publication Date: 2022-05-17
- ISBN-10: 1098100247
- ISBN-13: 9781098100247
- Sales Rank: #1816812 (See Top 100 Books)
Get the lowdown on CockroachDB, the elastic SQL database built to handle the demands of today’s data-driven world. With this practical guide, software developers, architects, and DevOps teams will discover the advantages of building on a distributed SQL database. You’ll learn how to create applications that scale elastically and provide seamless delivery for end users while remaining exceptionally resilient and indestructible.
Written from scratch for the cloud and architected to scale elastically to handle the demands of cloud native and open source, CockroachDB makes it easier to build and scale modern applications. If you’re familiar with distributed systems, you’ll quickly discover the benefits of strong data correctness and consistency guarantees as well as optimizations for delivering ultralow latencies to globally distributed end users.
With this thorough guide, you’ll learn how to:
- Plan and build applications for distributed infrastructure, including data modeling and schema design
- Migrate data into CockroachDB
- Read and write data and run ACID transactions across distributed infrastructure
- Optimize queries for performance across geographically distributed replicas
- Plan a CockroachDB deployment for resiliency across single-region and multiregion clusters
- Secure, monitor, and optimize your CockroachDB deployment
1. Chapter 1: Introduction to CockroachDB A Brief History of Databases Pre-relational Databases The Relational Model Implementing the relational model Transactions The SQL Language The RDBMS hegemony Enter the Internet The NoSQL movement The emergence of distributed SQL The Advent of CockroachDB CockroachDB design goals CockroachDB Releases CockroachDB in action CockroachDB at Baidu Cockroach at MyWorld CockroachDB at Bose Summary 2. Chapter 2: CockroachDB architecture The CockroachDB Cluster Architecture Ranges and Replicas The CockroachDB software stack The CockroachDB SQL layer SQL Optimization From SQL to Key-Values Tables as represented in the KV store Column Families Indexes in the KV store Inverted Indexes The STORING clause Table Definitions and schema changes The CockroachDB Transactional layer MVCC principles Transaction workflow Write intents Parallel Commit Transaction clean up Overview of transaction flow Read/Write conflicts Clock synchronization and clock skew The CockroachDB distribution layer Meta Ranges Gossip Leaseholders Range Splits Multi-region distribution The CockroachDB Replication layer Raft Raft and Leaseholders Closed timestamps and follower reads The CockroachDB Storage layer Log Structured Merge (LSM) Trees SSTables and Bloom Filters Deletes and updates MultiVersion Concurrency Control The Block cache Summary 3. Getting Started Installation Installing CockroachDB software Creating a CockroachCloud cluster Starting a local single-node server Starting up CockroachDB in a docker container Starting up a secure server Remote connection Creating a Kubernetes cluster Using a GUI client Exploring CockroachDB Adding some data Databases and tables Issuing SQL The console Working with programming languages Connecting to CockroachDB from NodeJS Connecting to CockroachDB from Java Connecting to CockroachDB from Python Connecting to CockroachDB from Go Summary 4. COCKROACHDB SQL SQL LANGUAGE COMPATIBILITY QUERYING DATA WITH SELECT The FROM clause JOINS Anti-joins CROSS JOINS Set operations Group operations Subqueries Correlated subquery The WHERE clause Common Table expressions ORDER BY Window functions Other SELECT clauses CockroachDB arrays Working with JSON Summary of SELECT CREATING TABLES AND INDEXES Computed Columns Datatypes Primary Keys Constraints INDEXES CREATE TABLE AS SELECT ALTERING TABLES DROPPING TABLES VIEWS INSERTING DATA IMPORT/IMPORT INTO UPDATE UPSERT DELETE TRANSACTIONAL STATEMENTS BEGIN TRANSACTION SAVEPOINT COMMIT ROLLBACK SELECT FOR UPDATE AS OF SYSTEM TIME OTHER DATA DEFINITION LANGUAGE TARGETS ADMINISTRATIVE COMMANDS THE INFORMATION_SCHEMA SUMMARY 5. CockroachDB Schema Design Logical Data modelling Normalization Don’t go too far Primary Key choices Special purpose Designs Physical design Entities to tables Attributes to Columns Primary key design Foreign key constraints Denormalization Replicating columns to avoid joins Summary tables Vertical partitioning Horizontal Partitioning Repeating groups JSON document models JSON document anti-patterns Indexing JSON attributes Using JSON or Arrays to avoid joins Indexes Index selectivity Index break-even point Index overhead Composite indexes Covering indexes Composite and Covering index performance Guidelines for composite indexes Indexes and null values Inverted indexes Partial indexes Sort-optimizing indexes Spatial indexes Hash Sharded indexes Measuring Index effectiveness Summary About the Authors
Donate to keep this site alive
How to download source code?
1. Go to: https://www.oreilly.com/
2. Search the book title: CockroachDB: The Definitive Guide: Distributed Data at Scale
, sometime you may not get the results, please search the main title
3. Click the book title in the search results
3. Publisher resources
section, click Download Example Code
.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.