Up and Running with ClickHouse
US$ 19.95
The publisher has enabled DRM protection, which means that you need to use the BookFusion iOS, Android or Web app to read this eBook. This eBook cannot be used outside of the BookFusion platform.
Description
Contents
Reviews
Language
English
ISBN
9789391392246
Cover Page
Title Page
Copyright Page
Dedication Page
About the Author
About the Reviewer
Acknowledgement
Preface
Errata
Table of Contents
1. Introduction
Structure
Objectives
Data and databases
Different types of database management systems
Relational database
No-SQL database
Graph database
Time–series database
Transactional and analytical systems
OLTP
OLAP
Storing the structured in database systems
Row-oriented DBMS
Column-oriented DBMS
ClickHouse
When to use ClickHouse?
Onward
Conclusion
Points to remember
Multiple choice questions
Answers
References
2. Relational Database Model and Database Design
Structure
Objectives
Relational model
Database table relationships
One-to-one
One-to-many
Many-to-many
Keys
Index
Primary index
Secondary index
Multi-level index
Database normalization
Data integrity
Transactions
ACID properties
Codd’s rules
Conclusion
Points to remember
Multiple choice questions
Answers
3. Setting Up the Environment
Structure
Objectives
Introduction
Which version to use?
Installing ClickHouse
ClickHouse CLI
DBeaver
Creating a sample database and table
Conclusion
Points to remember
4. ClickHouse SQL
Structure
Objectives
SQL syntax in ClickHouse
Keywords
Identifiers
Clauses
Expressions
Queries
Statements
Comments
Operators in ClickHouse SQL
Arithmetic operators
Comparison operators
Logical operators
Checking for NULL
Data types in ClickHouse
Numeric data types
Boolean
String
FixedString
Date
DateTime
DateTime64
Arrays
Tuples
Nested
Enum
LowCardinality
ClickHouse SQL
SELECT
LIMIT
DISTINCT
SAMPLE and OFFSET
WHERE
GROUP BY
ORDER BY
CREATE
Views in ClickHouse
INSERT INTO
DROP
ALTER
Updates and deletes
SHOW
RENAME
USE
SQL Joins in ClickHouse
Inner join
Left join
Right join
Full join
Cross join
Union
Conclusion
Points to remember
Multiple choice questions
Answers
5. SQL Functions in ClickHouse
Structure
Objectives
ClickHouse SQL functions
Data type conversion
Integers
Float
Decimal
Date and DateTime
String
Working with numbers
Mathematical functions
Rounding functions
Working with Date/DateTime
Converting to different time units
Rounding functions
Date/DateTime arithmetic
Working with strings
Case conversion
String manipulation
Searching in strings
Matching simple regular expressions
Extracting substrings using regular expressions
Replacing substrings from the source string
Array functions
Array length functions
Creating empty arrays
Array concatenation
Accessing the array elements
Finding and counting elements
Push and pop operations
Slicing and resizing
Sorting the array
Unique elements in an array
Splitting and merging arrays and strings
Conclusion
Points to remember
Multiple-choice questions
Answers
6. SQL Functions for Data Aggregation
Structure
Objectives
Aggregate functions
COUNT
Any
Min/max
Argmin/argmax
Sum
Average
Quantile
Variance and standard deviation
Covariance
Correlation
Skewness
Kurtosis
Combinators
If
Array
State
Merge
MergeState
ForEach
OrDefault
OrNull
Conclusion
Points to remember
Multiple choice questions
Answers
7. Table Engines – MergeTree Family
Structure
Objectives
MergeTree
Understanding MergeTree engine
ReplacingMergeTree()
SummingMergeTree
AggregatingMergeTree
CollapsingMergeTree
VersionedCollapsingMergeTree
Data replication
Conclusion
Points to remember
Multiple choice questions
Answers
8. Table Engines – Log Family
Structure
Objectives
Introduction
TinyLog
Log engine
StripeLog engine
Conclusion
Points to remember
Multiple-choice questions
Answers
9. External Data Sources
Structure
Objectives
Introduction
Kafka
MySQL
PostgreSQL
JDBC
HDFS
Amazon S3
Conclusion
Points to remember
Multiple choice questions
Answers
10. Special Engines
Structure
Objectives
Introduction
Dictionary
PRIMARY KEY
LAYOUT
SOURCE
LIFETIME
Example 1 – MySQL
Example 2 – ClickHouse
Example 3 – PostgreSQL
File
Merge
SET
Memory
Buffer
URL
Example
Distributed
Conclusion
Points to remember
Multiple choice questions
Answers
11. Configuring the ClickHouse Setup – Part 1
Structure
Objectives
Introduction
Network settings
SSL settings
Internal server settings
Table engine settings
Conclusion
Points to remember
Multiple choice questions
Answers
12. Configuring the ClickHouse Setup – Part 2
Structure
Objectives
Introduction
Query permissions
Read-only
Allow DDL
Query complexity
Settings profile
Quotas
User settings
Role-based access control
System tables
Conclusion
Points to remember
Multiple choice questions
Answers
Appendix A: Installing Lubuntu 20.04 in Oracle Virtualbox 6.1
Appendix B: Installing External Data Sources
Setting up Kafka for Testing Kafka Integration
MySQL installation
Installing sample database in MySQL
Installing Postgresql
Installing ClickHouse JDBC bridge
Index
The book hasn't received reviews yet.