0% found this document useful (0 votes)
426 views

YugaByte Fundamentals DBA Certification Guide

YugabyteDB is a distributed SQL database that supports synchronous replication between nodes, asynchronous replication between clusters, and ACID transactions. It uses concepts like sharding, replication, and Raft consensus to provide high availability and partition tolerance. The database supports two SQL APIs: YSQL, which is PostgreSQL-compatible, and YCQL, which is semi-relational and Cassandra-inspired.

Uploaded by

mulleraf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
426 views

YugaByte Fundamentals DBA Certification Guide

YugabyteDB is a distributed SQL database that supports synchronous replication between nodes, asynchronous replication between clusters, and ACID transactions. It uses concepts like sharding, replication, and Raft consensus to provide high availability and partition tolerance. The database supports two SQL APIs: YSQL, which is PostgreSQL-compatible, and YCQL, which is semi-relational and Cassandra-inspired.

Uploaded by

mulleraf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Y UG ABY TEDB dba

F UNDA MENTA L S
Cer tif ication
Exam Prep
What is Distributed SQL?

At a minimum, a Distributed SQL database should have


the following characteristics:

A SQL API for accessing and manipulating data and objects

Automatic distribution of data across nodes in a cluster

Automatic replication of data in a strongly consistent manner

Support for distributed query execution so clients do not


need to know about the underlying distribution of data

Support for distributed ACID transactions

Further reading: What is Distributed SQL?

What is YugabyteDB?

YugabyteDB is a distributed SQL database with the


following additional characteristics:

YugabyteDB’s architecture and design is inspired by


Google Spanner

YugabyteDB’s YSQL API is compatible with PostgreSQL 11.2

YugabyteDB is a Consistent and Partition Tolerant (CP)


database

YugabyteDB’s YSQL API supports serializable and snapshot


(repeatable read) isolation levels.

YugabyteDB is completely open source, released under the


Apache 2.0 license

YugabyteDB supports advanced RDBMS features like triggers,


stored procedures, foreign keys and some PostgreSQL
extensions.

In YugabyteDB all distributed transactions are guaranteed


atomicity, consistency, isolation, and durability.

YugabyteDB can be deployed on bare metal, VMs,


Kubernetes and public clouds

Further reading: Design Goals

YugabyteDB dba Fundamentals Certification — Exam Prep | 1


What’s the difference between monolithic, single-node databases
like MySQL or PostgreSQL and Distributed SQL databases like
YugabyteDB?

By default, in a monolithic, single-node database, all writes must be served


from a single node. In order to get more scale from databases like MySQL
or PostgreSQL, you typically add more memory, CPU, and storage capacity.
In other words, you scale up.

On the other hand, with a distributed, multi-node SQL database like


YugabyteDB, writes can be serviced from any node. In order to get more
scale from a distributed database, you typically add more nodes to the
cluster. In other words, you scale out.


In YugabyteDB, What guarantees do distributed transactions have in YugabyteDB?
all distributed In YugabyteDB all distributed transactions are guaranteed atomicity, consis-
transactions are tency, isolation, and durability (ACID).
guaranteed atomicity,
Further reading: DocDB Transactions Layer
consistency, isolation,
and durability (ACID).
What is the CAP theorem?

The CAP theorem states that in the face of network Partition, it’s possible to
solve for either Consistency or Availability, but not both. YugabyteDB can be
classified as a CP database. This means it will become unavailable if it cannot
maintain a consistent data set during a network partition.

Further reading: CAP Theorem

What is Raft and how does YugabyteDB make use of it?

Raft is a consensus algorithm for distributed systems. YugabyteDB makes use


of Raft to achieve consensus amongst leaders and followers in a “tablet peer”
group. Recall that tablet peers are tablets that hold the same synchronously
replicated data. RAFT-based consensus is applied at a per tablet (shard) level.

Further reading: Raft Replication

YugabyteDB dba Fundamentals Certification — Exam Prep | 2


What are the main components of YugabyteDB?

Universe

A group of nodes (VMs, physical machines, or containers) that collectively


function as a clustered database.

Further reading: Universe


YugabyteDB supports YB-TServer
synchronous replication
YugabyteDB process responsible for hosting and serving data from a node.
between nodes in a
cluster and asynchro- Further reading: YB-TServer Service

nous replication
between clusters. YB-Master

This node process stores system metadata and records such as which
tables, users, and permissions exist. It is also responsible for coordinating
background operations (such as load-balancing or initiating re-replication
of under-replicated data) and performing a variety of administrative
operations such as creating, altering, and dropping tables.

Further reading: YB-Master Service

What forms of replication does YugabyteDB support?

YugabyteDB supports synchronous replication between nodes in a cluster


and asynchronous replication between clusters. The number of YB-TServers
should not be less than the replication factor.

Further reading: DocDB Replication Layer

