1.

Record Nr.

UNINA9910592994003321

Autore

Reid Rob

Titolo

Practical CockroachDB : building fault-tolerant distributed SQL databases / / Rob Reid

Pubbl/distr/stampa

New York, New York : , : Apress Media LLC, , [2022]

©2022

ISBN

1-4842-8224-8

Descrizione fisica

1 online resource (264 pages)

Disciplina

005.365

Soggetti

SQL (Computer program language)

Database management

Distributed databases

Cloud computing

Application software - Development

Web applications

Relational databases

Lingua di pubblicazione

Inglese

Formato

Materiale a stampa

Livello bibliografico

Monografia

Note generali

Includes index.

Nota di contenuto

Intro -- Table of Contents -- About the Author -- About the Technical Reviewer -- Acknowledgments -- Introduction -- Chapter 1: The Reason for CockroachDB -- What Is CockroachDB? -- CockroachDB's Architecture -- What Does CockroachDB Solve? -- Who Is CockroachDB For? -- Chapter 2: Installing CockroachDB -- Licensing -- Free -- Paid For -- CockroachDB Core -- Local Installation -- Binary Install -- Docker Install -- Kubernetes Install -- 1_pod-disruption-budget.yaml -- 2_stateful-set.yaml -- 3_private-service.yaml -- 4_public-service.yaml -- 5_init.yaml -- Multinode Clusters -- Multiregion Clusters -- Multiregion Deployment -- Zone Failure Goal -- Regional Failure Goal -- The demo Command -- CockroachDB Serverless/Dedicated -- Creating a Cluster -- Connecting to Your Cluster -- Summary -- Chapter 3: Concepts -- Database Objects -- Data Types -- UUID -- ARRAY -- BIT -- BOOL -- BYTES -- DATE -- ENUM -- DECIMAL -- FLOAT -- INET -- INTERVAL -- JSONB -- SERIAL -- STRING -- TIME/TIMETZ -- TIMESTAMP/TIMESTAMPTZ -- GEOMETRY -- Functions



-- Geo-partitioned Data -- REGION BY ROW -- REGION BY TABLE -- Chapter 4: Managing CockroachDB from the Command Line -- The Cockroach Binary -- The start and start-single-node Commands -- The demo Command -- The cert Command -- The sql Command -- The node Command -- The import Command -- The sqlfmt Command -- The workload Command -- Chapter 5: Interacting with CockroachDB -- Connecting to CockroachDB -- Connecting with Tools -- Connecting Programmatically -- Go Example -- Python Example -- Ruby Example -- Crystal Example -- C# Example -- Designing Databases -- Database Design -- Schema Design -- Table Design -- Naming -- Column Data Types -- Indexes -- View Design -- Simplify Queries -- Restrict Table Data -- Moving Data -- Exporting and Importing Data -- Watching for Database Changes -- Kafka Sink -- Webhook Sink.

Chapter 6: Data Privacy -- Global Regulations -- Location-Specific Considerations -- UK Company with UK and European Customers -- European Company with European and American Customers -- American Company with American Customers -- American Company with American and European Customers -- A Non-Chinese Company with Chinese Customers -- Personally Identifiable Information -- Encryption -- In Transit -- At Rest -- Database Encryption -- Table Encryption -- Chapter 7: Deployment Topologies -- Single-Region Topologies -- Development -- Basic Production -- Multiregion Topologies -- Regional Tables -- Global Tables -- Follower Reads -- Follow-the-Workload -- Antipatterns -- Summary -- Chapter 8: Testing -- Structural Testing -- Functional Testing -- Black Box Testing -- Create a Simple Application -- Test the Application -- Testing with Application Code -- White Box Testing -- Referential Integrity Checks -- Indexes and Query Plans -- Nonfunctional Testing -- Performance Testing -- Scaling Up Your Test Environment -- Resilience Testing -- Chapter 9: Production -- Best Practices -- SELECT Performance -- INSERT Performance -- UPDATE Performance -- Cluster Maintenance -- Moving a Cluster -- Backing Up and Restoring Data -- Full Backups -- Incremental Backups -- Encrypted Backups -- Locality-Aware Backups -- Scheduled Backups -- Cluster Design -- Cluster Sizing -- Node Sizing -- Monitoring -- Index.

Sommario/riassunto

Get a practical introduction to CockroachDB. This book starts with installation and foundational concepts and takes you through to creating clusters that are ready for production environments. You will learn how to create, optimize, and operate CockroarchDB clusters in single and multi-region environments. You will encounter anti-patterns to avoid, as well as testing techniques for integration and load testing. The book explains why CockroachDB exists, goes over its major benefits, and quickly transitions into installing and configuring CockroachDB. Just as quickly, you'll be creating databases, getting data into those databases, and querying that data from your applications. You'll progress to data privacy laws such as GDPR and CCPA, and learn how CockroachDB's global distribution features can help you comply with ever-shifting data sovereignty regulations. From there, you'll move into deployment topologies, guidance on integration testing and load testing, best practices, and a readiness checklist for production deployments. What You Will Learn Deploy and interact with CockroachDB Design and optimize databases and tables Choose the correct data types for modeling your data Protect data with database and table encryption Achieve compliance with international data privacy regulations Scale your databases in a way that enhances their performance Monitor changes to the data and health of your databases Who This Book Is For Developers and database administrators who want



to provide a secure, reliable, and effortlessly distributed home for their data; those who wish to use a modern tool to tackle the kinds of scaling challenges that have previously required dedicated teams of people to solve; anyone who wants to leverage their database to solve non-trivial, real-world challenges while protecting their data and users.