Skip to content

Commit 501ae85

Browse files
authored
Merge pull request #3756 from ClickHouse/Blargian-patch-2
Language and formatting edits
2 parents 44ca953 + 677cc86 commit 501ae85

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

docs/guides/creating-tables.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
---
22
sidebar_position: 1
3-
sidebar_label: 'Creating Tables'
4-
title: 'Creating Tables in ClickHouse'
3+
sidebar_label: 'Creating tables'
4+
title: 'Creating tables in ClickHouse'
55
slug: /guides/creating-tables
66
description: 'Learn about Creating Tables in ClickHouse'
77
---
88

9-
# Creating Tables in ClickHouse
9+
# Creating tables in ClickHouse
1010

1111
Like most databases, ClickHouse logically groups tables into **databases**. Use the `CREATE DATABASE` command to create a new database in ClickHouse:
1212

13-
```sql
14-
CREATE DATABASE IF NOT EXISTS helloworld
15-
```
13+
```sql
14+
CREATE DATABASE IF NOT EXISTS helloworld
15+
```
1616

17-
Similarly, use `CREATE TABLE` to define a new table. (If you do not specify the database name, the table will be in the
18-
`default` database.) The following table named is `my_first_table` in the `helloworld` database:
17+
Similarly, use `CREATE TABLE` to define a new table. If you do not specify the database name, the table will be in the
18+
`default` database.
19+
20+
The following table named `my_first_table` is created in the `helloworld` database:
1921

2022
```sql
2123
CREATE TABLE helloworld.my_first_table
@@ -36,21 +38,21 @@ In the example above, `my_first_table` is a `MergeTree` table with four columns:
3638
- `timestamp`: a `DateTime` value, which represents an instant in time
3739
- `metric`: a 32-bit floating point number
3840

39-
:::note
40-
The table engine determines:
41-
- How and where the data is stored
42-
- Which queries are supported
43-
- Whether or not the data is replicated
41+
:::note
42+
The table engine determines:
43+
- How and where the data is stored
44+
- Which queries are supported
45+
- Whether or not the data is replicated
4446

45-
There are many engines to choose from, but for a simple table on a single-node ClickHouse server, [MergeTree](/engines/table-engines/mergetree-family/mergetree.md) is your likely choice.
46-
:::
47+
There are many engines to choose from, but for a simple table on a single-node ClickHouse server, [MergeTree](/engines/table-engines/mergetree-family/mergetree.md) is your likely choice.
48+
:::
4749

4850
## A Brief Intro to Primary Keys {#a-brief-intro-to-primary-keys}
4951

5052
Before you go any further, it is important to understand how primary keys work in ClickHouse (the implementation
5153
of primary keys might seem unexpected!):
5254

53-
- primary keys in ClickHouse are **_not unique_** for each row in a table
55+
- primary keys in ClickHouse are **_not unique_** for each row in a table
5456

5557
The primary key of a ClickHouse table determines how the data is sorted when written to disk. Every 8,192 rows or 10MB of
5658
data (referred to as the **index granularity**) creates an entry in the primary key index file. This granularity concept

styles/ClickHouse/Headings.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ match: $sentence
77
indicators:
88
- ":"
99
exceptions:
10+
- ClickHouse
1011
- Cloud
1112
- Azure
1213
- CLI
@@ -29,3 +30,5 @@ exceptions:
2930
- Windows
3031
- JSON
3132
- MergeTree
33+
- ReplacingMergeTree
34+
- AggregatingMergeTree

0 commit comments

Comments
 (0)