Distributed SQL For Dummies MariaDB Special Edition Andrew C. Oliver & Ted Coombs instant download
Distributed SQL For Dummies MariaDB Special Edition Andrew C. Oliver & Ted Coombs instant download
https://ebookfinal.com/download/distributed-sql-for-dummies-
mariadb-special-edition-andrew-c-oliver-ted-coombs/
https://ebookfinal.com/download/employer-branding-for-dummies-
glassdoor-special-edition-garibaldi/
https://ebookfinal.com/download/ransomware-defense-for-dummies-cisco-
special-edition-lawrence-miller/
https://ebookfinal.com/download/distributed-systems-principles-and-
paradigms-andrew-s-tanenbaum/
https://ebookfinal.com/download/unified-analytics-for-dummies-
databricks-special-edition-ulrika-jagare/
Macs For Dummies 10th Edition For Dummies Computer Tech
Edward C. Baig
https://ebookfinal.com/download/macs-for-dummies-10th-edition-for-
dummies-computer-tech-edward-c-baig/
https://ebookfinal.com/download/ipad-for-dummies-for-dummies-computer-
tech-2nd-edition-edward-c-baig/
https://ebookfinal.com/download/mutual-fund-investing-for-canadians-
for-dummies-1st-edition-andrew-bell/
https://ebookfinal.com/download/washington-d-c-for-dummies-dummies-
travel-4th-edition-tom-price/
https://ebookfinal.com/download/cissp-for-dummies-6th-edition-
lawrence-c-miller/
Distributed SQL For Dummies MariaDB Special Edition
Andrew C. Oliver & Ted Coombs Digital Instant
Download
Author(s): Andrew C. Oliver & Ted Coombs
ISBN(s): 9781394159796, 139415979X
File Details: PDF, 3.10 MB
Year: 2023
Language: english
These materials are © 2023 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.
Distributed
SQL
MariaDB Special Edition
These materials are © 2023 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.
Distributed SQL For Dummies®, MariaDB Special Edition
Published by
John Wiley & Sons, Inc.
111 River St.
Hoboken, NJ 07030-5774
www.wiley.com
Copyright © 2023 by John Wiley & Sons, Inc.
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any
form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise,
except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without
the prior written permission of the Publisher. Requests to the Publisher for permission should be
addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ
07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions.
Trademarks: Wiley, For Dummies, the Dummies Man logo, The Dummies Way, Dummies.com,
Making Everything Easier, and related trade dress are trademarks or registered trademarks of
John Wiley & Sons, Inc. and/or its affiliates in the United States and other countries, and may not
be used without written permission. MariaDB and the MariaDB logo are registered trademarks of
MariaDB. All other trademarks are the property of their respective owners. John Wiley & Sons,
Inc., is not associated with any product or vendor mentioned in this book.
For general information on our other products and services, or how to create a custom For
Dummies book for your business or organization, please contact our Business Development
Department in the U.S. at 877-409-4177, contact info@dummies.biz, or visit www.wiley.com/
go/custompub. For information about licensing the For Dummies brand for products or services,
contact BrandedRights&Licenses@Wiley.com.
ISBN: 978-1-394-15978-9 (pbk); ISBN: 978-1-394-15979-6 (ebk). Some blank pages in the
print version may not be included in the ePDF version.
Publisher’s Acknowledgments
Some of the people who helped bring this book to market include the
following:
Project Manager: Client Account Manager:
Carrie Burchfield-Leighton Jeremith Coward
Sr. Managing Editor: Rev Mengle Special Help: Patrick Bossman,
Managing Editor: Camille Graves Lewis Carr, Alejandro Duarte
These materials are © 2023 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.
Table of Contents
INTRODUCTION................................................................................................ 1
About This Book.................................................................................... 1
Icons Used in This Book........................................................................ 2
Conventions Used In This Book........................................................... 2
Beyond the Book................................................................................... 2
These materials are © 2023 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.
Crafting the Perfect Schema.............................................................. 23
Keys and slices............................................................................... 23
Tables big and small...................................................................... 25
REPLICAS=ALLNODES.................................................................... 26
Range queries................................................................................. 27
JSON................................................................................................. 28
These materials are © 2023 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.
Introduction
D
istributed SQL is a relatively new technology that provides a
modern way to scale large databases while maintaining ACID-
level consistency, high availability, and disaster recovery. In
database systems, ACID (atomicity, consistency, isolation, durability)
refers to a standard set of properties that guarantees database trans-
actions are reliably processed. Other scaling solutions for large data-
bases such as NoSQL don’t allow for the same consistency and ease
of querying with industry-standard SQL.
Use distributed SQL in the cloud with SkySQL and allow your
database to take advantage of the cloud-centric architecture that
makes adding nodes simple and inexpensive. SkySQL allows for
simple distributed SQL database management in a powerful and
secure web client.
Introduction 1
These materials are © 2023 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.
Icons Used in This Book
Like most For Dummies books, you’ll find some icons in the mar-
gins that help you spot important information highlighted in this
book. Here is what they mean:
The Tip icon points out helpful information. This content may
help you save time or money.
The Warning icon alerts you to information that may save you
from making decisions that are harmful or helps you avoid pitfalls.
»» mariadb.com/products/enterprise/xpand
»» mariadb.com/docs/products/mariadb-xpand
»» mariadb.com/products/skysql
These materials are © 2023 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.
IN THIS CHAPTER
»» Recognizing the need for distributed SQL
Chapter 1
Getting to Know
Distributed SQL
C
lient-server databases such as Oracle, PostgreSQL, Microsoft
SQL Server, MySQL, and MariaDB were originally designed to
handle smaller data sets at lower throughput and scale.
Increasing scale or throughput requires the capability of a single
machine. These databases now achieve high availability by replicat-
ing the entire database to more machines. NoSQL databases such as
Cassandra and MongoDB focused on scale but with reduced capa-
bilities, especially with regards to joins, transactional integrity, and
SQL — the most popular standard query language. This chapter
explains how distributed SQL addresses scale, integrity, and availa-
bility while maintaining the feature set of a full relational database.
These materials are © 2023 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.
Managing scale
Scaling a database requires potentially handling multiple issues:
These materials are © 2023 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.
What if you have a house on the scale of the Winchester Mansion
(160 rooms)? In that case, you may not even be able to rent a big
enough moving truck! Renting a lot of smaller ones with more
help is the only feasible method of handling that much load.
This is also the case with databases. Smaller loads may do bet-
ter with a traditional client-server database such as MariaDB
Server, but larger loads with more traffic are probably better with
MariaDB Xpand, a distributed SQL database. Using Xpand in the
Cloud makes it possible for workloads to be rapidly and affordably
scaled, including across regions and globally.
Scale is the one reason to use a distributed database, but it’s not
the only reason. Availability is another. The one thing computing
can guarantee is that things will break. Faults can happen on a
single machine, network device, or even the powerlines that feed
them. For modern services, especially on the scale of a large bank
or SaaS company, losing service for any period of time is unthink-
able. Distributed SQL databases store redundant copies of data on
additional machines in additional locations (such as cloud avail-
ability zones).
These materials are © 2023 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.
Some databases, such as Oracle, can automatically partition a
database on these values. Other databases may require application
developers to manually divide the data. While sharding is a good
way to share resources, the partitions must also be replicated to
ensure availability.
Sharding isn’t used for availability; it’s used for scalability but is
sometimes used along with high availability techniques to allow
for larger database sizes. When you’re choosing a method for high
availability, decide which tradeoffs, such as risk, performance,
and complexity, that you can live with. When making your deci-
sion, you should also take into consideration feasibility issues like
data size and network topography.
These materials are © 2023 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.
Single writer multiple replicas
When traditional databases such as Microsoft SQL Server, MySQL,
or MariaDB Server need to handle heavy read with fewer write
operations, it’s common to configure a cluster where one node
handles the writes while reads are directed to other nodes. Often,
writes are handled synchronously, meaning all read replicas must
complete updates before a write transaction commits. As long as
an application client isn’t interested in a new or updated row,
they won’t have to wait. Any client interested in a row locked
in the transaction may block until the transaction commits.
Because this blocking occurs until all replicas acknowledge the
update, it may take longer than on a single-instance database.
Systems that fit on a single node without splitting the data are
extremely economical and efficient. Replicas give you high availa-
bility and read-scale but don’t work well in systems where a large
number of write operations exist or the data set grows too large.
These materials are © 2023 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.
Standby instance
Using a synchronously replicated standby instance is a variation
of a multiple-writer system. Instead of having writes go to two
(or more) nodes and replicate to each node, writes go to one node,
and a copy is sent to a standby node. If the primary goes down, the
standby becomes the new primary.
Asynchronous replication
The other methods we talk about in this section assume that
absolute transactional integrity is required with no chance of data
loss during failures. For some data sets, performance is more
important than transactional integrity. It’s possible to config-
ure replicas with lower levels of assurance than full transactional
acknowledgment. In these cases, your system may be okay with
simply receiving a message that the data was sent or received
instead of waiting for the data to be committed.
These materials are © 2023 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.
FIGURE 1-1: Every slice has a replica on one of the other nodes.
These materials are © 2023 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.
FIGURE 1-2: Data is assigned to slices using a hash value for even distribution.
These materials are © 2023 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.
Balancing the load with Xpand
Distributed SQL databases use different methods to balance the
load across the nodes by detecting when a node is overused and
responds by moving the data to even out the load. In addition to
traditional load balancing reads and writes, MariaDB redistrib-
utes data when a node gets too busy by using one of the following
methods:
These materials are © 2023 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.
Understanding Distributed SQL
Topographies
When deciding how to deploy a distributed SQL database, consider
the following:
In MariaDB Xpand, you can add a node to a zone with the follow-
ing code:
Disaster recovery
For disaster recovery, some distributed SQL databases support
synchronous replication between regions. Synchronous replica-
tion delivers recovery point objective — zero data loss. It is true
there is severe write performance penalties. So many systems use
highly efficient parallel replication combined with regular back-
ups. In the event of a disaster, the application can failover to a
different geographic region.
These materials are © 2023 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.
MariaDB Xpand supports parallel asynchronous replication as
well as parallel backup. These capabilities use multiple nodes in
the cluster to replicate data. This capability is essential for high
throughput systems that need frequent backups or those that
replicate to a disaster recovery region.
These materials are © 2023 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.
IN THIS CHAPTER
»» Understanding when distributed SQL
is used
Chapter 2
Distributed SQL in
the Real World
D
istributed SQL is used for systems of record at high scale
with high availability. Many use cases in many industries
have these requirements. In this chapter, you look at a few
of those use cases across multiple industries.
These materials are © 2023 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited.
Discovering Diverse Content Through
Random Scribd Documents
CATHEDRAL: SPANDRIL OF CENTRAL GATE. THE LAST JUDGMENT.
LEON.
PLATE 29
CATHEDRAL: SPANDRIL OF CENTRAL GATE. THE LAST JUDGMENT.
LEON.
PLATE 30
CATHEDRAL: DETAIL OF THE RIGHT GATE.
LEON.
PLATE 31
PLATE 32
CATHEDRAL: VARIOUS STATUES FROM THE CROSS AISLE.
LEON.
PLATE 33
CATHEDRAL: DETAIL OF THE RIGHT-HAND PORTICO.
LEON.
PLATE 34
PLATE 35
CATHEDRAL: THE CHOIR STALLS.
LEON.
PLATE 36
PLATE 37
CATHEDRAL: DETAIL OF THE CHOIR.
LEON.
PLATE 38
CATHEDRAL: CHOIR STALLS. THE GUARDIAN ANGEL OF PARADISE, AND
THE ARCHANGEL ST. MICHAEL.
LEON.
PLATE 39
CATHEDRAL: CHOIR STALLS. NOAH, ADAM AND EVE.
LEON.
PLATE 40
CATHEDRAL: CHOIR STALLS. THE ARCHANGEL GABRIEL AND ABRAHAM.
LEON.
PLATE 41
CATHEDRAL: CHOIR STALLS. ISAAC AND JACOB.
LEON.
PLATE 42
CATHEDRAL: CHOIR STALLS. ESAU.
LEON.
PLATE 43
CATHEDRAL: CHOIR STALLS. SAMSON.
LEON.
PLATE 44
CATHEDRAL: CHOIR STALLS. ST. MATHIAS AND ST. MARK.
LEON.
PLATE 45
CATHEDRAL: CHOIR STALLS. ST. LUKE AND ST. BARTHOLOMEW.
LEON.
PLATE 46
CATHEDRAL: CHOIR STALLS. ST. ANDREW AND ST. PETER.
LEON.
PLATE 47
CATHEDRAL: CHOIR STALLS. SANTIAGO ALFEO AND ST. PHILIP.
LEON.
PLATE 48
CATHEDRAL: CHOIR STALLS. ST. JOHN THE EVANGELIST AND SANTIAGO.
LEON.
PLATE 49
CATHEDRAL: CHOIR STALLS. SAINT MARY MAGDALENE AND SANTO
DOMINGO.
LEON.
PLATE 50
CATHEDRAL: IN THE CHOIR. ST. NICODEMUS AND VALOUR.
LEON.
PLATE 51
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookfinal.com