YugabyteDB dba Fundamentals Certification — Exam Prep | 3


How does sharding and data distribution work in
YugabyteDB?

Database sharding is the horizontal partitioning of rows


distributed across nodes

Database sharding increases both read and write


scalability of the database

Rows are automatically sharded by primary key

YugabyteDB supports the partitioning of data by either


HASH or RANGE

Tables are split into tablets

Replicated tablets (tablets that contain identical data) form


a Raft group with a leader and followers

Replicated tablets always contain identical data because


the data is synchronously replicated

Further reading: DocDB Sharding Layer

Yugabyte Structured Query What data access APIs does YugabyteDB support?
Language (YSQL) is a
YugabyteDB supports two modes of data access:
fully-relational SQL API
YSQL: A PostgreSQL-compatible API best suited for relational
workloads

YCQL: A semi-relational API inspired by Cassandra, best


suited for NoSQL workloads

Further reading: YSQL and YCQL


Yugabyte Cloud Query
Language (YCQL) is a
semi-relational SQL API

YugabyteDB dba Fundamentals Certification — Exam Prep | 4


How do distributed SQL databases tolerate failures?

Distributed SQL databases are able to tolerate failures because no single


node in the cluster holds all data. This means you can lose one or more nodes
(depending on your replication factor) and still have data available to clients.

What is a network partition and how does YugabyteDB handle them?

In a network partition, clients can connect to the database nodes, but some
of the nodes cannot communicate with each other. A network partition
can quickly introduce data inconsistencies as soon as the nodes are able to
communicate with each other again. YugabyteDB handles a network partition
by allowing shard followers to serve timeline-consistent reads and making
them available for a leader election. Meanwhile, the shard leaders are able to
accept writes and serve strong reads.

Further reading: How YugabyteDB Handles Network Partitions


Distributed SQL What formula helps us determine the replication factor (RF) required
to achieve a fault tolerance (FT) of k nodes?
databases are able to
tolerate failures because The formula is RF = (2k + 1).
no single node in the
For example, to achieve the fault tolerance of 1 node we’d need a replication
cluster holds all data. factor of at least 3.

3 = (2 * 1 + 1)

In another example, to achieve the fault tolerance of 2 nodes we’d need a


replication factor of at least 5.

5 = (2 * 2 + 1)

Further reading: Replication Factor

What is an example JDBC connect string that can be used to connect


to YugabyteDB?

5433 - YSQL API


9042 - YCQL API
7000 - YugabyteDB Web UI
7100 - YB-Master RPC communication
9100 - YB-Tserver RPC communication

YugabyteDB dba Fundamentals Certification — Exam Prep | 5


Does YugabyteDB work with PostgreSQL-compatible DBA tools?

In general, yes. Assuming it can make use of a YugabyteDB or PostgreSQL


driver and can connect to YugabyteDB on port 5433.

What is an example JDBC connect string that can be used to connect


to YugabyteDB?

postgresql://admin:[email protected]:5433/northwind

User: Admin
Password: password
Host: 11.22.33.44
Port Number: 5433
Database: Northwind


In general, an SQL What are the recommended operating and file systems for
YugabyteDB?
tool will work with
YugabyteDB if you use Red Hat Enterprise Linux 7.x, CentOS 7.x and XFS.
a PostgreSQL driver
and can connect on
What Linux utilities are useful when setting up a YugabyteDB cluster?
port 5433.
ulimit – to set appropriate system resource limits

ntp and chrony – to synchronize the time between machines

What effect does a lack of CPU and memory have on YugabyteDB?

You can expect higher latencies and dropped requests.

What effect does adding CPU and memory have on YugabyteDB?

You can expect improved read throughput, improved latency and more
caching of data.

YugabyteDB dba Fundamentals Certification — Exam Prep | 5


How does YugabyteDB handle the caching of data?

YugabyteDB explicitly manages a block cache.


Remember: What storage types does YugabyteDB support?

YugabyteDB is only YugabyteDB only supports SSDs.


recommended to run
on RHEL 7.x, CentOS
7.x systems with XFS What are the necessary steps to install and start a YugabyteDB cluster?

and backed by SSDs. Please review the “Manual Deployment” section of the YugabyteDB Docs.

What are the necessary steps to backup and restore a YugabyteDB cluster?

Please review the “Backup and Restore” section of the YugabyteDB Docs.

What are the necessary steps to change the configuration of a


YugabyteDB cluster?

Please review the “Change Cluster Configuration” section of the


YugabyteDB Docs.

Questions?

YugabyteDB’s Community Slack is the easiest and fastest way to get your
questions answered about requirements, installation, class content, exam
preparation and certification. Register here:

yugabyte.com/slack

...after introducing yourself on #introductions, please join the #training


channel, this is where we discuss all things training and certification related.

You might also like