diff --git a/.github/vale-styles/Yugabyte/spelling-exceptions.txt b/.github/vale-styles/Yugabyte/spelling-exceptions.txt
index ed8d8c34020a..4db775383484 100644
--- a/.github/vale-styles/Yugabyte/spelling-exceptions.txt
+++ b/.github/vale-styles/Yugabyte/spelling-exceptions.txt
@@ -205,6 +205,7 @@ downvoted
downvotes
Dpl
Dreamweaver
+Ebean
Ecto
Elasticsearch
enablement
@@ -425,6 +426,7 @@ Nokogiri
Northwind
noteable
noteables
+Npgsql
npm
nullability
nullable
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 911305b32af2..ac6a74bd0ef1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -607,6 +607,7 @@ include_directories(src)
include_directories("src/inline-thirdparty/usearch")
include_directories("src/inline-thirdparty/fp16")
+include_directories("src/inline-thirdparty/hnswlib")
enable_testing()
diff --git a/docs/content/preview/architecture/design-goals.md b/docs/content/preview/architecture/design-goals.md
index 7d1afa71a34e..2477b434d6e0 100644
--- a/docs/content/preview/architecture/design-goals.md
+++ b/docs/content/preview/architecture/design-goals.md
@@ -78,7 +78,7 @@ YugabyteDB has been designed with operational simplicity in mind, providing feat
## Heterogeneous workload support
-Depending on the use case, the database may need to support diverse workloads, such as [transactional processing](../../benchmark/tpcc/), [analytical queries](../../sample-data/retail-analytics/), [real-time data ingestion](../../tutorials/azure/azure-event-hubs/), [time-series](../../develop/data-modeling/common-patterns/timeseries/), and [key-value](../../benchmark/key-value-workload-ycql/) workloads.
+Depending on the use case, the database may need to support diverse workloads, such as [transactional processing](../../benchmark/tpcc/), [analytical queries](../../sample-data/retail-analytics/), [real-time data ingestion](/preview/tutorials/azure/azure-event-hubs/), [time-series](../../develop/data-modeling/common-patterns/timeseries/), and [key-value](../../benchmark/key-value-workload-ycql/) workloads.
## Transaction isolation levels
diff --git a/docs/content/preview/deploy/multi-dc/async-replication/async-transactional-setup-dblevel.md b/docs/content/preview/deploy/multi-dc/async-replication/async-transactional-setup-dblevel.md
index 04e3af3cdb5a..a98621e67100 100644
--- a/docs/content/preview/deploy/multi-dc/async-replication/async-transactional-setup-dblevel.md
+++ b/docs/content/preview/deploy/multi-dc/async-replication/async-transactional-setup-dblevel.md
@@ -88,7 +88,7 @@ To set up unidirectional transactional replication, do the following:
Checkpointing of yugabyte completed. Bootstrap is not required for setting up xCluster replication
```
-1. If needed, perform a full copy of the database on the Primary to the Standby using distributed backup and restore. See [Distributed snapshots for YSQL](../../../manage/backup-restore/snapshot-ysql/). Otherwise, create the necessary schema objects (tables and indexes) on the Standby.
+1. If needed, perform a full copy of the database on the Primary to the Standby using distributed backup and restore. See [Distributed snapshots for YSQL](../../../../manage/backup-restore/snapshot-ysql/). Otherwise, create the necessary schema objects (tables and indexes) on the Standby.
1. Set up the xCluster replication group.
@@ -117,7 +117,7 @@ list_xcluster_outbound_replication_groups [namespace_id]
You should see output similar to the following:
```output
-1 Outbound Replication Groups found:
+1 Outbound Replication Groups found:
[repl_group1]
```
@@ -132,7 +132,7 @@ list_universe_replications [namespace_id]
You should see output similar to the following:
```output
-1 Universe Replication Groups found:
+1 Universe Replication Groups found:
[repl_group1]
```
diff --git a/docs/content/preview/develop/_index.md b/docs/content/preview/develop/_index.md
index 790c42a446a8..ee96a1d598fb 100644
--- a/docs/content/preview/develop/_index.md
+++ b/docs/content/preview/develop/_index.md
@@ -77,5 +77,5 @@ To learn more about how to use browser-based IDEs, see [Cloud-native development
Yugabyte provides multiple step-by-step guides for building scalable and fault-tolerant applications with YugabyteDB using your favorite programming language, services, and frameworks, including Kafka, Gen-AI, and more.
{{}}
-For step-by-step guides for various frameworks, see [Tutorials](../tutorials/).
+For step-by-step guides for various frameworks, see [Tutorials](/preview/tutorials/).
{{}}
diff --git a/docs/content/preview/drivers-orms/csharp/_index.md b/docs/content/preview/drivers-orms/csharp/_index.md
index fa448b53744d..ab1b530afdf3 100644
--- a/docs/content/preview/drivers-orms/csharp/_index.md
+++ b/docs/content/preview/drivers-orms/csharp/_index.md
@@ -21,8 +21,8 @@ The following projects can be used to implement C# applications using the Yugaby
| Project | Documentation and Guides | Latest Driver Version | Supported YugabyteDB Version |
| :------ | :----------------------- | :-------------------- | :--------------------------- |
-| YugabyteDB C# Driver for YSQL [Recommended] | [Documentation](ysql/) [Reference](../../reference/drivers/csharp/yb-npgsql-reference/) | [8.0.3-yb-1](https://www.nuget.org/packages/NpgsqlYugabyteDB/) | 2.8 and later |
-| PostgreSQL Npgsql Driver | [Documentation](postgres-npgsql/) [Reference](../../reference/drivers/csharp/postgres-npgsql-reference/) | [6.0.3](https://www.nuget.org/packages/Npgsql/) | 2.6 and later |
+| YugabyteDB C# Driver for YSQL [Recommended] | [Documentation](ysql/) [Reference](yb-npgsql-reference/) | [8.0.3-yb-1](https://www.nuget.org/packages/NpgsqlYugabyteDB/) | 2.8 and later |
+| PostgreSQL Npgsql Driver | [Documentation](postgres-npgsql/) [Reference](postgres-npgsql-reference/) | [6.0.3](https://www.nuget.org/packages/Npgsql/) | 2.6 and later |
| YugabyteDB C# Driver for YCQL | [Documentation](ycql/) | [3.6.0](https://github.com/yugabyte/cassandra-csharp-driver/releases/tag/3.6.0) | |
| Project | Documentation and Guides | Example Apps |
@@ -32,17 +32,18 @@ The following projects can be used to implement C# applications using the Yugaby
Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations by referring to [Connect an app](ysql/) or [Use an ORM](entityframework/).
-For reference documentation, including using projects with SSL, refer to the [drivers and ORMs reference](../../reference/drivers/csharp/yb-npgsql-reference/) pages.
-
## Prerequisites
To develop C# applications for YugabyteDB, you need the following:
-- **.NET SDK**\
+- **.NET SDK**
+
Install .NET SDK 6.0 or later. To download it for your supported OS, visit [Download .NET](https://dotnet.microsoft.com/en-us/download).
-- **Create a C# project**\
+- **Create a C# project**
+
For ease-of-use, use an integrated development environment (IDE) such as Visual Studio. To download and install Visual Studio, visit the [Visual Studio Downloads](https://visualstudio.microsoft.com/downloads/) page.
+
- To create a C# project in Visual Studio, select [Console Application](https://docs.microsoft.com/en-us/dotnet/core/tutorials/with-visual-studio?pivots=dotnet-6-0) as template when creating a new project.
- If you are not using an IDE, use the following dotnet command:
@@ -51,9 +52,10 @@ To develop C# applications for YugabyteDB, you need the following:
```
- **YugabyteDB cluster**
+
- Create a free cluster on YugabyteDB Aeon. Refer to [Use a cloud cluster](../../quick-start-yugabytedb-managed/). Note that YugabyteDB Aeon requires SSL.
- Alternatively, set up a standalone YugabyteDB cluster by following the steps in [Install YugabyteDB](../../quick-start/).
## Next step
-- [Connect an app](ysql/)
+[Connect an app](ysql/)
diff --git a/docs/content/preview/reference/drivers/csharp/postgres-npgsql-reference.md b/docs/content/preview/drivers-orms/csharp/postgres-npgsql-reference.md
similarity index 96%
rename from docs/content/preview/reference/drivers/csharp/postgres-npgsql-reference.md
rename to docs/content/preview/drivers-orms/csharp/postgres-npgsql-reference.md
index e3193f770cc4..b296faccbf00 100644
--- a/docs/content/preview/reference/drivers/csharp/postgres-npgsql-reference.md
+++ b/docs/content/preview/drivers-orms/csharp/postgres-npgsql-reference.md
@@ -3,13 +3,15 @@ title: PostgreSQL Npgsql Driver
headerTitle: C# Drivers
linkTitle: C# Drivers
description: C# PostgreSQL Npgsql Driver for YSQL
-headcontent: C# Drivers for YSQL
+badges: ysql
+aliases:
+ - /preview/reference/drivers/csharp/postgres-npgsql-reference/
menu:
preview:
name: C# Drivers
- identifier: ref-postgres-npgsql-driver
- parent: drivers
- weight: 620
+ identifier: ref-2-postgres-npgsql-driver
+ parent: csharp-drivers
+ weight: 100
type: docs
---
@@ -31,11 +33,11 @@ type: docs
-Npgsql is an open source ADO.NET Data Provider for PostgreSQL; it allows programs written in C#, Visual Basic, and F# to access the YugabyteDB server. Npgsql is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../../../secure/authentication/password-authentication/#scram-sha-256).
+Npgsql is an open source ADO.NET Data Provider for PostgreSQL; it allows programs written in C#, Visual Basic, and F# to access the YugabyteDB server. Npgsql is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
For details on Npgsql, refer to the [Npgsql documentation](https://www.npgsql.org/doc/).
-For building a sample C# application with Npgsql, see [Connect an application](../../../../drivers-orms/csharp/postgres-npgsql/).
+For building a sample C# application with Npgsql, see [Connect an application](../postgres-npgsql/).
## Download the driver dependency
diff --git a/docs/content/preview/drivers-orms/csharp/postgres-npgsql.md b/docs/content/preview/drivers-orms/csharp/postgres-npgsql.md
index c09722d55759..029b586f010f 100644
--- a/docs/content/preview/drivers-orms/csharp/postgres-npgsql.md
+++ b/docs/content/preview/drivers-orms/csharp/postgres-npgsql.md
@@ -5,9 +5,9 @@ linkTitle: Connect an app
description: Connect a C# application using PostgreSQL Npgsql driver
menu:
preview:
- identifier: postgres-npgsql-driver
+ identifier: csharp-2-postgres-npgsql-driver
parent: csharp-drivers
- weight: 420
+ weight: 500
type: docs
---
@@ -113,7 +113,7 @@ var connStringBuilder = new NpgsqlConnectionStringBuilder();
YugabyteDB Aeon clusters require SSL. Refer to [Connect applications](../../../yugabyte-cloud/cloud-connect/connect-applications/) for instructions on how to obtain the cluster connection parameters and download the CA certificate.
-Refer to [Configure SSL/TLS](../../../reference/drivers/csharp/postgres-npgsql-reference/#configure-ssl-tls) for more information on Npgsql default and supported SSL modes, and examples for setting up your connection strings when using SSL.
+Refer to [Configure SSL/TLS](../postgres-npgsql-reference/#configure-ssl-tls) for more information on Npgsql default and supported SSL modes, and examples for setting up your connection strings when using SSL.
### Step 3: Write your application
@@ -290,8 +290,3 @@ John 35 CSharp + SSL
```
If you receive no output or an error, check the parameters in the connection string.
-
-## Learn more
-
-- [PostgreSQL Npgsql driver reference](../../../reference/drivers/csharp/postgres-npgsql-reference/)
-- Build C# applications using [EntityFramework ORM](../entityframework)
diff --git a/docs/content/preview/reference/drivers/csharp/yb-npgsql-reference.md b/docs/content/preview/drivers-orms/csharp/yb-npgsql-reference.md
similarity index 91%
rename from docs/content/preview/reference/drivers/csharp/yb-npgsql-reference.md
rename to docs/content/preview/drivers-orms/csharp/yb-npgsql-reference.md
index 753128ddf566..40ba1ba6e2b6 100644
--- a/docs/content/preview/reference/drivers/csharp/yb-npgsql-reference.md
+++ b/docs/content/preview/drivers-orms/csharp/yb-npgsql-reference.md
@@ -3,13 +3,16 @@ title: YugabyteDB Npgsql Smart Driver
headerTitle: C# Drivers
linkTitle: C# Drivers
description: C# Npgsql Smart Driver for YSQL
-headcontent: C# Drivers for YSQL
+badges: ysql
+aliases:
+ - /preview/reference/drivers/csharp/
+ - /preview/reference/drivers/csharp/yb-npgsql-reference/
menu:
preview:
name: C# Drivers
- identifier: ref-yb-npgsql-driver
- parent: drivers
- weight: 600
+ identifier: ref-1-yb-npgsql-driver
+ parent: csharp-drivers
+ weight: 100
type: docs
---
@@ -31,12 +34,12 @@ type: docs
-Yugabyte Npgsql smart driver is a .NET driver for [YSQL](../../../../api/ysql/) based on [PostgreSQL Npgsql driver](https://github.com/npgsql/npgsql/tree/main/src/Npgsql), with additional connection load balancing features.
+Yugabyte Npgsql smart driver is a .NET driver for [YSQL](../../../api/ysql/) based on [PostgreSQL Npgsql driver](https://github.com/npgsql/npgsql/tree/main/src/Npgsql), with additional connection load balancing features.
For more information on the Yugabyte Npgsql smart driver, see the following:
-- [YugabyteDB smart drivers for YSQL](../../../../drivers-orms/smart-drivers/)
-- [CRUD operations](../../../../drivers-orms/csharp/ysql/)
+- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
+- [CRUD operations](../ysql/)
- [GitHub repository](https://github.com/yugabyte/npgsql)
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
@@ -79,7 +82,7 @@ var connStringBuilder = "Host=127.0.0.1,127.0.0.2,127.0.0.3;Port=5433;Database=y
NpgsqlConnection conn = new NpgsqlConnection(connStringBuilder)
```
-You can specify [multiple hosts](../../../../drivers-orms/csharp/ysql/#use-multiple-addresses) in the connection string in case the primary address fails. After the driver establishes the initial connection, it fetches the list of available servers from the universe, and performs load balancing of subsequent connection requests across these servers.
+You can specify [multiple hosts](../ysql/#use-multiple-addresses) in the connection string in case the primary address fails. After the driver establishes the initial connection, it fetches the list of available servers from the universe, and performs load balancing of subsequent connection requests across these servers.
To specify topology keys, you set the `Topology Keys` property to comma separated values, as per the following example:
diff --git a/docs/content/preview/drivers-orms/csharp/ycql.md b/docs/content/preview/drivers-orms/csharp/ycql.md
index 017ffec99b69..281e4fe13674 100644
--- a/docs/content/preview/drivers-orms/csharp/ycql.md
+++ b/docs/content/preview/drivers-orms/csharp/ycql.md
@@ -5,7 +5,7 @@ linkTitle: Connect an app
description: Connect a C# application using YugabyteDB YCQL driver
menu:
preview:
- identifier: csharp-driver-ycql
+ identifier: csharp-3-driver-ycql
parent: csharp-drivers
weight: 500
type: docs
diff --git a/docs/content/preview/drivers-orms/csharp/ysql.md b/docs/content/preview/drivers-orms/csharp/ysql.md
index 4a1f8e9c64f2..9ea7b6e7b5d4 100644
--- a/docs/content/preview/drivers-orms/csharp/ysql.md
+++ b/docs/content/preview/drivers-orms/csharp/ysql.md
@@ -5,9 +5,9 @@ linkTitle: Connect an app
description: Connect a C# application using Npgsql Smart Driver
menu:
preview:
- identifier: csharp-driver-ysql
+ identifier: csharp-1-driver-ysql
parent: csharp-drivers
- weight: 400
+ weight: 500
type: docs
---
@@ -204,5 +204,3 @@ John 35 CSharp
- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
-- [YugabyteDB Npgsql Smart Driver reference](../../../reference/drivers/csharp/yb-npgsql-reference/)
-- Build C# applications using [Entity Framework ORM](../entityframework)
diff --git a/docs/content/preview/drivers-orms/elixir/_index.md b/docs/content/preview/drivers-orms/elixir/_index.md
index 4ef208f8f341..7dc9b388bf69 100644
--- a/docs/content/preview/drivers-orms/elixir/_index.md
+++ b/docs/content/preview/drivers-orms/elixir/_index.md
@@ -28,10 +28,12 @@ Learn how to establish a connection to a YugabyteDB database and begin basic CRU
To develop Elixir applications for YugabyteDB, you need the following:
-- **Elixir**\
+- **Elixir**
+
Install the latest versions of [Elixir, Erlang VM, IEx and Mix](https://elixir-lang.org/docs.html) (tested with Elixir 1.17.1 and Erlang/OTP 26 erts-14.2.5).
- **YugabyteDB cluster**
+
- Create a free cluster on YugabyteDB Aeon. Refer to [Use a cloud cluster](../../quick-start-yugabytedb-managed/). Note that YugabyteDB Aeon requires SSL.
- Alternatively, set up a standalone YugabyteDB cluster by following the steps in [Install YugabyteDB](../../quick-start/).
diff --git a/docs/content/preview/drivers-orms/go/_index.md b/docs/content/preview/drivers-orms/go/_index.md
index dba7e17c68b8..29dcc4e8d7d4 100644
--- a/docs/content/preview/drivers-orms/go/_index.md
+++ b/docs/content/preview/drivers-orms/go/_index.md
@@ -19,35 +19,37 @@ The following projects can be used to implement Golang applications using the Yu
| Project | Documentation and Guides | Latest Driver Version | Supported YugabyteDB Version |
| ------- | ------------------------ | ------------------------ | ---------------------|
-| YugabyteDB PGX Driver [Recommended] | [Documentation](yb-pgx/) [Reference](../../reference/drivers/go/yb-pgx-reference/) | [v4](https://pkg.go.dev/github.com/yugabyte/pgx/) | 2.8 and above
-| PGX Driver | [Documentation](pgx/) [Reference](../../reference/drivers/go/pgx-reference/) | [v4](https://pkg.go.dev/github.com/jackc/pgx/) | 2.8 and above
-| PQ Driver | [Documentation](pq/) [Reference](../../reference/drivers/go/pq-reference/) | [v1.10.2](https://github.com/lib/pq/releases/tag/v1.10.2/) | 2.6 and above
+| YugabyteDB PGX Driver [Recommended] | [Documentation](yb-pgx/) [Reference](yb-pgx-reference/) | [v4](https://pkg.go.dev/github.com/yugabyte/pgx/) | 2.8 and above |
+| PGX Driver | [Documentation](pgx/) [Reference](pgx-reference/) | [v4](https://pkg.go.dev/github.com/jackc/pgx/) | 2.8 and above |
+| PQ Driver | [Documentation](pq/) [Reference](pq-reference/) | [v1.10.2](https://github.com/lib/pq/releases/tag/v1.10.2/) | 2.6 and above |
| YugabyteDB Go Driver for YCQL | [Documentation](ycql) | [3.16.3](https://github.com/yugabyte/gocql) | |
| Project | Documentation and Guides | Example Apps |
| ------- | ------------------------ | ------------- |
-| GORM [Recommended] | [Documentation](gorm/) [Hello World](../orms/go/ysql-gorm)| [GORM App](https://github.com/YugabyteDB-Samples/orm-examples/tree/master/golang/gorm)
-| GO-PG | [Documentation](pg/) |
+| GORM [Recommended] | [Documentation](gorm/) [Hello World](../orms/go/ysql-gorm)| [GORM App](https://github.com/YugabyteDB-Samples/orm-examples/tree/master/golang/gorm) |
+| GO-PG | [Documentation](pg/) | |
Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations by referring to [Connect an app](yb-pgx/) or [Use an ORM](gorm/).
-For reference documentation, including using projects with SSL, refer to the [drivers and ORMs reference](../../reference/drivers/go/pgx-reference/) pages.
-
## Prerequisites
To develop Golang applications for YugabyteDB, you need the following:
-- **Go**\
- Install the latest Go (1.16 or later) on your system.\
+- **Go**
+
+ Install the latest Go (1.16 or later) on your system.
+
Run `go --version` in a terminal to check your version of Go. To install Go, visit [Go Downloads](https://golang.org/dl/).
-- **Create a Go project**\
+- **Create a Go project**
+
For ease-of-use, use an integrated development environment (IDE) such as Visual Studio. To download and install Visual Studio, visit the [Visual Studio Downloads](https://visualstudio.microsoft.com/downloads/) page.
- **YugabyteDB cluster**
+
- Create a free cluster on YugabyteDB Aeon. Refer to [Use a cloud cluster](../../quick-start-yugabytedb-managed/). Note that YugabyteDB Aeon requires SSL.
- Alternatively, set up a standalone YugabyteDB cluster by following the steps in [Install YugabyteDB](../../quick-start/).
## Next step
-- [Connect an app](yb-pgx/)
+[Connect an app](yb-pgx/)
diff --git a/docs/content/preview/drivers-orms/go/pg.md b/docs/content/preview/drivers-orms/go/pg.md
index fb43f7606a56..6faab66f2cfa 100644
--- a/docs/content/preview/drivers-orms/go/pg.md
+++ b/docs/content/preview/drivers-orms/go/pg.md
@@ -8,7 +8,7 @@ menu:
preview:
identifier: pg-orm
parent: go-drivers
- weight: 610
+ weight: 600
type: docs
---
@@ -84,11 +84,11 @@ db := pg.Connect(opt)
#### Use SSL
-For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the following SSL-related environment variables at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](../../../reference/drivers/go/yb-pgx-reference/#configure-ssl-tls) for the default and supported modes.
+For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the following SSL-related environment variables at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](yb-pgx-reference/#configure-ssl-tls) for the default and supported modes.
```sh
$ export PGSSLMODE=verify-ca
-$ export PGSSLROOTCERT=~/root.crt # Here, the CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly.
+$ export PGSSLROOTCERT=~/root.crt # CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly.
```
| Environment Variable | Description |
@@ -224,7 +224,7 @@ func main() {
#### Using pg.Options()
-If the password contains these special characters (#, %, ^), the driver may fail to parse the URL. In such a case, use pg.Options() instead of pg.ParseURL() to initialize the Options in `ybsql_hello_world.go`. The standard PG environment variables except PGPASSWORD and PGSSLROOTCERT are implicitly read by the driver. Set the PG variables as follows (replace the values as appropriate for YugabyteDB Aeon):
+If the password contains these special characters (#, %, ^), the driver may fail to parse the URL. In such a case, use `pg.Options()` instead of `pg.ParseURL()` to initialize the Options in `ybsql_hello_world.go`. The standard PG environment variables except PGPASSWORD and PGSSLROOTCERT are implicitly read by the driver. Set the PG variables as follows (replace the values as appropriate for YugabyteDB Aeon):
```sh
$ export PGHOST=127.0.0.1
@@ -234,7 +234,7 @@ $ export PGPASSWORD=password#with%special^chars
$ export PGDATABASE=yugabyte
```
-To use pg.Options(), replace the main function in your file with the following:
+To use `pg.Options()`, replace the main function in your file with the following:
```go
/* Modify the main() from the ybsql_hello_world.go script by replacing the first few lines and enabling pg.Options() */
diff --git a/docs/content/preview/reference/drivers/go/pgx-reference.md b/docs/content/preview/drivers-orms/go/pgx-reference.md
similarity index 94%
rename from docs/content/preview/reference/drivers/go/pgx-reference.md
rename to docs/content/preview/drivers-orms/go/pgx-reference.md
index 9369f0bad28c..ba067b7112c8 100644
--- a/docs/content/preview/reference/drivers/go/pgx-reference.md
+++ b/docs/content/preview/drivers-orms/go/pgx-reference.md
@@ -3,13 +3,15 @@ title: PGX Driver
headerTitle: Go Drivers
linkTitle: Go Drivers
description: Go PGX Driver for YSQL
-headcontent: Go Drivers for YSQL
+badges: ysql
+aliases:
+ - /preview/reference/drivers/go/pgx-reference/
menu:
preview:
name: Go Drivers
- identifier: ref-pgx-go-driver
- parent: drivers
- weight: 610
+ identifier: ref-2-pgx-go-driver
+ parent: go-drivers
+ weight: 100
type: docs
---
@@ -41,7 +43,7 @@ The [PGX driver](https://github.com/jackc/pgx/) is one of the most popular and a
The driver allows Go programmers to connect to YugabyteDB to execute DMLs and DDLs using the PGX APIs. It also supports the standard `database/sql` package.
-For a tutorial on building a sample Go application with PGX, see [Connect an application](../../../../drivers-orms/go/pgx/).
+For a tutorial on building a sample Go application with PGX, see [Connect an application](../pgx/).
## Fundamentals
@@ -108,7 +110,7 @@ if err != nil {
The `conn.Exec()` function also returns an `error` object which, if not `nil`, needs to be handled in your code.
-Read more on designing [Database schemas and tables](../../../../explore/ysql-language-features/databases-schemas-tables/).
+Read more on designing [Database schemas and tables](../../../explore/ysql-language-features/databases-schemas-tables/).
### Read and write data
@@ -211,7 +213,7 @@ For more details, see [pgxpool package doc](https://pkg.go.dev/github.com/jackc/
To build a Go application that communicates securely over SSL with YugabyteDB database, you need the root certificate (`ca.crt`) of the YugabyteDB cluster.
-To generate these certificates and install them while launching the cluster, follow the instructions in [Create server certificates](../../../../secure/tls-encryption/server-certificates/).
+To generate these certificates and install them while launching the cluster, follow the instructions in [Create server certificates](../../../secure/tls-encryption/server-certificates/).
For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the SSL-related environment variables as follows at the client side.
@@ -244,7 +246,7 @@ YugabyteDB Aeon requires SSL/TLS, and connections using SSL mode `disable` will
## Transaction and isolation levels
-YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access.
+YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access.
The PGX driver provides `conn.Begin()` function to start a transaction. The function `conn.BeginEx()` can create a transaction with a specified isolation level.`
diff --git a/docs/content/preview/drivers-orms/go/pgx.md b/docs/content/preview/drivers-orms/go/pgx.md
index edd90300303a..e754eee3baa0 100644
--- a/docs/content/preview/drivers-orms/go/pgx.md
+++ b/docs/content/preview/drivers-orms/go/pgx.md
@@ -5,9 +5,9 @@ linkTitle: Connect an app
description: Connect a Go application using PGX Driver
menu:
preview:
- identifier: pgx-driver
+ identifier: go-2-pgx-driver
parent: go-drivers
- weight: 410
+ weight: 500
type: docs
---
@@ -98,19 +98,19 @@ conn, err := pgx.Connect(context.Background(), url)
| Parameter | Description | Default |
| :-------- | :---------- | :------ |
-| user | User connecting to the database | yugabyte
-| password | User password | yugabyte
-| host | Hostname of the YugabyteDB instance | localhost
-| port | Listen port for YSQL | 5433
-| dbname | Database name | yugabyte
+| user | User connecting to the database | yugabyte |
+| password | User password | yugabyte |
+| host | Hostname of the YugabyteDB instance | localhost |
+| port | Listen port for YSQL | 5433 |
+| dbname | Database name | yugabyte |
#### Use SSL
-For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the SSL-related environment variables as below at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](../../../reference/drivers/go/pgx-reference/#configure-ssl-tls) for the default and supported modes.
+For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the SSL-related environment variables as below at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](../pgx-reference/#configure-ssl-tls) for the default and supported modes.
```sh
$ export PGSSLMODE=verify-ca
-$ export PGSSLROOTCERT=~/root.crt # Here, the CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly.
+$ export PGSSLROOTCERT=~/root.crt # CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly.
```
| Environment variable | Description |
@@ -232,7 +232,4 @@ Query for id=1 returned: Row[John, 35, Go]
## Learn more
- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
-- [YugabyteDB PGX driver reference](../../../reference/drivers/go/pgx-reference/)
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
-- Build Go applications using [GORM](../gorm/)
-- Build Go applications using [PG](../pg/)
diff --git a/docs/content/preview/reference/drivers/go/pq-reference.md b/docs/content/preview/drivers-orms/go/pq-reference.md
similarity index 92%
rename from docs/content/preview/reference/drivers/go/pq-reference.md
rename to docs/content/preview/drivers-orms/go/pq-reference.md
index efef08eafccc..481711ff6139 100644
--- a/docs/content/preview/reference/drivers/go/pq-reference.md
+++ b/docs/content/preview/drivers-orms/go/pq-reference.md
@@ -3,13 +3,15 @@ title: PQ Driver
headerTitle: Go Drivers
linkTitle: Go Drivers
description: Go PQ Driver for YSQL
-headcontent: Go Drivers for YSQL
+badges: ysql
+aliases:
+ - /preview/reference/drivers/go/pq-reference/
menu:
preview:
name: Go Drivers
- identifier: ref-pq-go-driver
- parent: drivers
- weight: 620
+ identifier: ref-3-pq-go-driver
+ parent: go-drivers
+ weight: 100
type: docs
---
@@ -39,9 +41,9 @@ type: docs
The [PQ driver](https://github.com/lib/pq/) is a popular driver for PostgreSQL that can used for connecting to YugabyteDB YSQL.
-The driver allows Go programmers to connect to YugabyteDB database to execute DMLs and DDLs using the standard `database/sql` package. The driver supports the [SCRAM-SHA-256 authentication method](../../../../secure/authentication/password-authentication/#scram-sha-256).
+The driver allows Go programmers to connect to YugabyteDB database to execute DMLs and DDLs using the standard `database/sql` package. The driver supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
-For a tutorial on building a sample Go application with pq, see [Connect an application](../../../../drivers-orms/go/pq/).
+For a tutorial on building a sample Go application with pq, see [Connect an application](../pq/).
## Fundamentals
@@ -126,7 +128,7 @@ if _, err := db.Exec(createStmt); err != nil {
The `db.Exec()` function also returns an `error` object which, if not `nil`, needs to handled in your code.
-Read more on designing [Database schemas and tables](../../../../explore/ysql-language-features/databases-schemas-tables/).
+Read more on designing [Database schemas and tables](../../../explore/ysql-language-features/databases-schemas-tables/).
### Read and write data
@@ -193,7 +195,7 @@ if err != nil {
To build a Go application that communicates securely over SSL with YugabyteDB database, you need the root certificate (`ca.crt`) of the YugabyteDB Cluster.
-To generate these certificates and install them while launching the cluster, follow the instructions in [Create server certificates](../../../../secure/tls-encryption/server-certificates/).
+To generate these certificates and install them while launching the cluster, follow the instructions in [Create server certificates](../../../secure/tls-encryption/server-certificates/).
For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the SSL-related environment variables at the client side.
@@ -226,7 +228,7 @@ YugabyteDB Aeon requires SSL/TLS, and connections using SSL mode `disable` will
## Transaction and isolation levels
-YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access.
+YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access.
The PQ driver provides `db.Begin()` function to start a transaction. The function `conn.BeginEx()` can create a transaction with a specified isolation level.`
diff --git a/docs/content/preview/drivers-orms/go/pq.md b/docs/content/preview/drivers-orms/go/pq.md
index b349d31c3d43..1d0424e10297 100644
--- a/docs/content/preview/drivers-orms/go/pq.md
+++ b/docs/content/preview/drivers-orms/go/pq.md
@@ -5,9 +5,9 @@ linkTitle: Connect an app
description: Connect a Go application using PQ driver
menu:
preview:
- identifier: pq-driver
+ identifier: go-3-pq-driver
parent: go-drivers
- weight: 420
+ weight: 500
type: docs
---
@@ -105,19 +105,19 @@ if err != nil {
| Parameter | Description | Default |
| :-------- | :---------- | :------ |
-| user | User connecting to the database | yugabyte
-| password | User password | yugabyte
-| host | Hostname of the YugabyteDB instance | localhost
-| port | Listen port for YSQL | 5433
-| dbname | Database name | yugabyte
+| user | User connecting to the database | yugabyte |
+| password | User password | yugabyte |
+| host | Hostname of the YugabyteDB instance | localhost |
+| port | Listen port for YSQL | 5433 |
+| dbname | Database name | yugabyte |
#### Use SSL
-For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the SSL-related environment variables as below at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](../../../reference/drivers/go/pq-reference/#ssl-modes) for the default and supported modes.
+For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the SSL-related environment variables as below at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](../pq-reference/#ssl-modes) for the default and supported modes.
```sh
$ export PGSSLMODE=verify-ca
-$ export PGSSLROOTCERT=~/root.crt # Here, the CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly.
+$ export PGSSLROOTCERT=~/root.crt # CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly.
```
| Environment Variable | Description |
@@ -234,7 +234,4 @@ Query for id=1 returned: Row[John, 35, Go]
## Learn more
- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
-- [YugabyteDB PQ driver reference](../../../reference/drivers/go/pq-reference/)
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
-- Build Go applications using [GORM](../gorm/)
-- Build Go applications using [PG](../pg/)
diff --git a/docs/content/preview/reference/drivers/go/yb-pgx-reference.md b/docs/content/preview/drivers-orms/go/yb-pgx-reference.md
similarity index 87%
rename from docs/content/preview/reference/drivers/go/yb-pgx-reference.md
rename to docs/content/preview/drivers-orms/go/yb-pgx-reference.md
index e00a372449cf..78d0134eff6a 100644
--- a/docs/content/preview/reference/drivers/go/yb-pgx-reference.md
+++ b/docs/content/preview/drivers-orms/go/yb-pgx-reference.md
@@ -3,13 +3,16 @@ title: PGX Smart Driver
headerTitle: Go Drivers
linkTitle: Go Drivers
description: Go PGX Smart Driver for YSQL
-headcontent: Go Drivers for YSQL
+badges: ysql
+aliases:
+ - /preview/reference/drivers/go/
+ - /preview/reference/drivers/go/yb-pgx-reference/
menu:
preview:
name: Go Drivers
- identifier: ref-yb-pgx-go-driver
- parent: drivers
- weight: 600
+ identifier: ref-1-yb-pgx-go-driver
+ parent: go-drivers
+ weight: 100
type: docs
---
@@ -37,12 +40,12 @@ type: docs
-YugabyteDB PGX smart driver is a Go driver for [YSQL](../../../../api/ysql/) based on [PGX](https://github.com/jackc/pgx/), with additional connection load balancing features.
+YugabyteDB PGX smart driver is a Go driver for [YSQL](../../../api/ysql/) based on [PGX](https://github.com/jackc/pgx/), with additional connection load balancing features.
For more information on the YugabyteDB PGX smart driver, see the following:
-- [YugabyteDB smart drivers for YSQL](../../../../drivers-orms/smart-drivers/)
-- [CRUD operations](../../../../drivers-orms/go/yb-pgx)
+- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
+- [CRUD operations](../yb-pgx)
- [GitHub repository](https://github.com/yugabyte/pgx)
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
@@ -84,7 +87,7 @@ url := fmt.Sprintf("%s?load_balance=true", baseUrl)
conn, err := pgx.Connect(context.Background(), url)
```
-You can specify [multiple hosts](../../../../drivers-orms/go/yb-pgx/#use-multiple-addresses) in the connection string in case the primary address fails. After the driver establishes the initial connection, it fetches the list of available servers from the universe, and performs load balancing of subsequent connection requests across these servers.
+You can specify [multiple hosts](../yb-pgx/#use-multiple-addresses) in the connection string in case the primary address fails. After the driver establishes the initial connection, it fetches the list of available servers from the universe, and performs load balancing of subsequent connection requests across these servers.
To specify topology keys, you set the `topology_keys` property to comma separated values, as per the following example:
@@ -114,7 +117,7 @@ if err != nil {
The `conn.Exec()` function also returns an `error` object which, if not `nil`, needs to be handled in your code.
-Read more on designing [Database schemas and tables](../../../../explore/ysql-language-features/databases-schemas-tables/).
+Read more on designing [Database schemas and tables](../../../explore/ysql-language-features/databases-schemas-tables/).
### Read and write data
@@ -234,9 +237,9 @@ For more details, see the [pgxpool package](https://pkg.go.dev/github.com/jackc/
## Configure SSL/TLS
-To build a Go application that communicates securely over SSL with YugabyteDB database, you need the root certificate (`ca.crt`) of the YugabyteDB cluster. To generate these certificates and install them while launching the cluster, follow the instructions in [Create server certificates](../../../../secure/tls-encryption/server-certificates/).
+To build a Go application that communicates securely over SSL with YugabyteDB database, you need the root certificate (`ca.crt`) of the YugabyteDB cluster. To generate these certificates and install them while launching the cluster, follow the instructions in [Create server certificates](../../../secure/tls-encryption/server-certificates/).
-Because a YugabyteDB Aeon cluster is always configured with SSL/TLS, you don't have to generate any certificate but only set the client-side SSL configuration. To fetch your root certificate, refer to [CA certificate](../../../../yugabyte-cloud/cloud-secure-clusters/cloud-authentication/#download-your-cluster-certificate).
+Because a YugabyteDB Aeon cluster is always configured with SSL/TLS, you don't have to generate any certificate but only set the client-side SSL configuration. To fetch your root certificate, refer to [CA certificate](../../../yugabyte-cloud/cloud-secure-clusters/cloud-authentication/#download-your-cluster-certificate).
For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the SSL-related environment variables as follows at the client side.
@@ -263,7 +266,7 @@ $ export PGSSLROOTCERT=~/root.crt # Here, the CA certificate file is downloaded
## Transaction and isolation levels
-YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access.
+YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access.
The PGX driver provides the `conn.Begin()` function to start a transaction. The `conn.BeginEx()` function can create a transaction with a specified isolation level.
diff --git a/docs/content/preview/drivers-orms/go/yb-pgx.md b/docs/content/preview/drivers-orms/go/yb-pgx.md
index 2cb1005b056d..28c463a96001 100644
--- a/docs/content/preview/drivers-orms/go/yb-pgx.md
+++ b/docs/content/preview/drivers-orms/go/yb-pgx.md
@@ -5,9 +5,9 @@ linkTitle: Connect an app
description: Connect a Go application using YugabyteDB PGX Smart Driver
menu:
preview:
- identifier: yb-pgx-driver
+ identifier: go-1-yb-pgx-driver
parent: go-drivers
- weight: 400
+ weight: 500
type: docs
---
@@ -81,7 +81,7 @@ cd yb-pgx
go mod init hello
```
-Optionally, you can choose to import the pgxpool package instead. Refer to [Use pgxpool API](../../../reference/drivers/go/yb-pgx-reference/#use-pgxpool-api) to learn more.
+Optionally, you can choose to import the pgxpool package instead. Refer to [Use pgxpool API](../yb-pgx-reference/#use-pgxpool-api) to learn more.
### Step 2: Set up the database connection
@@ -93,14 +93,14 @@ The following table describes the connection parameters required to connect, inc
| Parameter | Description | Default |
| :-------- | :---------- | :------ |
-| host | Host name of the YugabyteDB instance. You can also enter [multiple addresses](#use-multiple-addresses). | localhost
-| port | Listen port for YSQL | 5433
-| user | User connecting to the database | yugabyte
-| password | User password | yugabyte
-| dbname | Database name | yugabyte
-| `load_balance` | [Uniform load balancing](../../smart-drivers/#cluster-aware-connection-load-balancing) | Defaults to upstream driver behavior unless set to 'true'
-| `yb_servers_refresh_interval` | If `load_balance` is true, the interval in seconds to refresh the servers list | 300
-| `topology_keys` | [Topology-aware load balancing](../../smart-drivers/#topology-aware-connection-load-balancing) | If `load_balance` is true, uses uniform load balancing unless set to comma-separated geo-locations in the form `cloud.region.zone`.
+| host | Host name of the YugabyteDB instance. You can also enter [multiple addresses](#use-multiple-addresses). | localhost |
+| port | Listen port for YSQL | 5433 |
+| user | User connecting to the database | yugabyte |
+| password | User password | yugabyte |
+| dbname | Database name | yugabyte |
+| `load_balance` | [Uniform load balancing](../../smart-drivers/#cluster-aware-connection-load-balancing) | Defaults to upstream driver behavior unless set to 'true' |
+| `yb_servers_refresh_interval` | If `load_balance` is true, the interval in seconds to refresh the servers list | 300 |
+| `topology_keys` | [Topology-aware load balancing](../../smart-drivers/#topology-aware-connection-load-balancing) | If `load_balance` is true, uses uniform load balancing unless set to comma-separated geo-locations in the form `cloud.region.zone`. |
The following is an example connection string for connecting to YugabyteDB with uniform load balancing:
@@ -178,11 +178,11 @@ The hosts are only used during the initial connection attempt. If the first host
#### Use SSL
-For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the following SSL-related environment variables at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](../../../reference/drivers/go/yb-pgx-reference/#configure-ssl-tls) for the default and supported modes.
+For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the following SSL-related environment variables at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](../yb-pgx-reference/#configure-ssl-tls) for the default and supported modes.
```sh
$ export PGSSLMODE=verify-ca
-$ export PGSSLROOTCERT=~/root.crt # Here, the CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly.
+$ export PGSSLROOTCERT=~/root.crt # CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly.
```
| Environment Variable | Description |
@@ -681,7 +681,4 @@ Closing the application ...
## Learn more
- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
-- [YugabyteDB PGX smart driver reference](../../../reference/drivers/go/yb-pgx-reference/)
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
-- Build Go applications using [GORM](../gorm/)
-- Build Go applications using [PG](../pg/)
diff --git a/docs/content/preview/drivers-orms/go/ycql.md b/docs/content/preview/drivers-orms/go/ycql.md
index 6e8e46f5b202..800260eee11f 100644
--- a/docs/content/preview/drivers-orms/go/ycql.md
+++ b/docs/content/preview/drivers-orms/go/ycql.md
@@ -7,7 +7,7 @@ aliases:
- /preview/tutorials/build-apps/go/cloud-ycql-go/
menu:
preview:
- identifier: yb-pgx-driver-ycql
+ identifier: go-4-yb-pgx-driver-ycql
parent: go-drivers
weight: 500
type: docs
diff --git a/docs/content/preview/drivers-orms/java/_index.md b/docs/content/preview/drivers-orms/java/_index.md
index 14a40695cc29..2444974428c2 100644
--- a/docs/content/preview/drivers-orms/java/_index.md
+++ b/docs/content/preview/drivers-orms/java/_index.md
@@ -21,12 +21,12 @@ The following projects can be used to implement Java applications using the Yuga
| Driver | Documentation and Guides | Latest Driver Version | Supported YugabyteDB Version |
| ------- | ------------------------ | ------------------------ | ---------------------|
-| YugabyteDB JDBC Driver [Recommended] | [Documentation](yugabyte-jdbc/) [Blog](https://dev.to/yugabyte/yugabytedb-jdbc-smart-driver-for-proxyless-halb-2k8a/) [Reference](../../reference/drivers/java/yugabyte-jdbc-reference/) | [42.3.5-yb-5](https://mvnrepository.com/artifact/com.yugabyte/jdbc-yugabytedb/42.3.5-yb-5) | 2.8 and above |
+| YugabyteDB JDBC Driver [Recommended] | [Documentation](yugabyte-jdbc/) [Reference](yugabyte-jdbc-reference/) [Blog](https://dev.to/yugabyte/yugabytedb-jdbc-smart-driver-for-proxyless-halb-2k8a/) | [42.3.5-yb-5](https://mvnrepository.com/artifact/com.yugabyte/jdbc-yugabytedb/42.3.5-yb-5) | 2.8 and above |
| YugabyteDB R2DBC Driver | [Documentation](yb-r2dbc/) | [1.1.0-yb-1-ea](https://mvnrepository.com/artifact/com.yugabyte/r2dbc-postgresql) | 2.18 and above |
-| PostgreSQL JDBC Driver | [Documentation](postgres-jdbc/) [Reference](../../reference/drivers/java/postgres-jdbc-reference/) | [42.3.4](https://mvnrepository.com/artifact/org.postgresql/postgresql/42.3.4) | 2.4 and above |
-| Vert.x Pg Client | [Documentation](ysql-vertx-pg-client/) | [4.3.2](https://mvnrepository.com/artifact/io.vertx/vertx-core/4.3.2) |
-| YugabyteDB YCQL (3.10) Driver | [Documentation](ycql) [Reference](../../reference/drivers/ycql-client-drivers/#java) | [3.10.3-yb-2](https://mvnrepository.com/artifact/com.yugabyte/cassandra-driver-core/3.10.3-yb-2) | |
-| YugabyteDB YCQL (4.15) Driver | [Documentation](ycql-4.x) [Reference](../../reference/drivers/ycql-client-drivers/#java) | [4.15.0-yb-1](https://mvnrepository.com/artifact/com.yugabyte/java-driver-core/4.15.0-yb-1) | |
+| PostgreSQL JDBC Driver | [Documentation](postgres-jdbc/) [Reference](postgres-jdbc-reference/) | [42.3.4](https://mvnrepository.com/artifact/org.postgresql/postgresql/42.3.4) | 2.4 and above |
+| Vert.x Pg Client | [Documentation](ysql-vertx-pg-client/) | [4.3.2](https://mvnrepository.com/artifact/io.vertx/vertx-core/4.3.2) | |
+| YugabyteDB YCQL (3.10) Driver | [Documentation](ycql) | [3.10.3-yb-2](https://mvnrepository.com/artifact/com.yugabyte/cassandra-driver-core/3.10.3-yb-2) | |
+| YugabyteDB YCQL (4.15) Driver | [Documentation](ycql-4.x) | [4.15.0-yb-1](https://mvnrepository.com/artifact/com.yugabyte/java-driver-core/4.15.0-yb-1) | |
| Projects | Documentation and Guides | Example Apps |
| ------- | ------------------------ | ------------ |
@@ -38,8 +38,6 @@ The following projects can be used to implement Java applications using the Yuga
Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations by referring to [Connect an app](yugabyte-jdbc/) or [Use an ORM](hibernate/).
-For reference documentation, including using projects with SSL, refer to the [drivers and ORMs reference](../../reference/drivers/java/yugabyte-jdbc-reference/) pages.
-
## Prerequisites
To develop Java driver applications for YugabyteDB, you need the following:
@@ -90,4 +88,4 @@ To develop Java driver applications for YugabyteDB, you need the following:
## Next step
-- [Connect an app](yugabyte-jdbc/)
+[Connect an app](yugabyte-jdbc/)
diff --git a/docs/content/preview/drivers-orms/java/hibernate.md b/docs/content/preview/drivers-orms/java/hibernate.md
index e4fda803bb11..bee912438672 100644
--- a/docs/content/preview/drivers-orms/java/hibernate.md
+++ b/docs/content/preview/drivers-orms/java/hibernate.md
@@ -8,7 +8,7 @@ menu:
preview:
identifier: java-orm
parent: java-drivers
- weight: 500
+ weight: 600
type: docs
---
diff --git a/docs/content/preview/drivers-orms/java/mybatis.md b/docs/content/preview/drivers-orms/java/mybatis.md
index 4c7467491746..04ab4ba12510 100644
--- a/docs/content/preview/drivers-orms/java/mybatis.md
+++ b/docs/content/preview/drivers-orms/java/mybatis.md
@@ -8,7 +8,7 @@ menu:
preview:
identifier: java-orm-mybatis
parent: java-drivers
- weight: 700
+ weight: 600
type: docs
---
@@ -99,32 +99,32 @@ Create the XML file `UserMapper.xml` in the resources folder of your Java projec
insert into users (email, first_name, last_name) values (#{email}, #{firstName}, #{lastName})
-
+
-
+
-
+
-
+
delete from users where user_id = #{userId};
-
+
```
### Step 4: Configure the data mappers and datasource in MyBatis configuration file
-All the data mappers must be defined in the MyBatis configuration file. Create `mybatis-config.xml` in the resources folder to configure the MyBatis framework.
+All the data mappers must be defined in the MyBatis configuration file. Create `mybatis-config.xml` in the resources folder to configure the MyBatis framework.
In `mybatis-config.xml`, define the User data mapper and the datasource for connecting to the YugabyteDB database.
@@ -178,9 +178,9 @@ import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
public class MybatisUtil {
-
+
private static SqlSessionFactory sqlSessionFactory;
-
+
public static SqlSessionFactory getSessionFactory() {
String resource = "mybatis-config.xml";
InputStream inputStream;
@@ -217,32 +217,32 @@ public class UserDAO {
}
public void save(final User entity) {
-
+
try (SqlSession session = sqlSessionFactory.openSession()) {
session.insert("mybatis.mapper.UserMapper.save", entity);
session.commit();
- } catch (RuntimeException rte) {}
+ } catch (RuntimeException rte) {}
}
public User findById(final Long id) {
-
+
User user = null;
try (SqlSession session = sqlSessionFactory.openSession()) {
user = session.selectOne("mybatis.mapper.UserMapper.findById", id);
-
- } catch (RuntimeException rte) {}
-
+
+ } catch (RuntimeException rte) {}
+
return user;
}
public List findAll() {
-
+
List users = null;
try (SqlSession session = sqlSessionFactory.openSession()) {
users = session.selectList("mybatis.mapper.UserMapper.findAll");
} catch (RuntimeException rte) {}
-
+
return users;
}
@@ -266,7 +266,7 @@ import java.sql.SQLException;
import org.apache.ibatis.session.SqlSessionFactory;
public class MyBatisExample {
-
+
public static void main(String[] args) throws ClassNotFoundException, SQLException {
SqlSessionFactory sessionFactory = MybatisUtil.getSessionFactory();
@@ -277,7 +277,7 @@ public class MyBatisExample {
user.setEmail("demo@yugabyte.com");
user.setFirstName("Alice");
user.setLastName("yugabeing");
-
+
// Save an user
userDAO.save(user);
System.out.println("Inserted user record: " + user.getFirstName());
diff --git a/docs/content/preview/reference/drivers/java/postgres-jdbc-reference.md b/docs/content/preview/drivers-orms/java/postgres-jdbc-reference.md
similarity index 94%
rename from docs/content/preview/reference/drivers/java/postgres-jdbc-reference.md
rename to docs/content/preview/drivers-orms/java/postgres-jdbc-reference.md
index 92d39dc268c4..98c3a5364dba 100644
--- a/docs/content/preview/reference/drivers/java/postgres-jdbc-reference.md
+++ b/docs/content/preview/drivers-orms/java/postgres-jdbc-reference.md
@@ -3,13 +3,15 @@ title: PostgreSQL JDBC Driver
headerTitle: JDBC Drivers
linkTitle: JDBC Drivers
description: Java JDBC Driver for YSQL
-headcontent: JDBC Drivers for YSQL
+badges: ysql
+aliases:
+- /preview/reference/drivers/java/postgres-jdbc-reference/
menu:
preview:
name: JDBC Drivers
- identifier: ref-postgres-jdbc-driver
- parent: drivers
- weight: 600
+ identifier: ref-2-postgres-jdbc-driver
+ parent: java-drivers
+ weight: 100
type: docs
---
@@ -31,9 +33,9 @@ type: docs
-The [PostgreSQL JDBC driver](https://jdbc.postgresql.org/) is the official JDBC driver for PostgreSQL, and can be used for connecting to YugabyteDB YSQL. YugabyteDB YSQL has full compatibility with the PostgreSQL JDBC Driver, allowing Java programmers to connect to YugabyteDB database to execute DMLs and DDLs using the JDBC APIs. The driver supports the [SCRAM-SHA-256 authentication method](../../../../secure/authentication/password-authentication/#scram-sha-256).
+The [PostgreSQL JDBC driver](https://jdbc.postgresql.org/) is the official JDBC driver for PostgreSQL, and can be used for connecting to YugabyteDB YSQL. YugabyteDB YSQL has full compatibility with the PostgreSQL JDBC Driver, allowing Java programmers to connect to YugabyteDB database to execute DMLs and DDLs using the JDBC APIs. The driver supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
-For building a sample Java application with the PostgreSQL JDBC driver, see [Connect an application](../../../../drivers-orms/java/postgres-jdbc/).
+For building a sample Java application with the PostgreSQL JDBC driver, see [Connect an application](../postgres-jdbc/).
## Download the driver dependency
@@ -117,7 +119,7 @@ try {
}
```
-`java.sql.Statement` throws the `java.sql.SQLException` exception, which needs to handled in the Java code. Read more on designing [Database schemas and tables](../../../../explore/ysql-language-features/databases-schemas-tables/).
+`java.sql.Statement` throws the `java.sql.SQLException` exception, which needs to handled in the Java code. Read more on designing [Database schemas and tables](../../../explore/ysql-language-features/databases-schemas-tables/).
### Read and write data
@@ -189,7 +191,7 @@ try {
## Configure SSL/TLS
-To build a Java application that communicates securely over SSL, get the root certificate (`ca.crt`) of the YugabyteDB Cluster. If certificates are not generated yet, follow the instructions in [Create server certificates](../../../../secure/tls-encryption/server-certificates/).
+To build a Java application that communicates securely over SSL, get the root certificate (`ca.crt`) of the YugabyteDB Cluster. If certificates are not generated yet, follow the instructions in [Create server certificates](../../../secure/tls-encryption/server-certificates/).
Generally, when configuring the Java client to use SSL, all the certificates required for connecting to the database are available on the Classpath of the Java application, or in the default PostgreSQL working directory `(~/.postgresql/)` of the VM or container where the application is hosted.
@@ -224,7 +226,7 @@ YugabyteDB cluster can be configured to authenticate the identity of the JDBC cl
Steps for configuring the JDBC client for server authentication are as follows:
-1. Download the certificate (`yugabytedb.crt`, `yugabytedb.key`, and `ca.crt`) files (see [Copy configuration files to the nodes](../../../../secure/tls-encryption/server-certificates/#copy-configuration-files-to-the-nodes)).
+1. Download the certificate (`yugabytedb.crt`, `yugabytedb.key`, and `ca.crt`) files (see [Copy configuration files to the nodes](../../../secure/tls-encryption/server-certificates/#copy-configuration-files-to-the-nodes)).
1. If you do not have access to the system `cacerts` Java truststore you can create your own truststore.
@@ -268,7 +270,7 @@ Steps for configuring the JDBC client for server authentication are as follows:
Steps for configuring the JDBC client for server authentication in a Kubernetes cluster are as follows:
-1. Create a minikube cluster by adding `tls.enabled=true` to the command line described in [Quick start](../../../../quick-start/kubernetes/).
+1. Create a minikube cluster by adding `tls.enabled=true` to the command line described in [Quick start](../../../quick-start/kubernetes/).
```sh
$ kubectl create namespace yb-demo
@@ -346,7 +348,7 @@ Connection conn = DriverManager.getConnection(jdbc:postgresql://localhost:5433/y
## Transaction and isolation levels
-YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access.
+YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access.
JDBC Driver `java.sql.Connection` interface provides `connection.setAutoCommit()`, `connection.commit()` and `connection.rollback()` methods for enabling transactional access to YugabyteDB Database.
diff --git a/docs/content/preview/drivers-orms/java/postgres-jdbc.md b/docs/content/preview/drivers-orms/java/postgres-jdbc.md
index dd4ea5598a52..668175720ec7 100644
--- a/docs/content/preview/drivers-orms/java/postgres-jdbc.md
+++ b/docs/content/preview/drivers-orms/java/postgres-jdbc.md
@@ -3,9 +3,10 @@ title: PostgreSQL JDBC driver for YSQL
headerTitle: Connect an application
linkTitle: Connect an app
description: Connect a Java application using PostgreSQL JDBC driver
+badges: ysql
menu:
preview:
- identifier: postgres-jdbc-driver
+ identifier: java-driver-3-jdbc-postgres
parent: java-drivers
weight: 500
type: docs
@@ -68,7 +69,7 @@ To start building your application, make sure you have met the [prerequisites](.
If you're building the application with SSL, do the following additional steps:
-- Set up SSL/TLS depending on the platform you choose to create your local cluster. To set up a cluster in Minikube with SSL/TLS, see [SSL certificates for a cluster in Kubernetes](../../../reference/drivers/java/postgres-jdbc-reference/#ssl-certificates-for-a-cluster-in-kubernetes-optional). To set up SSL certificates for a local cluster, see [Set up SSL certificates for Java applications](../../../reference/drivers/java/postgres-jdbc-reference/#set-up-ssl-certificates-for-java-applications).
+- Set up SSL/TLS depending on the platform you choose to create your local cluster. To set up a cluster in Minikube with SSL/TLS, see [SSL certificates for a cluster in Kubernetes](../postgres-jdbc-reference/#ssl-certificates-for-a-cluster-in-kubernetes-optional). To set up SSL certificates for a local cluster, see [Set up SSL certificates for Java applications](../postgres-jdbc-reference/#set-up-ssl-certificates-for-java-applications).
- Install [OpenSSL](https://www.openssl.org/) 1.1.1 or later.
### Step 1: Set up the client dependency
@@ -107,7 +108,6 @@ Java applications can connect to and query the YugabyteDB database using the `ja
Use the `DriverManager.getConnection` method to create a connection object for the YugabyteDB Database. This can be used to perform DDLs and DMLs against the database.
-
| JDBC parameter | Description | Default |
| :------------- | :---------- | :------ |
| hostname | Hostname of the YugabyteDB instance | localhost |
@@ -222,8 +222,5 @@ If there is no output or you get an error, verify that the connection string in
## Learn more
-- [PostgreSQL JDBC driver reference](../../../reference/drivers/java/postgres-jdbc-reference/)
- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
- [Develop Spring Boot applications using the YugabyteDB JDBC Driver](/preview/integrations/spring-framework/sdyb/)
-- Build Java applications using [Hibernate ORM](../hibernate/)
-- Build Java applications using [Ebean ORM](../ebean/)
diff --git a/docs/content/preview/drivers-orms/java/yb-r2dbc.md b/docs/content/preview/drivers-orms/java/yb-r2dbc.md
index 726c9fd83062..cb7e05b96923 100644
--- a/docs/content/preview/drivers-orms/java/yb-r2dbc.md
+++ b/docs/content/preview/drivers-orms/java/yb-r2dbc.md
@@ -3,11 +3,12 @@ title: YugabyteDB R2DBC Smart Driver
headerTitle: Connect an application
linkTitle: Connect an app
description: Connect a Java application using YugabyteDB R2DBC Smart Driver for YSQL
+badges: ysql
menu:
preview:
- identifier: r2dbc-driver
+ identifier: java-driver-2-r2dbc
parent: java-drivers
- weight: 600
+ weight: 500
type: docs
---
diff --git a/docs/content/preview/drivers-orms/java/ycql-4.x.md b/docs/content/preview/drivers-orms/java/ycql-4.x.md
index 12b8ff0b735f..6cf1cc11a636 100644
--- a/docs/content/preview/drivers-orms/java/ycql-4.x.md
+++ b/docs/content/preview/drivers-orms/java/ycql-4.x.md
@@ -3,6 +3,7 @@ title: Java Driver 4.15 for YCQL
headerTitle: Connect an application
linkTitle: Connect an app
description: Connect a Java application using YCQL 4.15 driver
+badges: ycql
menu:
preview:
identifier: ycql-java-driver-4.x
diff --git a/docs/content/preview/drivers-orms/java/ycql.md b/docs/content/preview/drivers-orms/java/ycql.md
index e90b0ba12a6a..47b205573232 100644
--- a/docs/content/preview/drivers-orms/java/ycql.md
+++ b/docs/content/preview/drivers-orms/java/ycql.md
@@ -3,6 +3,7 @@ title: Java Driver 3.10 for YCQL
headerTitle: Connect an application
linkTitle: Connect an app
description: Connect a Java application using YCQL 3.10 driver
+badges: ycql
aliases:
- /preview/tutorials/build-apps/java/ycql
menu:
diff --git a/docs/content/preview/drivers-orms/java/ysql-vertx-pg-client.md b/docs/content/preview/drivers-orms/java/ysql-vertx-pg-client.md
index 2b6813a786e5..f3c7e689c7f1 100644
--- a/docs/content/preview/drivers-orms/java/ysql-vertx-pg-client.md
+++ b/docs/content/preview/drivers-orms/java/ysql-vertx-pg-client.md
@@ -3,11 +3,12 @@ title: Vert.x PG Client for YSQL
headerTitle: Connect an application
linkTitle: Connect an app
description: Connect a Java application using Vert.x PG driver
+badges: ysql
menu:
preview:
- identifier: vertx-pg-client
+ identifier: java-driver-4-vertx-pg-client
parent: java-drivers
- weight: 600
+ weight: 500
type: docs
---
diff --git a/docs/content/stable/reference/drivers/java/yugabyte-jdbc-reference.md b/docs/content/preview/drivers-orms/java/yugabyte-jdbc-reference.md
similarity index 95%
rename from docs/content/stable/reference/drivers/java/yugabyte-jdbc-reference.md
rename to docs/content/preview/drivers-orms/java/yugabyte-jdbc-reference.md
index 6aa41a03f852..e549e88e16dd 100644
--- a/docs/content/stable/reference/drivers/java/yugabyte-jdbc-reference.md
+++ b/docs/content/preview/drivers-orms/java/yugabyte-jdbc-reference.md
@@ -3,13 +3,15 @@ title: YugabyteDB JDBC Smart Driver
headerTitle: JDBC Drivers
linkTitle: JDBC Drivers
description: YugabyteDB JDBC Smart Driver for YSQL reference
-headcontent: JDBC Drivers for YSQL
+badges: ysql
+aliases:
+- /preview/reference/drivers/java/yugabyte-jdbc-reference/
menu:
- stable:
+ preview:
name: JDBC Drivers
- identifier: ref-yugabyte-jdbc-driver
- parent: drivers
- weight: 500
+ identifier: ref-1-yugabyte-jdbc-driver
+ parent: java-drivers
+ weight: 100
type: docs
---
@@ -31,12 +33,12 @@ type: docs
-YugabyteDB JDBC smart driver is a JDBC driver for [YSQL](../../../../api/ysql/) built on the [PostgreSQL JDBC driver](https://github.com/pgjdbc/pgjdbc), with additional connection load balancing features.
+YugabyteDB JDBC smart driver is a JDBC driver for [YSQL](../../../api/ysql/) built on the [PostgreSQL JDBC driver](https://github.com/pgjdbc/pgjdbc), with additional connection load balancing features.
For more information on the YugabyteDB Java smart driver, see the following:
-- [YugabyteDB smart drivers for YSQL](../../../../drivers-orms/smart-drivers/)
-- [CRUD operations](../../../../drivers-orms/java/yugabyte-jdbc)
+- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
+- [CRUD operations](../yugabyte-jdbc)
- [GitHub repository](https://github.com/yugabyte/pgjdbc)
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
@@ -71,7 +73,7 @@ To get the driver and HikariPool, add the following dependencies to the Gradle p
```java
// https://mvnrepository.com/artifact/org.postgresql/postgresql
-implementation 'com.yugabyte:jdbc-yugabytedb:42.3.0'
+implementation 'com.yugabyte:jdbc-yugabytedb:42.3.5-yb-5'
implementation 'com.zaxxer:HikariCP:4.0.3'
```
@@ -169,7 +171,7 @@ To use the driver, do the following:
## Try it out
-This tutorial shows how to use the YugabyteDB JDBC Driver with YugabyteDB. It starts by creating a three-node cluster with a replication factor of 3. This tutorial uses the [yb-ctl](../../../../admin/yb-ctl/#root) utility.
+This tutorial shows how to use the YugabyteDB JDBC Driver with YugabyteDB. It starts by creating a three-node cluster with a replication factor of 3. This tutorial uses the [yugabyted](../../../reference/configuration/yugabyted/) utility.
Next, you use [yb-sample-apps](https://github.com/yugabyte/yb-sample-apps/tree/master) to demonstrate the driver's load balancing features and create a Maven project to learn how to use the driver in an application.
@@ -267,7 +269,7 @@ To access sample applications that use the YugabyteDB JDBC driver, visit [Yugaby
To use the samples, complete the following steps:
-- Install YugabyteDB by following the instructions in [Quick start](/preview/quick-start/).
+- Install YugabyteDB by following the instructions in [Quick start](../../../quick-start/).
- Build the examples by running `mvn package`.
diff --git a/docs/content/preview/drivers-orms/java/yugabyte-jdbc.md b/docs/content/preview/drivers-orms/java/yugabyte-jdbc.md
index aa7f498707f4..8609236a5d87 100644
--- a/docs/content/preview/drivers-orms/java/yugabyte-jdbc.md
+++ b/docs/content/preview/drivers-orms/java/yugabyte-jdbc.md
@@ -3,6 +3,7 @@ title: JDBC smart driver for YSQL
headerTitle: Connect an application
linkTitle: Connect an app
description: Connect a Java application using YugabyteDB JDBC Smart Driver
+badges: ysql
aliases:
- /develop/client-drivers/java/
- /preview/develop/client-drivers/java/
@@ -11,9 +12,9 @@ aliases:
- /preview/integrations/jdbc-drivers/
menu:
preview:
- identifier: yugabyte-jdbc-driver
+ identifier: java-driver-1-yugabyte-jdbc
parent: java-drivers
- weight: 400
+ weight: 500
type: docs
---
@@ -252,8 +253,5 @@ If you receive no output or an error, check the parameters in the connection str
## Learn more
- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
-- Refer to [YugabyteDB JDBC driver reference](../../../reference/drivers/java/yugabyte-jdbc-reference/) and [Try it out](../../../reference/drivers/java/yugabyte-jdbc-reference/#try-it-out) for detailed smart driver examples.
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
- [Develop Spring Boot applications using the YugabyteDB JDBC Driver](/preview/integrations/spring-framework/sdyb/)
-- Build Java applications using [Hibernate ORM](../hibernate/)
-- Build Java applications using [Ebean ORM](../ebean/)
diff --git a/docs/content/preview/drivers-orms/nodejs/_index.md b/docs/content/preview/drivers-orms/nodejs/_index.md
index 57081d9d4f1c..436db474b6b1 100644
--- a/docs/content/preview/drivers-orms/nodejs/_index.md
+++ b/docs/content/preview/drivers-orms/nodejs/_index.md
@@ -19,32 +19,33 @@ The following projects are recommended for implementing Node applications using
| Project | Documentation and Guides | Latest Driver Version | Supported YugabyteDB Version |
| :------ | :----------------------- | :----------------------- | :--------------------|
-| YugabyteDB node-postgres Smart Driver| [Documentation](yugabyte-node-driver/) [Reference](../../reference/drivers/nodejs/yugabyte-pg-reference/) | [8.7.3-yb-1](https://www.npmjs.com/package/pg) | 2.8 and above |
-| PostgreSQL node-postgres Driver| [Documentation](postgres-node-driver/) [Reference](../../reference/drivers/nodejs/postgres-pg-reference/) | [8.7.3](https://www.npmjs.com/package/pg) | 2.6 and above |
+| YugabyteDB node-postgres Smart Driver| [Documentation](yugabyte-node-driver/) [Reference](yugabyte-pg-reference/) | [8.7.3-yb-1](https://www.npmjs.com/package/pg) | 2.8 and above |
+| PostgreSQL node-postgres Driver| [Documentation](postgres-node-driver/) [Reference](postgres-pg-reference/) | [8.7.3](https://www.npmjs.com/package/pg) | 2.6 and above |
| YugabyteDB Node.js Driver for YCQL | [Documentation](ycql/) | [4.0.0](https://github.com/yugabyte/cassandra-nodejs-driver) | |
| Project | Documentation and Guides | Example Apps |
| :------ | :----------------------- | :----------- |
| Sequelize | [Documentation](sequelize/) [Hello World](../orms/nodejs/ysql-sequelize/) | [Sequelize ORM App](https://github.com/YugabyteDB-Samples/orm-examples/tree/master/node/sequelize) |
-| Prisma | [Documentation](prisma/) [Hello World](../orms/nodejs/ysql-prisma/) | [Prisma ORM App](https://github.com/yugabyte/orm-examples/tree/master/node/prisma)
+| Prisma | [Documentation](prisma/) [Hello World](../orms/nodejs/ysql-prisma/) | [Prisma ORM App](https://github.com/yugabyte/orm-examples/tree/master/node/prisma) |
Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations by referring to [Connect an app](yugabyte-node-driver/) or [Use an ORM](sequelize/).
-For reference documentation, including using projects with SSL, refer to the [drivers and ORMs reference](../../reference/drivers/nodejs/yugabyte-pg-reference/) pages.
-
## Prerequisites
To develop Node.js applications for YugabyteDB, you need the following:
-- **Node.js**\
- To download and install Node.js, refer to the [Node.js](https://nodejs.org/en/download/) documentation.\
+- **Node.js**
+
+ To download and install Node.js, refer to the [Node.js](https://nodejs.org/en/download/) documentation.
+
To check the version of node, use the following command:
```sh
node -v
```
-- **Create a node.js project**\
+- **Create a node.js project**
+
Create a file with the `.js` extension (for example `app.js`), which can be run using the following command:
```sh
@@ -52,9 +53,10 @@ To develop Node.js applications for YugabyteDB, you need the following:
```
- **YugabyteDB cluster**
+
- Create a free cluster on YugabyteDB Aeon. Refer to [Use a cloud cluster](../../quick-start-yugabytedb-managed/). Note that YugabyteDB Aeon requires SSL.
- Alternatively, set up a standalone YugabyteDB cluster by following the steps in [Install YugabyteDB](../../quick-start/).
## Next step
-- [Connect an app](yugabyte-node-driver/)
+[Connect an app](yugabyte-node-driver/)
diff --git a/docs/content/preview/drivers-orms/nodejs/postgres-node-driver.md b/docs/content/preview/drivers-orms/nodejs/postgres-node-driver.md
index 8a4062d02987..c3e43bb6d3c0 100644
--- a/docs/content/preview/drivers-orms/nodejs/postgres-node-driver.md
+++ b/docs/content/preview/drivers-orms/nodejs/postgres-node-driver.md
@@ -5,9 +5,9 @@ linkTitle: Connect an app
description: Connect a node.js application using node-postgres Driver
menu:
preview:
- identifier: postgres-node-driver
+ identifier: node-driver-2-postgres
parent: nodejs-drivers
- weight: 600
+ weight: 500
type: docs
---
@@ -117,7 +117,7 @@ const config = {
If you created a cluster on YugabyteDB Aeon, use the cluster credentials and [download the SSL Root certificate](../../../yugabyte-cloud/cloud-connect/connect-applications/).
-Refer to [Configure SSL/TLS](../../../reference/drivers/nodejs/postgres-pg-reference/#configure-ssl-tls) for more information on node-postgresql default and supported SSL modes, and other examples for setting up your connection strings when using SSL.
+Refer to [Configure SSL/TLS](../postgres-pg-reference/#configure-ssl-tls) for more information on node-postgresql default and supported SSL modes, and other examples for setting up your connection strings when using SSL.
### Step 3: Write your application
@@ -275,7 +275,4 @@ If there is no output or you get an error, verify the parameters included in the
## Learn more
-- [PostgreSQL node-postgres driver reference](../../../reference/drivers/nodejs/postgres-pg-reference/)
-- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
-- Build Node.js applications using [Sequelize ORM](../sequelize/)
-- Build Node.js applications using [Prisma ORM](../prisma/)
+[YugabyteDB smart drivers for YSQL](../../smart-drivers/)
diff --git a/docs/content/preview/reference/drivers/nodejs/postgres-pg-reference.md b/docs/content/preview/drivers-orms/nodejs/postgres-pg-reference.md
similarity index 91%
rename from docs/content/preview/reference/drivers/nodejs/postgres-pg-reference.md
rename to docs/content/preview/drivers-orms/nodejs/postgres-pg-reference.md
index 6afc25d6515f..3b2ea4c49645 100644
--- a/docs/content/preview/reference/drivers/nodejs/postgres-pg-reference.md
+++ b/docs/content/preview/drivers-orms/nodejs/postgres-pg-reference.md
@@ -3,13 +3,15 @@ title: PostgreSQL node-postgres Driver
headerTitle: Node.js Drivers
linkTitle: Node.js Drivers
description: PostgreSQL node-postgres Driver for YSQL
-headcontent: Node.js Drivers for YSQL
+badges: ysql
+aliases:
+- /preview/reference/drivers/nodejs/postgres-pg-reference/
menu:
preview:
name: Node.js Drivers
- identifier: ref-postgres-pg-driver
- parent: drivers
- weight: 600
+ identifier: ref-2-postgres-pg-driver
+ parent: nodejs-drivers
+ weight: 100
type: docs
---
@@ -28,11 +30,11 @@ type: docs
-The [PostgreSQL node-postgres driver](https://node-postgres.com/) is the official Node.js driver for PostgreSQL. The YSQL API is fully compatible with the PostgreSQL node-postgres (pg) driver, so you can connect to the YugabyteDB database to execute DMLs and DDLs using the node-postgres APIs. The driver supports the [SCRAM-SHA-256 authentication method](../../../../secure/authentication/password-authentication/#scram-sha-256).
+The [PostgreSQL node-postgres driver](https://node-postgres.com/) is the official Node.js driver for PostgreSQL. The YSQL API is fully compatible with the PostgreSQL node-postgres (pg) driver, so you can connect to the YugabyteDB database to execute DMLs and DDLs using the node-postgres APIs. The driver supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
For details on installing and using node-postgres, see the [node-postgres documentation](https://node-postgres.com/).
-For a tutorial on building a Node.js application with node-postgres, see [Connect an application](../../../../drivers-orms/nodejs/postgres-node-driver/).
+For a tutorial on building a Node.js application with node-postgres, see [Connect an application](../postgres-node-driver/).
## Fundamentals
@@ -93,7 +95,7 @@ client
})
```
-Read more on designing [Database schemas and tables](../../../../explore/ysql-language-features/databases-schemas-tables/).
+Read more on designing [Database schemas and tables](../../../explore/ysql-language-features/databases-schemas-tables/).
### Read and write data
@@ -140,9 +142,9 @@ client
## Configure SSL/TLS
-To build a Node.js application that communicates securely over SSL, get the root certificate (`ca.crt`) of the YugabyteDB Cluster. If certificates are not generated yet, follow the instructions in [Create server certificates](../../../../secure/tls-encryption/server-certificates/).
+To build a Node.js application that communicates securely over SSL, get the root certificate (`ca.crt`) of the YugabyteDB Cluster. If certificates are not generated yet, follow the instructions in [Create server certificates](../../../secure/tls-encryption/server-certificates/).
-Because a YugabyteDB Aeon cluster is always configured with SSL/TLS, you don't have to generate any certificate but only set the client-side SSL configuration. To fetch your root certificate, refer to [Download your cluster certificate](../../../../yugabyte-cloud/cloud-secure-clusters/cloud-authentication/#download-your-cluster-certificate).
+Because a YugabyteDB Aeon cluster is always configured with SSL/TLS, you don't have to generate any certificate but only set the client-side SSL configuration. To fetch your root certificate, refer to [Download your cluster certificate](../../../yugabyte-cloud/cloud-secure-clusters/cloud-authentication/#download-your-cluster-certificate).
The node-postgres driver allows you to avoid including the parameters like `sslcert`, `sslkey`, `sslrootcert`, or `sslmode` in the connection string. You can pass the object which includes `connectionString` and `ssl` object which has various fields including the following:
@@ -239,7 +241,7 @@ client.connect()
## Transaction and isolation levels
-YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access.
+YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access.
Node-postgres driver allows transaction using the queries, executed using `client.query()`.
diff --git a/docs/content/preview/drivers-orms/nodejs/sequelize.md b/docs/content/preview/drivers-orms/nodejs/sequelize.md
index fc9d2404208c..c70094823990 100644
--- a/docs/content/preview/drivers-orms/nodejs/sequelize.md
+++ b/docs/content/preview/drivers-orms/nodejs/sequelize.md
@@ -10,7 +10,7 @@ menu:
preview:
identifier: sequelize-1
parent: nodejs-drivers
- weight: 500
+ weight: 600
type: docs
---
diff --git a/docs/content/preview/drivers-orms/nodejs/ycql.md b/docs/content/preview/drivers-orms/nodejs/ycql.md
index e86c99464d95..82dd441e24eb 100644
--- a/docs/content/preview/drivers-orms/nodejs/ycql.md
+++ b/docs/content/preview/drivers-orms/nodejs/ycql.md
@@ -5,9 +5,9 @@ linkTitle: Connect an app
description: Connect an application using YugabyteDB Node.js driver for YCQL
menu:
preview:
- identifier: ycql-node-driver
+ identifier: node-driver-3-ycql
parent: nodejs-drivers
- weight: 600
+ weight: 500
type: docs
---
diff --git a/docs/content/preview/drivers-orms/nodejs/yugabyte-node-driver.md b/docs/content/preview/drivers-orms/nodejs/yugabyte-node-driver.md
index 31f31ad5138f..6e3735fce3d4 100644
--- a/docs/content/preview/drivers-orms/nodejs/yugabyte-node-driver.md
+++ b/docs/content/preview/drivers-orms/nodejs/yugabyte-node-driver.md
@@ -5,7 +5,7 @@ linkTitle: Connect an app
description: Connect an application using YugabyteDB Node.js smart driver for YSQL
menu:
preview:
- identifier: yugabyte-node-driver
+ identifier: node-driver-1-yugabyte
parent: nodejs-drivers
weight: 500
type: docs
@@ -105,7 +105,7 @@ postgresql://yugabyte:yugabyte@128.0.0.1:5433/yugabyte?loadBalance=true&ssl=true
sslmode=verify-full&sslrootcert=~/.postgresql/root.crt
```
-Refer to [Configure SSL/TLS](../../../reference/drivers/nodejs/postgres-pg-reference/#configure-ssl-tls) for more information on default and supported SSL modes, and examples for setting up your connection strings when using SSL.
+Refer to [Configure SSL/TLS](../postgres-pg-reference/#configure-ssl-tls) for more information on default and supported SSL modes, and examples for setting up your connection strings when using SSL.
#### Use SSL with YugabyteDB Aeon
@@ -220,7 +220,4 @@ If there is no output or you get an error, verify the parameters included in the
## Learn more
-- Refer to [YugabyteDB node-postgres smart driver reference](../../../reference/drivers/nodejs/yugabyte-pg-reference/) and [Try it out](../../../reference/drivers/nodejs/yugabyte-pg-reference/#try-it-out) for detailed smart driver examples.
-- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
-- Build Node.js applications using [Sequelize ORM](../sequelize/)
-- Build Node.js applications using [Prisma ORM](../prisma/)
+[YugabyteDB smart drivers for YSQL](../../smart-drivers/)
diff --git a/docs/content/preview/reference/drivers/nodejs/yugabyte-pg-reference.md b/docs/content/preview/drivers-orms/nodejs/yugabyte-pg-reference.md
similarity index 93%
rename from docs/content/preview/reference/drivers/nodejs/yugabyte-pg-reference.md
rename to docs/content/preview/drivers-orms/nodejs/yugabyte-pg-reference.md
index 964cedc9d3f4..c1a2500ebf64 100644
--- a/docs/content/preview/reference/drivers/nodejs/yugabyte-pg-reference.md
+++ b/docs/content/preview/drivers-orms/nodejs/yugabyte-pg-reference.md
@@ -3,13 +3,15 @@ title: YugabyteDB node-postgres Smart Driver reference
headerTitle: Node.js Drivers
linkTitle: Node.js Drivers
description: YugabyteDB node-postgres smart driver for YSQL
-headcontent: Node.js Drivers for YSQL
+badges: ysql
+aliases:
+- /preview/reference/drivers/nodejs/yugabyte-pg-reference/
menu:
preview:
name: Node.js Drivers
- identifier: ref-yugabyte-pg-driver
- parent: drivers
- weight: 500
+ identifier: ref-1-yugabyte-pg-driver
+ parent: nodejs-drivers
+ weight: 100
type: docs
---
@@ -30,12 +32,12 @@ type: docs
-YugabyteDB node-postgres smart driver is a Node.js driver for [YSQL](../../../../api/ysql/) built on the [PostgreSQL node-postgres driver](https://github.com/brianc/node-postgres), with additional connection load balancing features.
+YugabyteDB node-postgres smart driver is a Node.js driver for [YSQL](../../../api/ysql/) built on the [PostgreSQL node-postgres driver](https://github.com/brianc/node-postgres), with additional connection load balancing features.
For more information on the YugabyteDB node-postgres smart driver, see the following:
-- [YugabyteDB smart drivers for YSQL](../../../../drivers-orms/smart-drivers/)
-- [CRUD operations](../../../../drivers-orms/nodejs/yugabyte-node-driver)
+- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
+- [CRUD operations](../yugabyte-node-driver)
- [GitHub repository](https://github.com/yugabyte/node-postgres)
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
@@ -104,7 +106,7 @@ To use the driver, do the following:
## Try it out
-This tutorial shows how to use the YugabyteDB node-postgres smart driver with YugabyteDB. It starts by creating a three-node cluster with a [replication factor](../../../../architecture/docdb-replication/replication/#replication-factor) of 3. This tutorial uses the [yb-ctl](../../../../admin/yb-ctl/#root) utility.
+This tutorial shows how to use the YugabyteDB node-postgres smart driver with YugabyteDB. It starts by creating a three-node cluster with a [replication factor](../../../architecture/docdb-replication/replication/#replication-factor) of 3. This tutorial uses the [yb-ctl](../../../admin/yb-ctl/#root) utility.
Next, you use a Node.js application to demonstrate the driver's load balancing features.
diff --git a/docs/content/preview/drivers-orms/orms/rust/ysql-diesel.md b/docs/content/preview/drivers-orms/orms/rust/ysql-diesel.md
index 7344a2db6fc0..7e2948ea973d 100644
--- a/docs/content/preview/drivers-orms/orms/rust/ysql-diesel.md
+++ b/docs/content/preview/drivers-orms/orms/rust/ysql-diesel.md
@@ -45,7 +45,7 @@ Build the REST API server (written using Diesel and Rocket) as follows:
$ cargo build --release
```
-If you encounter a build failure, install [libpq](../../../../reference/drivers/ysql-client-drivers/#libpq) and try again.
+If you encounter a build failure, install [libpq](../../ysql-client-drivers/#libpq) and try again.
## Set up the database connection
diff --git a/docs/content/preview/drivers-orms/php/_index.md b/docs/content/preview/drivers-orms/php/_index.md
index dd8d2fcae615..efcfbc96757e 100644
--- a/docs/content/preview/drivers-orms/php/_index.md
+++ b/docs/content/preview/drivers-orms/php/_index.md
@@ -34,3 +34,7 @@ To develop PHP applications for YugabyteDB, you need:
- **a YugabyteDB cluster**
- Create a free cluster on YugabyteDB Aeon. Refer to [Use a cloud cluster](../../quick-start-yugabytedb-managed/). Note that YugabyteDB Aeon requires SSL.
- Alternatively, set up a standalone YugabyteDB cluster by following the steps in [Install YugabyteDB](../../quick-start/).
+
+## Next step
+
+[Connect an app](ysql/)
diff --git a/docs/content/preview/drivers-orms/python/_index.md b/docs/content/preview/drivers-orms/python/_index.md
index 01b26082a315..df417d3d9380 100644
--- a/docs/content/preview/drivers-orms/python/_index.md
+++ b/docs/content/preview/drivers-orms/python/_index.md
@@ -18,8 +18,8 @@ The following projects can be used to implement Python applications using the Yu
| Project | Documentation and Guides | Latest Driver Version | Supported YugabyteDB Version |
| ------- | ------------------------ | ------------------------ | ---------------------|
-| Yugabyte Psycopg2 Smart Driver [Recommended] | [Documentation](yugabyte-psycopg2/) [Reference](../../reference/drivers/python/yugabyte-psycopg2-reference/)| 2.9.3 | 2.8 and above |
-| PostgreSQL Psycopg2 Driver | [Documentation](postgres-psycopg2/) [Reference](../../reference/drivers/python/postgres-psycopg2-reference/) | 2.9.3 | 2.8 and above |
+| Yugabyte Psycopg2 Smart Driver [Recommended] | [Documentation](yugabyte-psycopg2/) [Reference](yugabyte-psycopg2-reference/)| 2.9.3 | 2.8 and above |
+| PostgreSQL Psycopg2 Driver | [Documentation](postgres-psycopg2/) [Reference](postgres-psycopg2-reference/) | 2.9.3 | 2.8 and above |
| aiopg | [Documentation](aiopg/) | 1.4 | 2.8 and above |
| YugabyteDB Python Driver for YCQL | [Documentation](ycql/) | [3.25.0](https://github.com/yugabyte/cassandra-python-driver/tree/master) | |
@@ -30,13 +30,12 @@ The following projects can be used to implement Python applications using the Yu
Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations by referring to [Connect an app](yugabyte-psycopg2/) or [Use an ORM](sqlalchemy/).
-For reference documentation, including using projects with SSL, refer to the [drivers and ORMs reference](../../reference/drivers/python/yugabyte-psycopg2-reference/) pages.
-
## Prerequisites
To develop Python applications for YugabyteDB, you need the following:
- **Python**
+
Ensure your system has Python3 installed. To check the version of Python installed, use the following command:
```sh
@@ -46,9 +45,10 @@ To develop Python applications for YugabyteDB, you need the following:
If not already installed, download and install it from the [Python Downloads](https://www.python.org/downloads/) page.
- **YugabyteDB cluster**
+
- Create a free cluster on YugabyteDB Aeon. Refer to [Use a cloud cluster](../../quick-start-yugabytedb-managed/). Note that YugabyteDB Aeon requires SSL.
- Alternatively, set up a standalone YugabyteDB cluster by following the steps in [Install YugabyteDB](../../quick-start/).
## Next step
-- [Connect an app](yugabyte-psycopg2/)
+[Connect an app](yugabyte-psycopg2/)
diff --git a/docs/content/preview/drivers-orms/python/aiopg.md b/docs/content/preview/drivers-orms/python/aiopg.md
index 925ba99a6d33..e58ba1ec1ee3 100644
--- a/docs/content/preview/drivers-orms/python/aiopg.md
+++ b/docs/content/preview/drivers-orms/python/aiopg.md
@@ -9,7 +9,7 @@ menu:
preview:
identifier: ysql-aiopg
parent: python-drivers
- weight: 571
+ weight: 520
type: docs
---
diff --git a/docs/content/preview/drivers-orms/python/django.md b/docs/content/preview/drivers-orms/python/django.md
index 67a86764c7ee..a27a515bd661 100644
--- a/docs/content/preview/drivers-orms/python/django.md
+++ b/docs/content/preview/drivers-orms/python/django.md
@@ -7,7 +7,7 @@ menu:
preview:
identifier: django-orm
parent: python-drivers
- weight: 700
+ weight: 600
type: docs
---
-Psycopg is the most popular PostgreSQL database adapter for the Python programming language. Its main features are the complete implementation of the Python DB API 2.0 specification and the thread safety (several threads can share the same connection). YugabyteDB has full support for [Psycopg2](https://www.psycopg.org/). psycopg2 is based on libpq and supports the [SCRAM-SHA-256 authentication method](../../../../secure/authentication/password-authentication/#scram-sha-256).
+Psycopg is the most popular PostgreSQL database adapter for the Python programming language. Its main features are the complete implementation of the Python DB API 2.0 specification and the thread safety (several threads can share the same connection). YugabyteDB has full support for [Psycopg2](https://www.psycopg.org/). psycopg2 is based on libpq and supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
For details on using psycopg2, see [Psycopg documentation](https://www.psycopg.org/docs/).
-For a tutorial on building a sample Python application that uses psycopg2, see [Connect an application](../../../../drivers-orms/python/postgres-psycopg2/).
+For a tutorial on building a sample Python application that uses psycopg2, see [Connect an application](../postgres-psycopg2/).
## Fundamentals
diff --git a/docs/content/preview/drivers-orms/python/postgres-psycopg2.md b/docs/content/preview/drivers-orms/python/postgres-psycopg2.md
index 3b8f0fb74d22..6bc4c8d56cb8 100644
--- a/docs/content/preview/drivers-orms/python/postgres-psycopg2.md
+++ b/docs/content/preview/drivers-orms/python/postgres-psycopg2.md
@@ -7,7 +7,7 @@ menu:
preview:
identifier: postgres-psycopg2-driver
parent: python-drivers
- weight: 500
+ weight: 510
type: docs
---
@@ -215,8 +215,4 @@ Currently, [PostgreSQL psycopg2 driver](https://github.com/psycopg/psycopg2) and
## Learn more
-- [PostgreSQL Psycopg2 driver reference](../../../reference/drivers/python/postgres-psycopg2-reference/)
-- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
-- Build Python applications using [YugabyteDB Psycopg2 smart driver](../yugabyte-psycopg2/)
-- Build Python applications using [Django](../django/)
-- Build Python applications using [SQLAlchemy](../sqlalchemy/)
+[YugabyteDB smart drivers for YSQL](../../smart-drivers/)
diff --git a/docs/content/preview/drivers-orms/python/sqlalchemy.md b/docs/content/preview/drivers-orms/python/sqlalchemy.md
index 491c19bed18d..59761232d425 100644
--- a/docs/content/preview/drivers-orms/python/sqlalchemy.md
+++ b/docs/content/preview/drivers-orms/python/sqlalchemy.md
@@ -9,7 +9,7 @@ menu:
preview:
identifier: sqlalchemy-orm
parent: python-drivers
- weight: 600
+ weight: 610
type: docs
---
diff --git a/docs/content/preview/drivers-orms/python/ycql.md b/docs/content/preview/drivers-orms/python/ycql.md
index 3ebf711c94ab..48dae70b8589 100644
--- a/docs/content/preview/drivers-orms/python/ycql.md
+++ b/docs/content/preview/drivers-orms/python/ycql.md
@@ -7,7 +7,7 @@ menu:
preview:
identifier: ycql-python-driver
parent: python-drivers
- weight: 600
+ weight: 530
type: docs
---
diff --git a/docs/content/preview/reference/drivers/python/yugabyte-psycopg2-reference.md b/docs/content/preview/drivers-orms/python/yugabyte-psycopg2-reference.md
similarity index 91%
rename from docs/content/preview/reference/drivers/python/yugabyte-psycopg2-reference.md
rename to docs/content/preview/drivers-orms/python/yugabyte-psycopg2-reference.md
index 8bda8b0e25fe..67698de254f3 100644
--- a/docs/content/preview/reference/drivers/python/yugabyte-psycopg2-reference.md
+++ b/docs/content/preview/drivers-orms/python/yugabyte-psycopg2-reference.md
@@ -3,15 +3,16 @@ title: YugabyteDB Psycopg2 Smart Driver
headerTitle: Python Drivers
linkTitle: Python Drivers
description: YugabyteDB Psycopg2 Smart Driver for YSQL
-headcontent: Python Drivers for YSQL
+badges: ysql
aliases:
- /preview/reference/drivers/python/
+ - /preview/reference/drivers/python/yugabyte-psycopg2-reference/
menu:
preview:
name: Python Drivers
identifier: ref-yugabyte-psycopg2-driver
- parent: drivers
- weight: 650
+ parent: python-drivers
+ weight: 100
type: docs
---
@@ -30,12 +31,12 @@ type: docs
-Yugabyte Psycopg2 smart driver is a Python driver for [YSQL](../../../../api/ysql/) built on the [PostgreSQL psycopg2 driver](https://github.com/psycopg/psycopg2), with additional connection load balancing features.
+Yugabyte Psycopg2 smart driver is a Python driver for [YSQL](../../../api/ysql/) built on the [PostgreSQL psycopg2 driver](https://github.com/psycopg/psycopg2), with additional connection load balancing features.
For more information on the YugabyteDB node-postgres smart driver, see the following:
-- [YugabyteDB smart drivers for YSQL](../../../../drivers-orms/smart-drivers/)
-- [CRUD operations](../../../../drivers-orms/python/yugabyte-psycopg2/)
+- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
+- [CRUD operations](../yugabyte-psycopg2/)
- [GitHub repository](https://github.com/yugabyte/psycopg2)
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
@@ -87,7 +88,7 @@ To enable uniform load balancing across all servers, you set the `load-balance`
conn = psycopg2.connect(user = 'username', password='password', host = 'hostname', port = '5433', dbname = 'database_name', load_balance='True')
```
-You can specify [multiple hosts](../../../../drivers-orms/go/yb-pgx/#use-multiple-addresses) in the connection string in case the primary address fails. After the driver establishes the initial connection, it fetches the list of available servers from the cluster, and load-balances subsequent connection requests across these servers.
+You can specify [multiple hosts](../yugabyte-psycopg2/#use-multiple-addresses) in the connection string in case the primary address fails. After the driver establishes the initial connection, it fetches the list of available servers from the cluster, and load-balances subsequent connection requests across these servers.
To specify topology keys, you set the `topology_keys` property to comma-separated values in the Connection string or dictionary, as per the following examples:
@@ -117,7 +118,7 @@ conn = yb_pool.getconn()
## Try it out
-This tutorial shows how to use the Yugabyte Psycopg2 driver with YugabyteDB. It starts by creating a 3 node cluster with a replication factor of 3. This tutorial uses the [yb-ctl](../../../../admin/yb-ctl/) utility.
+This tutorial shows how to use the Yugabyte Psycopg2 driver with YugabyteDB. It starts by creating a 3 node cluster with a replication factor of 3. This tutorial uses the [yb-ctl](../../../admin/yb-ctl/) utility.
Next, you use a Python shell terminal to demonstrate the driver's load balancing features by running a few python scripts.
diff --git a/docs/content/preview/drivers-orms/python/yugabyte-psycopg2.md b/docs/content/preview/drivers-orms/python/yugabyte-psycopg2.md
index 5e619cd4033c..5a5d78258665 100644
--- a/docs/content/preview/drivers-orms/python/yugabyte-psycopg2.md
+++ b/docs/content/preview/drivers-orms/python/yugabyte-psycopg2.md
@@ -7,7 +7,7 @@ menu:
preview:
identifier: yugabyte-psycopg2-driver
parent: python-drivers
- weight: 400
+ weight: 500
type: docs
---
@@ -272,8 +272,4 @@ Currently, [PostgreSQL psycopg2 driver](https://github.com/psycopg/psycopg2) and
## Learn more
-- Refer to [YugabyteDB Psycopg2 driver reference](../../../reference/drivers/python/yugabyte-psycopg2-reference/) and [Try it out](../../../reference/drivers/python/yugabyte-psycopg2-reference/#try-it-out) for detailed smart driver examples.
-- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
-- Build Python applications using [PostgreSQL Psycopg2 smart driver](../postgres-psycopg2/)
-- Build Python applications using [Django](../django/)
-- Build Python applications using [SQLAlchemy](../sqlalchemy/)
+[YugabyteDB smart drivers for YSQL](../../smart-drivers/)
diff --git a/docs/content/preview/drivers-orms/ruby/_index.md b/docs/content/preview/drivers-orms/ruby/_index.md
index a18aeba23472..b0facf883f5d 100644
--- a/docs/content/preview/drivers-orms/ruby/_index.md
+++ b/docs/content/preview/drivers-orms/ruby/_index.md
@@ -41,4 +41,4 @@ To develop Ruby applications for YugabyteDB, you need the following:
## Next step
-- [Connect an app](ysql-pg)
+[Connect an app](ysql-pg)
diff --git a/docs/content/preview/drivers-orms/rust/_index.md b/docs/content/preview/drivers-orms/rust/_index.md
index 17710697f534..3cd864b8805e 100644
--- a/docs/content/preview/drivers-orms/rust/_index.md
+++ b/docs/content/preview/drivers-orms/rust/_index.md
@@ -19,7 +19,7 @@ The following project is recommended for implementing Rust applications using th
| Project | Documentation and Guides | Latest Driver Version | Supported YugabyteDB Version | Example Apps |
| ------- | ------------------------ | --------------------- | ---------------------------- | ------------ |
-| YugabyteDB Rust-Postgres Smart Driver [Recommended] | [Documentation](yb-rust-postgres/) [Reference](../../reference/drivers/rust/rust-postgres-reference/) | [yb-postgres](https://crates.io/crates/yb-postgres) (synchronous YSQL client): v0.19.7-yb-1-beta [yb-tokio-postgres](https://crates.io/crates/yb-tokio-postgres) (asynchronous YSQL client): v0.7.10-yb-1-beta | 2.19 and later
+| YugabyteDB Rust-Postgres Smart Driver [Recommended] | [Documentation](yb-rust-postgres/) [Reference](rust-postgres-reference/) | [yb-postgres](https://crates.io/crates/yb-postgres) (synchronous YSQL client): v0.19.7-yb-1-beta [yb-tokio-postgres](https://crates.io/crates/yb-tokio-postgres) (asynchronous YSQL client): v0.7.10-yb-1-beta | 2.19 and later | |
| Diesel | [Documentation](diesel/) [Hello World](../orms/rust/ysql-diesel/) | | |[Diesel app](https://github.com/YugabyteDB-Samples/orm-examples/tree/master/rust/diesel) |
Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations using the **Hello World** examples.
@@ -30,15 +30,18 @@ For fully-runnable code snippets and explanations of common operations, see the
To develop Rust applications for YugabyteDB, you need the following:
-- **Rust**\
- To download and install Rust, refer to the [Rust](https://doc.rust-lang.org/cargo/getting-started/installation.html) documentation.\
+- **Rust**
+
+ To download and install Rust, refer to the [Rust](https://doc.rust-lang.org/cargo/getting-started/installation.html) documentation.
+
To check the version of Rust, use the following command:
```sh
$ rustc --version
```
-- **Create a Rust project**\
+- **Create a Rust project**
+
To create a new Rust project, run the following command:
```sh
@@ -48,9 +51,10 @@ To develop Rust applications for YugabyteDB, you need the following:
This creates the project as `HelloWorld-rust` which consists of a `Cargo.toml` file (project metadata) and a `src` directory containing the main code file, `main.rs`.
- **YugabyteDB cluster**
+
- Create a free cluster on YugabyteDB Aeon. Refer to [Use a cloud cluster](../../quick-start-yugabytedb-managed/). Note that YugabyteDB Aeon requires SSL.
- Alternatively, set up a standalone YugabyteDB cluster by following the steps in [Install YugabyteDB](../../quick-start/).
## Next step
-- [Connect an app](yb-rust-postgres/)
+[Connect an app](yb-rust-postgres/)
diff --git a/docs/content/preview/reference/drivers/rust/rust-postgres-reference.md b/docs/content/preview/drivers-orms/rust/rust-postgres-reference.md
similarity index 87%
rename from docs/content/preview/reference/drivers/rust/rust-postgres-reference.md
rename to docs/content/preview/drivers-orms/rust/rust-postgres-reference.md
index 067018355bee..0af175540a58 100644
--- a/docs/content/preview/reference/drivers/rust/rust-postgres-reference.md
+++ b/docs/content/preview/drivers-orms/rust/rust-postgres-reference.md
@@ -3,17 +3,19 @@ title: YugabyteDB Rust Smart Driver
headerTitle: Rust Drivers
linkTitle: Rust Drivers
description: Rust postgres Smart Driver for YSQL
-headcontent: Rust Smart Driver for YSQL
+badges: ysql
+aliases:
+- /preview/reference/drivers/rust/rust-postgres-reference/
menu:
preview:
name: Rust Drivers
identifier: ref-rust-postgres-driver
- parent: drivers
- weight: 800
+ parent: rust-drivers
+ weight: 100
type: docs
---
-YugabyteDB Rust smart driver is a Rust driver for [YSQL](../../../../api/ysql/) based on [rust-postgres](https://github.com/sfackler/rust-postgres), with additional connection load balancing features.
+YugabyteDB Rust smart driver is a Rust driver for [YSQL](../../../api/ysql/) based on [rust-postgres](https://github.com/sfackler/rust-postgres), with additional connection load balancing features.
Rust smart drivers offers two different clients similar to rust-postgres:
@@ -22,8 +24,8 @@ Rust smart drivers offers two different clients similar to rust-postgres:
For more information on the YugabyteDB Rust smart driver, see the following:
-- [YugabyteDB smart drivers for YSQL](../../../../drivers-orms/smart-drivers/)
-- [CRUD operations](../../../../drivers-orms/rust/yb-rust-postgres/#crud-operations)
+- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
+- [CRUD operations](../yb-rust-postgres/#crud-operations)
- [GitHub repository](https://github.com/yugabyte/rust-postgres)
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
@@ -57,8 +59,8 @@ Learn how to perform common tasks required for Rust application development usin
The following connection properties need to be added to enable load balancing:
-- `load_balance` - enable [cluster-aware load balancing](../../../../drivers-orms/smart-drivers/#cluster-aware-connection-load-balancing) by setting this property to true; disabled by default.
-- `topology_keys` - provide comma-separated geo-location values to enable [topology-aware load balancing](../../../../drivers-orms/smart-drivers/#topology-aware-connection-load-balancing). Geo-locations can be provided as `cloud.region.zone`. Specify all zones in a region as `cloud.region.*`. To designate fallback locations for when the primary location is unreachable, specify a priority in the form `:n`, where `n` is the order of precedence. For example, `cloud1.datacenter1.rack1:1,cloud1.datacenter1.rack2:2`.
+- `load_balance` - enable [cluster-aware load balancing](../../smart-drivers/#cluster-aware-connection-load-balancing) by setting this property to true; disabled by default.
+- `topology_keys` - provide comma-separated geo-location values to enable [topology-aware load balancing](../../smart-drivers/#topology-aware-connection-load-balancing). Geo-locations can be provided as `cloud.region.zone`. Specify all zones in a region as `cloud.region.*`. To designate fallback locations for when the primary location is unreachable, specify a priority in the form `:n`, where `n` is the order of precedence. For example, `cloud1.datacenter1.rack1:1,cloud1.datacenter1.rack2:2`.
By default, the driver refreshes the list of nodes every 300 seconds (5 minutes). You can change this value by including the `yb_servers_refresh_interval` parameter.
@@ -79,7 +81,7 @@ let url: String = String::from( "postgresql://localhost:5434/yugabyte?user=yugab
let conn = yb_postgres::Client::connect(&connection_url,NoTls,)?;
```
-You can specify [multiple hosts](../../../../drivers-orms/rust/yb-rust-postgres/#use-multiple-addresses) in the connection string to use as fallbacks in case the primary address fails during the initial connection attempt. After the driver establishes the initial connection, it fetches the list of available servers from the cluster, and load-balances subsequent connection requests across those servers.
+You can specify [multiple hosts](../yb-rust-postgres/#use-multiple-addresses) in the connection string to use as fallbacks in case the primary address fails during the initial connection attempt. After the driver establishes the initial connection, it fetches the list of available servers from the cluster, and load-balances subsequent connection requests across those servers.
To specify topology keys, you set the `topology_keys` property to comma-separated values in the connection string or dictionary, as per the following example:
@@ -90,11 +92,11 @@ let conn = yb_postgres::Client::connect(&connection_url,NoTls,)?;
## Try it out
-This tutorial shows how to use the asynchronous yb-tokio-postgres client with YugabyteDB. It starts by creating a three-node cluster with a [replication factor](../../../../architecture/docdb-replication/replication/#replication-factor) of 3. This tutorial uses the [yugabyted](../../../configuration/yugabyted/) utility.
+This tutorial shows how to use the asynchronous yb-tokio-postgres client with YugabyteDB. It starts by creating a three-node cluster with a [replication factor](../../../architecture/docdb-replication/replication/#replication-factor) of 3. This tutorial uses the [yugabyted](../../../reference/configuration/yugabyted/) utility.
Next, you use a Rust application to demonstrate the driver's load balancing features.
-For an example using the synchronous yb-postgres client, see [Connect an application](../../../../drivers-orms/rust/yb-rust-postgres).
+For an example using the synchronous yb-postgres client, see [Connect an application](../yb-rust-postgres).
### Create a local cluster
@@ -353,7 +355,7 @@ The following is an example connection URL for connecting to a YugabyteDB cluste
"postgresql://127.0.0.1:5434/yugabyte?user=yugabyte&password=yugabyte&load_balance=true&sslmode=require"
```
-If you created a cluster on [YugabyteDB Aeon](../../../../yugabyte-cloud/), use the cluster credentials and download the [SSL Root certificate](../../../../yugabyte-cloud/cloud-secure-clusters/cloud-authentication/#download-your-cluster-certificate).
+If you created a cluster on [YugabyteDB Aeon](../../../yugabyte-cloud/), use the cluster credentials and download the [SSL Root certificate](../../../yugabyte-cloud/cloud-secure-clusters/cloud-authentication/#download-your-cluster-certificate).
The following is an example application for connecting to a YugabyteDB cluster with SSL enabled:
diff --git a/docs/content/preview/drivers-orms/rust/yb-rust-postgres.md b/docs/content/preview/drivers-orms/rust/yb-rust-postgres.md
index 75fda244d021..1916610ed7eb 100644
--- a/docs/content/preview/drivers-orms/rust/yb-rust-postgres.md
+++ b/docs/content/preview/drivers-orms/rust/yb-rust-postgres.md
@@ -8,7 +8,7 @@ menu:
preview:
identifier: rust-postgres-driver
parent: rust-drivers
- weight: 600
+ weight: 500
type: docs
---
diff --git a/docs/content/preview/reference/drivers/ycql-client-drivers.md b/docs/content/preview/drivers-orms/ycql-client-drivers.md
similarity index 86%
rename from docs/content/preview/reference/drivers/ycql-client-drivers.md
rename to docs/content/preview/drivers-orms/ycql-client-drivers.md
index c30dbc43935f..d177a8eaee9a 100644
--- a/docs/content/preview/reference/drivers/ycql-client-drivers.md
+++ b/docs/content/preview/drivers-orms/ycql-client-drivers.md
@@ -1,18 +1,25 @@
---
title: Client drivers for YCQL API
headerTitle: Client drivers for YCQL
-linkTitle: Client drivers for YCQL
+linkTitle: Additional drivers
description: Lists the client drivers that you can use to build and access YCQL applications.
+badges: ycql
+aliases:
+ - /preview/reference/drivers/ycql-client-drivers/
menu:
preview:
identifier: ycql-client-libraries
- parent: drivers
- weight: 2942
-aliases:
+ parent: drivers-orms
+ weight: 2001
type: docs
---
-The following client drivers are supported for use with the [YugabyteDB Cloud Query Language (YCQL) API](../../../api/ycql/), a SQL-based, semi-relational API, with roots in the Apache Cassandra Query Language (CQL).
+{{}}
+{{}}
+{{}}
+{{}}
+
+The following client drivers are supported for use with the [YugabyteDB Cloud Query Language (YCQL) API](../../api/ycql/), a SQL-based, semi-relational API, with roots in the Apache Cassandra Query Language (CQL).
For tutorials on building a sample application with the following client drivers, click the relevant link included below for each driver.
@@ -28,7 +35,7 @@ The [YugabyteDB C++ Driver for YCQL](https://github.com/yugabyte/cassandra-cpp-d
For details, see the [README](https://github.com/yugabyte/cassandra-cpp-driver) in our GitHub repository.
-For a tutorial on building a sample C++ application with this driver, see [Build a C++ application](../../../drivers-orms/cpp/ycql/).
+For a tutorial on building a sample C++ application with this driver, see [Build a C++ application](../cpp/ycql/).
## C\#
@@ -38,7 +45,7 @@ The [YugabyteDB C# Driver for YCQL](https://github.com/yugabyte/cassandra-csharp
For details, see the [README](https://github.com/yugabyte/cassandra-csharp-driver) in our GitHub repository.
-For a tutorial on building a sample C# application with this driver, see [Connect an application](../../../drivers-orms/csharp/ycql/).
+For a tutorial on building a sample C# application with this driver, see [Connect an application](../csharp/ycql/).
## Go
@@ -48,7 +55,7 @@ The [YugabyteDB Go Driver for YCQL](https://github.com/yugabyte/gocql) is based
For details, see the [README](https://github.com/yugabyte/gocql/blob/master/README.md) in our GitHub repository.
-For a tutorial on building a sample Go application with this driver, see [Connect an application](../../../drivers-orms/go/ycql/).
+For a tutorial on building a sample Go application with this driver, see [Connect an application](../go/ycql/).
## Java
@@ -58,7 +65,7 @@ The [YugabyteDB Java Driver for YCQL](https://github.com/yugabyte/cassandra-java
For details, see the [v3.10 README](https://github.com/yugabyte/cassandra-java-driver/blob/3.10.0-yb-x/README.md) in our GitHub repository.
-For a tutorial on building a sample Java application with this driver, see [Connect an application](../../../drivers-orms/java/ycql/).
+For a tutorial on building a sample Java application with this driver, see [Connect an application](../java/ycql/).
To build Java applications with this driver, you must add the following Maven dependency to your application:
@@ -78,7 +85,7 @@ The [YugabyteDB Java Driver for YCQL](https://github.com/yugabyte/cassandra-java
For details, see the [v4.15 README](https://github.com/yugabyte/cassandra-java-driver/blob/4.15.x/README.md) in our GitHub repository.
-For a tutorial on building a sample Java application with this driver, see [Connect an application](../../../drivers-orms/java/ycql-4.x/).
+For a tutorial on building a sample Java application with this driver, see [Connect an application](../java/ycql-4.x/).
To build Java applications with this driver, you must add the following Maven dependency to your application:
@@ -100,7 +107,7 @@ The [YugabyteDB Node.js driver for YCQL](https://github.com/yugabyte/cassandra-n
For details, see the [README](https://github.com/datastax/cpp-driver/blob/master/README.md) in our GitHub repository.
-For a tutorial on building a sample Node.js application with this driver, see [Connect an application](../../../drivers-orms/nodejs/ycql/).
+For a tutorial on building a sample Node.js application with this driver, see [Connect an application](../nodejs/ycql/).
## Python
@@ -110,7 +117,7 @@ The [YugabyteDB Python Driver for YCQL](https://github.com/yugabyte/cassandra-py
For details, see the [README](https://github.com/yugabyte/cassandra-python-driver) in our GitHub repository.
-For a tutorial on building a sample Python application with this driver, see [Connect an application](../../../drivers-orms/python/ycql/).
+For a tutorial on building a sample Python application with this driver, see [Connect an application](../python/ycql/).
## Ruby
@@ -120,7 +127,7 @@ The [YugabyteDB Ruby Driver for YCQL](https://github.com/yugabyte/cassandra-ruby
For details, see the [README](https://github.com/yugabyte/cassandra-ruby-driver/blob/v3.2.3.x-yb/README.md) in our GitHub repository.
-For a tutorial on building a sample Ruby application with this driver, see [Connect an application](../../../drivers-orms/ruby/ycql/).
+For a tutorial on building a sample Ruby application with this driver, see [Connect an application](../ruby/ycql/).
## Scala
@@ -136,4 +143,4 @@ To build a Scala application with the YugabyteDB Java Driver for YCQL, you must
libraryDependencies += "com.yugabyte" % "cassandra-driver-core" % "3.8.0-yb-5"
```
-For a tutorial on building a sample Scala application with this driver, see [Connect an application](../../../drivers-orms/scala/ycql/).
+For a tutorial on building a sample Scala application with this driver, see [Connect an application](../scala/ycql/).
diff --git a/docs/content/preview/reference/drivers/ysql-client-drivers.md b/docs/content/preview/drivers-orms/ysql-client-drivers.md
similarity index 78%
rename from docs/content/preview/reference/drivers/ysql-client-drivers.md
rename to docs/content/preview/drivers-orms/ysql-client-drivers.md
index e160799d1a75..8db2ce85a352 100644
--- a/docs/content/preview/reference/drivers/ysql-client-drivers.md
+++ b/docs/content/preview/drivers-orms/ysql-client-drivers.md
@@ -1,23 +1,31 @@
---
title: Client drivers for YSQL
headerTitle: Additional client drivers for YSQL
-linkTitle: Client drivers for YSQL
+linkTitle: Additional drivers
description: Lists the client drivers that you can use to connect to and interact with the YSQL API.
+badges: ysql
+aliases:
+ - /preview/reference/drivers/ysql-client-drivers/
menu:
preview:
identifier: ysql-client-libraries
- parent: drivers
- weight: 2940
+ parent: drivers-orms
+ weight: 2000
type: docs
rightNav:
hideH4: true
---
-The [Yugabyte Structured Query Language (YSQL) API](../../../api/ysql/) builds upon and extends a fork of the query layer from PostgreSQL 11.2, with the intent of supporting most PostgreSQL functionality and adding new functionality to supported distributed SQL databases.
+{{}}
+{{}}
+{{}}
+{{}}
-For details on PostgreSQL feature support in YSQL, refer to [SQL feature support](../../../explore/ysql-language-features/sql-feature-support/).
+The [Yugabyte Structured Query Language (YSQL) API](../../api/ysql/) builds upon and extends a fork of the query layer from PostgreSQL 11.2, with the intent of supporting most PostgreSQL functionality and adding new functionality to supported distributed SQL databases.
-Client drivers listed below are supported for developing applications that connect to and interact with the YSQL API. Most of the drivers use [libpq](#libpq) and support the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
+For details on PostgreSQL feature support in YSQL, refer to [SQL feature support](../../explore/ysql-language-features/sql-feature-support/).
+
+Client drivers listed below are supported for developing applications that connect to and interact with the YSQL API. Most of the drivers use [libpq](#libpq) and support the [SCRAM-SHA-256 authentication method](../../secure/authentication/password-authentication/#scram-sha-256).
For help using these drivers with YSQL, ask your questions in the [Slack community]({{}}).
@@ -27,11 +35,11 @@ If you encounter an issue or have an enhancement request, [file a GitHub issue](
### libpq
-[libpq](https://www.postgresql.org/docs/11/libpq.html) is the C client library for connecting to and interacting with PostgreSQL databases. libpq is also the underlying engine used in other PostgreSQL application interfaces. The libpq client library supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
+[libpq](https://www.postgresql.org/docs/11/libpq.html) is the C client library for connecting to and interacting with PostgreSQL databases. libpq is also the underlying engine used in other PostgreSQL application interfaces. The libpq client library supports the [SCRAM-SHA-256 authentication method](../../secure/authentication/password-authentication/#scram-sha-256).
For details and documentation, refer to [libpq - C Library](https://www.postgresql.org/docs/11/libpq.html) for PostgreSQL 11 (on which YugabyteDB is based).
-For a tutorial on building a sample C application with libpq, refer to [Connect an application](../../../drivers-orms/c/ysql/).
+For a tutorial on building a sample C application with libpq, refer to [Connect an application](../c/ysql/).
#### Install the libpq client library
@@ -47,11 +55,11 @@ Homebrew users on macOS can install libpq using `brew install libpq`. You can do
### libpqxx
-The [libpqxx](http://pqxx.org/development/libpqxx/) driver is the official C++ client API for PostgreSQL. libpqxx is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
+The [libpqxx](http://pqxx.org/development/libpqxx/) driver is the official C++ client API for PostgreSQL. libpqxx is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../secure/authentication/password-authentication/#scram-sha-256).
For details and documentation, refer to the [libpqxx README](https://github.com/jtv/libpqxx#readme) and [libpqxx documentation](https://libpqxx.readthedocs.io/en/latest/).
-For a tutorial on building a sample C++ application with libpqxx, refer to [Connect an application](../../../drivers-orms/cpp/ysql/).
+For a tutorial on building a sample C++ application with libpqxx, refer to [Connect an application](../cpp/ysql/).
#### Install the libpqxx driver
@@ -82,7 +90,7 @@ $ make install
[Vert.x PG Client](https://vertx.io/docs/vertx-pg-client/java/) is the client for PostgreSQL with basic APIs to communicate with the database. It is a reactive and non-blocking client for handling the database connections with a single threaded API.
-For a tutorial on building a sample Java application with the Vert.x PG Client, see [Connect an application](../../../drivers-orms/java/ysql-vertx-pg-client/).
+For a tutorial on building a sample Java application with the Vert.x PG Client, see [Connect an application](../java/ysql-vertx-pg-client/).
To get the latest versions for projects using [Apache Maven](https://maven.apache.org), see [Maven Central Repository of Vert.x PG Client](https://mvnrepository.com/artifact/io.vertx/vertx-pg-client).
@@ -90,11 +98,11 @@ To get the latest versions for projects using [Apache Maven](https://maven.apach
### php-pgsql
-The [php-pgsql](https://www.php.net/manual/en/book.pgsql.php) driver is a collection of the official PostgreSQL module for PHP. php-pgsql is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
+The [php-pgsql](https://www.php.net/manual/en/book.pgsql.php) driver is a collection of the official PostgreSQL module for PHP. php-pgsql is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../secure/authentication/password-authentication/#scram-sha-256).
For details on installing and using php-pgsql, see the [php-pgsql documentation](https://www.php.net/manual/en/book.pgsql.php).
-For a tutorial on building a sample PHP application with php-pgsql, see [Connect an application](../../../drivers-orms/php/ysql/).
+For a tutorial on building a sample PHP application with php-pgsql, see [Connect an application](../php/ysql/).
#### Install the php-pgsql driver
@@ -112,7 +120,7 @@ CentOS users can install the driver using the `sudo yum install php-pgsql` comma
[aiopg](https://aiopg.readthedocs.io/en/stable/) is a library for accessing a PostgreSQL database using the asyncio (PEP-3156/tulip) framework. It wraps asynchronous features of the [Psycopg](https://www.psycopg.org/) database driver. For details on using aiopg, see [aiopg documentation](https://aiopg.readthedocs.io/en/stable/).
-For a tutorial on building a sample Python application that uses aiopg, see [YSQL Aiopg](../../../drivers-orms/python/aiopg/).
+For a tutorial on building a sample Python application that uses aiopg, see [YSQL Aiopg](../python/aiopg/).
#### Install
@@ -126,9 +134,9 @@ pip3 install aiopg
### pg
-[pg](https://github.com/ged/ruby-pg) is the Ruby interface for PostgreSQL databases. pg is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
+[pg](https://github.com/ged/ruby-pg) is the Ruby interface for PostgreSQL databases. pg is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../secure/authentication/password-authentication/#scram-sha-256).
-For a tutorial on building a sample Ruby application with pg, see [Connect an application](../../../drivers-orms/ruby/ysql-pg/).
+For a tutorial on building a sample Ruby application with pg, see [Connect an application](../ruby/ysql-pg/).
#### Install the pg driver
@@ -150,9 +158,9 @@ Replace `` with the path to the libpq installation; for example,
### Rust-Postgres
-[Rust-Postgres](https://github.com/sfackler/rust-postgres) is the Rust interface for PostgreSQL databases. Rust-Postgres is not based on libpq, but supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
+[Rust-Postgres](https://github.com/sfackler/rust-postgres) is the Rust interface for PostgreSQL databases. Rust-Postgres is not based on libpq, but supports the [SCRAM-SHA-256 authentication method](../../secure/authentication/password-authentication/#scram-sha-256).
-For a tutorial on building a sample Ruby application with Rust-Postgres, see [Build a Rust application](../../../tutorials/build-apps/rust/cloud-ysql-rust/).
+For a tutorial on building a sample Ruby application with Rust-Postgres, see [Build a Rust application](../../tutorials/build-apps/rust/cloud-ysql-rust/).
#### Install the Rust-Postgres driver
diff --git a/docs/content/preview/explore/change-data-capture/using-logical-replication/yugabytedb-connector.md b/docs/content/preview/explore/change-data-capture/using-logical-replication/yugabytedb-connector.md
index c85927acd86e..33bb7f5aa654 100644
--- a/docs/content/preview/explore/change-data-capture/using-logical-replication/yugabytedb-connector.md
+++ b/docs/content/preview/explore/change-data-capture/using-logical-replication/yugabytedb-connector.md
@@ -1364,7 +1364,7 @@ Procedure
### Supported YugabyteDB topologies
-As mentioned in the beginning, YugabyteDB (for all versions > 2024.1.1) supports logical replication slots. The YugabyteDB connector can communicate with the server by connecting to any node using the [YugabyteDB Java driver](../../../../reference/drivers/java/yugabyte-jdbc-reference). Should any node fail, the connector receives an error and restarts. Upon restart, the connector connects to any available node and continues streaming from that node.
+As mentioned in the beginning, YugabyteDB (for all versions > 2024.1.1) supports logical replication slots. The YugabyteDB connector can communicate with the server by connecting to any node using the [YugabyteDB Java driver](../../../../drivers-orms/java/yugabyte-jdbc-reference/). Should any node fail, the connector receives an error and restarts. Upon restart, the connector connects to any available node and continues streaming from that node.
### Setting up multiple connectors for same database server
diff --git a/docs/content/preview/explore/observability/active-session-history.md b/docs/content/preview/explore/observability/active-session-history.md
index af8bccd2d8e8..8c49a28ee568 100644
--- a/docs/content/preview/explore/observability/active-session-history.md
+++ b/docs/content/preview/explore/observability/active-session-history.md
@@ -91,47 +91,64 @@ List of wait events by the wait event components.
These are the wait events introduced by YugabyteDB, however some of the following [wait events](https://www.postgresql.org/docs/current/monitoring-stats.html) inherited from PostgreSQL might also show up in the [yb_active_session_history](#yb-active-session-history) view.
-| Class | Wait Event | Wait Event Type | Wait Event Aux | Description |
+| Wait Event Class | Wait Event | Wait Event Type | Wait Event Aux | Description |
| :--------------- |:---------- | :-------------- |:--- | :---------- |
-| TServer Wait | StorageRead | Network | | Waiting for a DocDB read operation |
-| TServer Wait | CatalogRead | Network | | Waiting for a catalog read operation |
-| TServer Wait | IndexRead | Network | | Waiting for a secondary index read operation |
-| TServer Wait | StorageFlush | Network | | Waiting for a storage flush request |
+| TServerWait | StorageRead | Network | | A YSQL backend is waiting for a table read from DocDB. |
+| TServerWait | CatalogRead | Network | | A YSQL backend is waiting for a catalog read from master. |
+| TServerWait | IndexRead | Network | | A YSQL backend is waiting for a secondary index read from DocDB. |
+| TServerWait | StorageFlush | Network | | A YSQL backend is waiting for a table/index read/write from DocDB. |
| YSQLQuery | QueryProcessing| CPU | | Doing CPU work |
-| YSQLQuery | yb_ash_metadata | LWLock | | Waiting to update ASH metadata for a query |
-| Timeout | YBTxnConflictBackoff | Timeout | | Waiting due to conflict in DocDB |
+| YSQLQuery | yb_ash_metadata | LWLock | | A YSQL backend is waiting to update ASH metadata for a query. |
+| Timeout | YBTxnConflictBackoff | Timeout | | A YSQL backend is waiting due to conflict in DocDB. |
### YB-TServer
-| Class | Wait Event | Wait Event Type | Wait Event Aux | Description |
+| Wait Event Class | Wait Event | Wait Event Type | Wait Event Aux | Description |
|:---------------- | :--------- |:--------------- | :--- | :---------- |
-| Common | OnCpu_Passive | CPU | | Waiting for a thread to pick it up |
-| Common | OnCpu_Active | CPU | | RPC is being actively processed on a thread |
-| Common | ResponseQueued | Network | | Waiting for response to be transferred |
-| Tablet | AcquiringLocks | Lock | \| Taking row-wise locks. May need to wait for other rpcs to release the lock. |
-| Tablet | MVCC_WaitForSafeTime | Lock | \| Waiting for the SafeTime to be at least the desired read-time. |
-| Tablet | BackfillIndex_WaitForAFreeSlot | Lock | \ | Waiting for a slot to open if there are too many backfill requests at the same time. |
-| Tablet | CreatingNewTablet | I/O | \| Creating a new tablet may involve writing metadata files, causing I/O wait. |
-| Tablet | WaitOnConflictingTxn | Lock | \| Waiting for the conflicting transactions to complete. |
-| Consensus | WAL_Append | I/O | \| Persisting Wal edits |
-| Consensus | WAL_Sync | I/O | \| Persisting Wal edits |
-| Consensus | Raft_WaitingForReplication | Network | \| Waiting for Raft replication |
-| Consensus | Raft_ApplyingEdits | Lock/CPU | \| Applying the edits locally |
-| RocksDB | BlockCacheReadFromDisk | I/O | \| Populating block cache from disk |
-| RocksDB | Flush | I/O | \ | Doing RocksDB flush |
-| RocksDB | Compaction | I/O | \| Doing RocksDB compaction |
-| RocksDB | RateLimiter | I/O | | Slow down due to rate limiter throttling access to disk |
+| Common | OnCpu_Passive | CPU | | An RPC or task is waiting for a thread to pick it up. |
+| Common | OnCpu_Active | CPU | | An RPC or task is being actively processed on a thread. |
+| Common | Idle | WaitOnCondition | | The Raft log appender/sync thread is idle. |
+| Common | Rpc_Done | WaitOnCondition | | An RPC is done and waiting for the reactor to send the response to a YSQL/YCQL backend. |
+| Common | RetryableRequests_SaveToDisk | DiskIO | | The in-memory state of the retryable requests is being saved to the disk. |
+| TabletWait | MVCC_WaitForSafeTime | WaitOnCondition | | A read/write RPC is waiting for the safe time to be at least the desired read-time. |
+| TabletWait | LockedBatchEntry_Lock | WaitOnCondition | | A read/write RPC is waiting for a DocDB row-level lock. |
+| TabletWait | BackfillIndex_WaitForAFreeSlot | WaitOnCondition | | A backfill index RPC is waiting for a slot to open if there are too many backfill requests at the same time. |
+| TabletWait | CreatingNewTablet | DiskIO | | The CreateTablet RPC is creating a new tablet, this may involve writing metadata files, causing I/O wait. |
+| TabletWait | SaveRaftGroupMetadataToDisk | DiskIO | | The Raft/tablet metadata is being written to disk, generally during snapshot or restore operations. |
+| TabletWait | TransactionStatusCache_DoGetCommitData | Network | | An RPC needs to look up the commit status of a particular transaction. |
+| TabletWait | WaitForYSQLBackendsCatalogVersion | WaitOnCondition | | CREATE INDEX is waiting for YSQL backends to have up-to-date pg_catalog. |
+| TabletWait | WriteSysCatalogSnapshotToDisk | DiskIO | | Writing initial system catalog snapshot during initdb.|
+| TabletWait | DumpRunningRpc_WaitOnReactor | WaitOnCondition | | DumpRunningRpcs is waiting on reactor threads. |
+| TabletWait | ConflictResolution_ResolveConficts | Network | | A read/write RPC is waiting to identify conflicting transactions. |
+| TabletWait | ConflictResolution_WaitOnConflictingTxns | WaitOnCondition | | A read/write RPC is waiting for conflicting transactions to complete. |
+| Consensus | WAL_Append | DiskIO | \| A write RPC is persisting WAL edits. |
+| Consensus | WAL_Sync | DiskIO | \| A write RPC is synchronizing WAL edits. |
+| Consensus | Raft_WaitingForReplication | Network | \| A write RPC is waiting for Raft replication. |
+| Consensus | Raft_ApplyingEdits | Lock/CPU | \| A write RPC is applying Raft edits locally. |
+| Consensus | ConsensusMeta_Flush | DiskIO | | ConsensusMetadata is flushed, for example, during Raft term, configuration change, remote bootstrap, and so on. |
+| Consensus | ReplicaState_TakeUpdateLock | WaitOnCondition | | A write/alter RPC needs to wait for the ReplicaState lock to replicate a batch of writes through Raft. |
+| RocksDB | RocksDB_ReadBlockFromFile | DiskIO | | RocksDB is reading a block from a file. |
+| RocksDB | RocksDB_OpenFile | DiskIO | | RocksDB is opening a file. |
+| RocksDB | RocksDB_WriteToFile | DiskIO | | RocksDB is writing to a file. |
+| RocksDB | RocksDB_Flush | CPU | | RocksDB is doing a flush. |
+| RocksDB | RocksDB_Compaction | CPU | | RocksDB is doing a compaction. |
+| RocksDB | RocksDB_PriorityThreadPoolTaskPaused | WaitOnCondition | | RocksDB pauses a flush or compaction task for another flush or compaction task with a higher priority. |
+| RocksDB | RocksDB_CloseFile | DiskIO | | RocksDB is closing a file. |
+| RocksDB | RocksDB_RateLimiter | WaitOnCondition | | RocksDB flush/compaction is slowing down due to rate limiter throttling access to disk. |
+| RocksDB | RocksDB_WaitForSubcompaction | WaitOnCondition | | RocksDB is waiting for a compaction to complete. |
+| RocksDB | RocksDB_NewIterator | DiskIO | | RocksDB is waiting for a new iterator to be created. |
### YCQL
-| Class | Wait Event | Wait Event Type | Wait Event Aux | Description |
+| Wait Event Class | Wait Event | Wait Event Type | Wait Event Aux | Description |
| :--------------- |:---------- | :-------------- |:--- | :---------- |
-| YCQLQuery | YCQL_Parse | CPU | | CQL call is being actively processed |
-| YCQLQuery | YCQL_Read | Network | \
| Waiting for DocDB read operation |
-| YCQLQuery | YCQL_Write | Network | \ | Waiting for DocDB write operation |
-| YBClient | LookingUpTablet | Network | | Looking up tablet information |
-| YBClient | YBCSyncLeaderMasterRpc | Network | | Waiting on an RPC to the master/master-service |
-| YBClient | YBCFindMasterProxy | Network | | Waiting on establishing the proxy to master leader |
+| YCQLQuery | YCQL_Parse | CPU | | YCQL is parsing a query. |
+| YCQLQuery | YCQL_Read | CPU | \
| YCQL is processing a read query.|
+| YCQLQuery | YCQL_Write | CPU | \ | YCQL is processing a write query. |
+| YCQLQuery | YCQL_Analyze | CPU | | YCQL is analyzing a query. |
+| YCQLQuery | YCQL_Execute | CPU | | YCQL is executing a query. |
+| Client | YBClient_WaitingOnDocDB | Network | | YB Client is waiting on DocDB to return a response. |
+| Client | YBClient_LookingUpTablet | Network | | YB Client is looking up tablet information from the master. |
## Examples
diff --git a/docs/content/preview/integrations/camunda.md b/docs/content/preview/integrations/camunda.md
index a371ef2c7450..29fbf76ceec2 100644
--- a/docs/content/preview/integrations/camunda.md
+++ b/docs/content/preview/integrations/camunda.md
@@ -56,7 +56,7 @@ This tutorial assumes that:
password: yugabyte
```
- Then, download the YugabyteDB JDBC driver [JAR file](https://repo1.maven.org/maven2/com/yugabyte/jdbc-yugabytedb/42.3.5-yb-5/jdbc-yugabytedb-42.3.5-yb-5.jar) and place it in the `camunda-bpm-run-7.17.0/configuration/userlib` directory. Read more about the YugabyteDB JDBC driver on its [documentation page](../../reference/drivers/java/yugabyte-jdbc-reference/).
+ Then, download the YugabyteDB JDBC driver [JAR file](https://repo1.maven.org/maven2/com/yugabyte/jdbc-yugabytedb/42.3.5-yb-5/jdbc-yugabytedb-42.3.5-yb-5.jar) and place it in the `camunda-bpm-run-7.17.0/configuration/userlib` directory. Read more about the [YugabyteDB JDBC driver](../../drivers-orms/java/yugabyte-jdbc-reference/).
1. Start the Camunda Platform server using `./start.sh` on Linux or macOS, or `./start.bat` on Windows.
diff --git a/docs/content/preview/quick-start-yugabytedb-managed/quick-start-buildapps-include.md b/docs/content/preview/quick-start-yugabytedb-managed/quick-start-buildapps-include.md
index 0c49e90c410e..272a24e8aadf 100644
--- a/docs/content/preview/quick-start-yugabytedb-managed/quick-start-buildapps-include.md
+++ b/docs/content/preview/quick-start-yugabytedb-managed/quick-start-buildapps-include.md
@@ -305,14 +305,14 @@ You have successfully executed a basic Node.js application that works with Yugab
{{% tab header="C" lang="c" %}}
-The [C application](https://github.com/yugabyte/yugabyte-simple-c-app) connects to a YugabyteDB cluster using the [libpq driver](/preview/reference/drivers/ysql-client-drivers/#libpq) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB in C.
+The [C application](https://github.com/yugabyte/yugabyte-simple-c-app) connects to a YugabyteDB cluster using the [libpq driver](/preview/drivers-orms/ysql-client-drivers/#libpq) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB in C.
The application requires the following:
- 32-bit (x86) or 64-bit (x64) architecture machine. (Use [Rosetta](https://support.apple.com/en-us/HT211861) to build and run on Apple silicon.)
- gcc 4.1.2 or later, or clang 3.4 or later installed.
- OpenSSL 1.1.1 or later (used by libpq to establish secure SSL connections).
-- [libpq](/preview/reference/drivers/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/).
+- [libpq](/preview/drivers-orms/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/).
To build and run the application, do the following:
@@ -380,15 +380,15 @@ You have successfully executed a basic C application that works with YugabyteDB.
{{% tab header="C++" lang="cpp" %}}
-The [C++ application](https://github.com/yugabyte/yugabyte-simple-cpp-app) connects to a YugabyteDB cluster using the [libpqxx driver](/preview/reference/drivers/ysql-client-drivers/#libpqxx) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB in C++.
+The [C++ application](https://github.com/yugabyte/yugabyte-simple-cpp-app) connects to a YugabyteDB cluster using the [libpqxx driver](/preview/drivers-orms/ysql-client-drivers/#libpqxx) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB in C++.
The application requires the following:
- 32-bit (x86) or 64-bit (x64) architecture machine. (Use [Rosetta](https://support.apple.com/en-us/HT211861) to build and run on Apple silicon.)
- gcc 4.1.2 or later, or clang 3.4 or later installed.
- OpenSSL 1.1.1 or later (used by libpq and libpqxx to establish secure SSL connections).
-- [libpq](/preview/reference/drivers/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/).
-- [libpqxx](/preview/reference/drivers/ysql-client-drivers/#libpqxx). Homebrew users on macOS can install using `brew install libpqxx`. To build the driver yourself, refer to [Building libpqxx](https://github.com/jtv/libpqxx#building-libpqxx).
+- [libpq](/preview/drivers-orms/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/).
+- [libpqxx](/preview/drivers-orms/ysql-client-drivers/#libpqxx). Homebrew users on macOS can install using `brew install libpqxx`. To build the driver yourself, refer to [Building libpqxx](https://github.com/jtv/libpqxx#building-libpqxx).
To build and run the application, do the following:
@@ -526,14 +526,14 @@ You have successfully executed a basic C# application that works with YugabyteDB
{{% tab header="Ruby" lang="ruby" %}}
-The [Ruby application](https://github.com/yugabyte/yugabyte-simple-ruby-app) connects to a YugabyteDB cluster using the [Ruby Pg driver](/preview/reference/drivers/ysql-client-drivers/#pg) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB in Ruby.
+The [Ruby application](https://github.com/yugabyte/yugabyte-simple-ruby-app) connects to a YugabyteDB cluster using the [Ruby Pg driver](/preview/drivers-orms/ruby/ysql-pg) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB in Ruby.
The application requires the following:
- Ruby 3.1 or later.
- OpenSSL 1.1.1 or later (used by libpq and pg to establish secure SSL connections).
-- [libpq](/preview/reference/drivers/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/).
-- [Ruby pg](/preview/reference/drivers/ysql-client-drivers/#pg). To install Ruby pg, run the following command:
+- [libpq](/preview/drivers-orms/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/).
+- [Ruby pg](/preview/drivers-orms/ruby/ysql-pg/). To install Ruby pg, run the following command:
```sh
gem install pg -- --with-pg-include=/libpq/include --with-pg-lib=/libpq/lib
@@ -605,7 +605,7 @@ You have successfully executed a basic Ruby application that works with Yugabyte
{{% tab header="Rust" lang="rust" %}}
-The [Rust application](https://github.com/yugabyte/yugabyte-simple-rust-app) connects to a YugabyteDB cluster using the [Rust-Postgres driver](/preview/reference/drivers/ysql-client-drivers/#rust-postgres) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB in Rust.
+The [Rust application](https://github.com/yugabyte/yugabyte-simple-rust-app) connects to a YugabyteDB cluster using the [Rust-Postgres driver](/preview/drivers-orms/yb-rust-postgres/) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB in Rust.
The application requires the following:
@@ -671,12 +671,12 @@ You have successfully executed a basic Rust application that works with Yugabyte
{{% tab header="PHP" lang="php" %}}
-The [PHP application](https://github.com/yugabyte/yugabyte-simple-php-app) connects to a YugabyteDB cluster using the [php-pgsql](/preview/reference/drivers/ysql-client-drivers/#php-pgsql) driver and performs basic SQL operations. Use the application as a template to get started with YugabyteDB in PHP.
+The [PHP application](https://github.com/yugabyte/yugabyte-simple-php-app) connects to a YugabyteDB cluster using the [php-pgsql](/preview/drivers-orms/php/ysql/) driver and performs basic SQL operations. Use the application as a template to get started with YugabyteDB in PHP.
The application requires the following:
- PHP runtime. The sample application was created using PHP 8.1 but should work with earlier and later versions. Homebrew users on macOS can install PHP using `brew install php`.
-- [php-pgsql driver](/preview/reference/drivers/ysql-client-drivers/#php-pgsql).
+- [php-pgsql driver](/preview/drivers-orms/php/ysql/).
- On macOS, Homebrew automatically installs the driver with `brew install php`.
- Ubuntu users can install the driver using the `sudo apt-get install php-pgsql` command.
- CentOS users can install the driver using the `sudo yum install php-pgsql` command.
diff --git a/docs/content/preview/reference/configuration/all-flags-yb-master.md b/docs/content/preview/reference/configuration/all-flags-yb-master.md
index 0d068dc78e3d..04e45d76b20a 100644
--- a/docs/content/preview/reference/configuration/all-flags-yb-master.md
+++ b/docs/content/preview/reference/configuration/all-flags-yb-master.md
@@ -9,7 +9,7 @@ menu:
type: indexpage
---
-Use the yb-master binary and its flags to configure the [YB-Master](../../../architecture/concepts/yb-master/) server. The yb-master executable file is located in the `bin` directory of YugabyteDB home. For more detailed information about flags commonly used for production deployments and instructions on using yb-master, refer to the [yb-master](../yb-master/) documentation.
+Use the yb-master binary and its flags to configure the [YB-Master](../../../architecture/yb-master/) server. The yb-master executable file is located in the `bin` directory of YugabyteDB home. For more detailed information about flags commonly used for production deployments and instructions on using yb-master, refer to the [yb-master](../yb-master/) documentation.
For a list of all YB-TServer flags, see [All YB-TServer flags](../all-flags-yb-tserver/).
diff --git a/docs/content/preview/reference/configuration/all-flags-yb-tserver.md b/docs/content/preview/reference/configuration/all-flags-yb-tserver.md
index 976296932cd6..50a8750f05d0 100644
--- a/docs/content/preview/reference/configuration/all-flags-yb-tserver.md
+++ b/docs/content/preview/reference/configuration/all-flags-yb-tserver.md
@@ -9,7 +9,7 @@ menu:
type: indexpage
---
-Use the yb-tserver binary and its flags to configure the [YB-TServer](../../../architecture/concepts/yb-tserver/) server. The yb-tserver executable file is located in the `bin` directory of YugabyteDB home. For more detailed information about flags commonly used for production deployments and instructions on using yb-tserver, refer to the [yb-tserver](../yb-tserver/) documentation.
+Use the yb-tserver binary and its flags to configure the [YB-TServer](../../../architecture/yb-tserver/) server. The yb-tserver executable file is located in the `bin` directory of YugabyteDB home. For more detailed information about flags commonly used for production deployments and instructions on using yb-tserver, refer to the [yb-tserver](../yb-tserver/) documentation.
For a list of all YB-Master flags, see [All YB-Master flags](../all-flags-yb-master/).
diff --git a/docs/content/preview/reference/configuration/yb-master.md b/docs/content/preview/reference/configuration/yb-master.md
index d2c4c783f386..1cfc88164e41 100644
--- a/docs/content/preview/reference/configuration/yb-master.md
+++ b/docs/content/preview/reference/configuration/yb-master.md
@@ -983,6 +983,16 @@ expensive when the number of yb-tservers, or the number of databases goes up.
## Advanced flags
+##### --allowed_preview_flags_csv
+
+This is a comma-separated values (CSV) formatted catalogue of [preview feature](/preview/releases/versioning/#tech-preview-tp) flag names. Preview flags represent experimental or in-development features that are not yet fully supported. Flags that are tagged as "preview" cannot be modified or configured unless they are included in this list.
+
+By adding a flag to this list, you explicitly acknowledge and accept any potential risks or instability that may arise from modifying these preview features. This process serves as a safeguard, ensuring that you are fully aware of the experimental nature of the flags you are working with.
+
+{{}}
+Inclusion in this list doesn't automatically change any settings. It only grants permission for the flag to be modified. You'll still need to configure the flag separately after adding it to this list.
+{{}}
+
##### --ysql_index_backfill_rpc_timeout_ms
Deadline (in milliseconds) for each internal YB-Master to YB-TServer RPC for backfilling a chunk of the index.
diff --git a/docs/content/preview/reference/drivers/_index.md b/docs/content/preview/reference/drivers/_index.md
deleted file mode 100644
index 48264312b323..000000000000
--- a/docs/content/preview/reference/drivers/_index.md
+++ /dev/null
@@ -1,92 +0,0 @@
----
-title: YugabyteDB Drivers and ORMs
-headerTitle: Drivers and ORMs
-linkTitle: Drivers and ORMs
-description: Use drivers to power applications with YugabyteDB.
-headcontent: Drivers and ORMs reference
-image: /images/section_icons/sample-data/s_s1-sampledata-3x.png
-menu:
- preview:
- identifier: drivers
- parent: reference
- weight: 2750
-type: indexpage
----
-
-### YSQL driver reference
-
-
diff --git a/docs/content/preview/releases/versioning.md b/docs/content/preview/releases/versioning.md
index c25d65668ec2..e351e84e0635 100644
--- a/docs/content/preview/releases/versioning.md
+++ b/docs/content/preview/releases/versioning.md
@@ -98,6 +98,10 @@ TP features aren't supported by Customer Support and may change at any time duri
If you are interested in a TP feature, contact {{% support-general %}}.
+{{}}
+Configuration of preview feature-specific flags is restricted to those listed in the [allowed_preview_flags_csv](../../reference/configuration/yb-master/#allowed-preview-flags-csv) flag. This measure acts as a safeguard, ensuring users are aware they are modifying settings for preview features.
+{{}}
+
Participating customers agree to provide feedback to the Product Team. However, the timeline for addressing specific areas of feedback (including bugs) is at the discretion of Yugabyte.
Documentation (if provided) for TP features is marked as such.
diff --git a/docs/content/preview/secure/authentication/password-authentication.md b/docs/content/preview/secure/authentication/password-authentication.md
index f13bc645069f..33ecad53c356 100644
--- a/docs/content/preview/secure/authentication/password-authentication.md
+++ b/docs/content/preview/secure/authentication/password-authentication.md
@@ -48,7 +48,7 @@ The MD5 hash algorithm is not considered secure against determined attacks. Some
### SCRAM-SHA-256
-The SCRAM-SHA-256 method (`scram-sh-256`) performs SCRAM-SHA-256 authentication, as described in [RFC 7677](https://tools.ietf.org/html/rfc7677). This challenge-response scheme prevents password sniffing on untrusted connections and supports storing passwords on YugabyteDB clusters in the most secure cryptographically hashed form available. The SCRAM-SHA-256 method implemented here is explained in further detail in [SASL Authentication (PostgreSQL documentation)](https://www.postgresql.org/docs/11/sasl-authentication.html). This is the most secure password authentication available and is supported by most of the [client drivers for the YSQL API](../../../reference/drivers/ysql-client-drivers/).
+The SCRAM-SHA-256 method (`scram-sh-256`) performs SCRAM-SHA-256 authentication, as described in [RFC 7677](https://tools.ietf.org/html/rfc7677). This challenge-response scheme prevents password sniffing on untrusted connections and supports storing passwords on YugabyteDB clusters in the most secure cryptographically hashed form available. The SCRAM-SHA-256 method implemented here is explained in further detail in [SASL Authentication (PostgreSQL documentation)](https://www.postgresql.org/docs/11/sasl-authentication.html). This is the most secure password authentication available and is supported by most of the [client drivers for the YSQL API](../../../drivers-orms/).
- Allows for two parties to verify they both know a secret without exchanging the secret.
- SCRAM-SHA-256 encryption uses the [SASL authentication mechanism flow](https://www.postgresql.org/docs/11/sasl-authentication.html) to limit security risks from brute force attacks and sniffing.
diff --git a/docs/content/preview/troubleshoot/nodes/trouble-common.md b/docs/content/preview/troubleshoot/nodes/trouble-common.md
index 294a9be8018d..c1f917c4d170 100644
--- a/docs/content/preview/troubleshoot/nodes/trouble-common.md
+++ b/docs/content/preview/troubleshoot/nodes/trouble-common.md
@@ -70,7 +70,7 @@ SELECT * FROM system.peers_v2;
(ql error -2)
```
-The most likely reason is that you are not using one of the YugabyteDB forks of the Cassandra client drivers. The `system.peers_v2` table does not exist in YugabyteDB. To resolve this issue, you should check the [drivers page](../../../reference/drivers/ycql-client-drivers/) to find a driver for your client language.
+The most likely reason is that you are not using one of the YugabyteDB forks of the Cassandra client drivers. The `system.peers_v2` table does not exist in YugabyteDB. To resolve this issue, you should check the [drivers page](../../../drivers-orms/ycql-client-drivers/) to find a driver for your client language.
## Poll stopped: Service unavailable
diff --git a/docs/content/preview/troubleshoot/ysql-issues.md b/docs/content/preview/troubleshoot/ysql-issues.md
index 0b78975fbfbb..0bd69dc8929c 100644
--- a/docs/content/preview/troubleshoot/ysql-issues.md
+++ b/docs/content/preview/troubleshoot/ysql-issues.md
@@ -103,4 +103,4 @@ Snapshot too old: Snapshot too old. Read point: { physical: 1628678717824559 },
When the command takes a long time to be processed, a compaction may have occurred and have deleted some rows at the snapshot the dump was started on. For large backups, it is recommended to use [distributed snapshots](../../manage/backup-restore/snapshot-ysql/), which are more efficient and fast.
-If you really need to use `ysql_dump`, you can increase the [--timestamp_history_retention_interval_sec](../../reference/configuration/yb-tserver/#timestamp-history-retention-interval-sec) flag on the master. The total time necessary for this command depends on the amount of metadata in your environment, thus you might need to tune this flag a couple of times. You can start by setting this flag to 3600 seconds and iterating from there. Note: Ideally, you don't want to leave this flag at a really high value, as that can have an adverse effect on the runtime of regular metadata queries (for example, DDLs, new connection establishment, metadata cache refreshes).
+If you really need to use `ysql_dump`, you can increase the [`--timestamp_history_retention_interval_sec`](../../reference/configuration/yb-tserver/#timestamp-history-retention-interval-sec) flag on the master to a higher value. The total time necessary for this command depends on the amount of metadata in your environment, so you might need to tune this flag a couple of times. You can start by setting it to 3600 seconds and iterating from there. Note that, ideally, you don't want to leave this flag at a really high value, as that can have an adverse effect on the runtime of regular metadata queries (for example, DDLs, establishing new connections, and metadata cache refreshes).
diff --git a/docs/content/preview/tutorials/build-apps/c/cloud-ysql-c.md b/docs/content/preview/tutorials/build-apps/c/cloud-ysql-c.md
index 2298f0e2cf14..97c45b438408 100644
--- a/docs/content/preview/tutorials/build-apps/c/cloud-ysql-c.md
+++ b/docs/content/preview/tutorials/build-apps/c/cloud-ysql-c.md
@@ -14,14 +14,14 @@ menu:
type: docs
---
-The following tutorial shows a small [C application](https://github.com/yugabyte/yugabyte-simple-c-app) that connects to a YugabyteDB cluster using the [libpq driver](../../../../reference/drivers/ysql-client-drivers/#libpq) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in C.
+The following tutorial shows a small [C application](https://github.com/yugabyte/yugabyte-simple-c-app) that connects to a YugabyteDB cluster using the [libpq driver](../../../../drivers-orms/ysql-client-drivers/#libpq) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in C.
## Prerequisites
- 32-bit (x86) or 64-bit (x64) architecture machine. (Use [Rosetta](https://support.apple.com/en-us/HT211861) to build and run on Apple silicon.)
- gcc 4.1.2 or later, or clang 3.4 or later installed.
- OpenSSL 1.1.1 or later (used by libpq to establish secure SSL connections).
-- [libpq](../../../../reference/drivers/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/).
+- [libpq](../../../../drivers-orms/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/).
### Clone the application from GitHub
@@ -180,4 +180,4 @@ if (PQresultStatus(res) != PGRES_COMMAND_OK) {
## Learn more
-[libpq driver](../../../../reference/drivers/ysql-client-drivers/#libpq)
+[libpq driver](../../../../drivers-orms/ysql-client-drivers/#libpq)
diff --git a/docs/content/preview/tutorials/build-apps/cpp/cloud-ysql-cpp.md b/docs/content/preview/tutorials/build-apps/cpp/cloud-ysql-cpp.md
index 5c650cf3c697..f89e5d72ecfc 100644
--- a/docs/content/preview/tutorials/build-apps/cpp/cloud-ysql-cpp.md
+++ b/docs/content/preview/tutorials/build-apps/cpp/cloud-ysql-cpp.md
@@ -14,15 +14,15 @@ menu:
type: docs
---
-The following tutorial shows a small [C++ application](https://github.com/yugabyte/yugabyte-simple-cpp-app) that connects to a YugabyteDB cluster using the [libpqxx driver](../../../../reference/drivers/ysql-client-drivers/#libpqxx) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in C++.
+The following tutorial shows a small [C++ application](https://github.com/yugabyte/yugabyte-simple-cpp-app) that connects to a YugabyteDB cluster using the [libpqxx driver](../../../../drivers-orms/ysql-client-drivers/#libpqxx) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in C++.
## Prerequisites
- 32-bit (x86) or 64-bit (x64) architecture machine. (Use [Rosetta](https://support.apple.com/en-us/HT211861) to build and run on Apple silicon.)
- gcc 4.1.2 or later, or clang 3.4 or later installed.
- OpenSSL 1.1.1 or later (used by libpq and libpqxx to establish secure SSL connections).
-- [libpq](../../../../reference/drivers/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/).
-- [libpqxx](../../../../reference/drivers/ysql-client-drivers/#libpqxx). Homebrew users on macOS can install using `brew install libpqxx`. To build the driver yourself, refer to [Building libpqxx](https://github.com/jtv/libpqxx#building-libpqxx).
+- [libpq](../../../../drivers-orms/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/).
+- [libpqxx](../../../../drivers-orms/ysql-client-drivers/#libpqxx). Homebrew users on macOS can install using `brew install libpqxx`. To build the driver yourself, refer to [Building libpqxx](https://github.com/jtv/libpqxx#building-libpqxx).
### Clone the application from GitHub
@@ -179,6 +179,6 @@ try {
## Learn more
-[libpq driver](../../../../reference/drivers/ysql-client-drivers/#libpq)
+[libpq driver](../../../../drivers-orms/ysql-client-drivers/#libpq)
-[libpqxx driver](../../../../reference/drivers/ysql-client-drivers/#libpqxx)
+[libpqxx driver](../../../../drivers-orms/ysql-client-drivers/#libpqxx)
diff --git a/docs/content/preview/tutorials/build-apps/csharp/cloud-ysql-csharp.md b/docs/content/preview/tutorials/build-apps/csharp/cloud-ysql-csharp.md
index 53f94d1cfb16..c86a5fee7693 100644
--- a/docs/content/preview/tutorials/build-apps/csharp/cloud-ysql-csharp.md
+++ b/docs/content/preview/tutorials/build-apps/csharp/cloud-ysql-csharp.md
@@ -12,7 +12,7 @@ menu:
type: docs
---
-The following tutorial shows a small [C# application](https://github.com/yugabyte/yugabyte-simple-csharp-app) that connects to a YugabyteDB cluster using the [Npgsql driver](../../../../reference/drivers/ysql-client-drivers/#npgsql) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in C#.
+The following tutorial shows a small [C# application](https://github.com/yugabyte/yugabyte-simple-csharp-app) that connects to a YugabyteDB cluster using the [Npgsql driver](../../../../drivers-orms/csharp/postgres-npgsql) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in C#.
## Prerequisites
@@ -173,4 +173,4 @@ try
## Learn more
-[Npgsql driver](../../../../reference/drivers/ysql-client-drivers/#npgsql)
+[Npgsql driver](../../../../drivers-orms/csharp/postgres-npgsql/)
diff --git a/docs/content/preview/tutorials/build-apps/go/cloud-ysql-go.md b/docs/content/preview/tutorials/build-apps/go/cloud-ysql-go.md
index 54eafc5da69e..f1f757657d93 100644
--- a/docs/content/preview/tutorials/build-apps/go/cloud-ysql-go.md
+++ b/docs/content/preview/tutorials/build-apps/go/cloud-ysql-go.md
@@ -13,7 +13,7 @@ menu:
type: docs
---
-The following tutorial shows a small [Go application](https://github.com/yugabyte/yugabyte-simple-go-app) that connects to a YugabyteDB cluster using the [Go PostgreSQL driver](../../../../reference/drivers/ysql-client-drivers/#go-postgresql-driver-pq) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Go.
+The following tutorial shows a small [Go application](https://github.com/yugabyte/yugabyte-simple-go-app) that connects to a YugabyteDB cluster using the [Go PostgreSQL driver](../../../../drivers-orms/go/pq/) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Go.
## Prerequisites
@@ -181,4 +181,4 @@ if checkIfTxAborted(err) {
## Learn more
-[Go PostgreSQL driver](../../../../reference/drivers/ysql-client-drivers/#go-postgresql-driver-pq)
+[Go PostgreSQL driver](../../../../drivers-orms/go/pq/)
diff --git a/docs/content/preview/tutorials/build-apps/java/cloud-ysql-yb-jdbc.md b/docs/content/preview/tutorials/build-apps/java/cloud-ysql-yb-jdbc.md
index 31b84749f6b0..5fe5167ec21f 100644
--- a/docs/content/preview/tutorials/build-apps/java/cloud-ysql-yb-jdbc.md
+++ b/docs/content/preview/tutorials/build-apps/java/cloud-ysql-yb-jdbc.md
@@ -13,7 +13,9 @@ menu:
type: docs
---
-The following tutorial shows a small [Java application](https://github.com/yugabyte/yugabyte-simple-java-app) that connects to a YugabyteDB cluster using the topology-aware [YugabyteDB JDBC driver](../../../../reference/drivers/java/yugabyte-jdbc-reference/) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Java.
+YugabyteDB YSQL is fully compatible with the [PostgreSQL JDBC driver](../../../../drivers-orms/java/postgres-jdbc-reference/), allowing Java programmers to connect to YugabyteDB database to execute DMLs and DDLs using the JDBC APIs. The [YugabyteDB JDBC smart driver](../../../../drivers-orms/java/yugabyte-jdbc-reference/) is built on the PostgreSQL JDBC driver, with additional connection load balancing features.
+
+The following tutorial shows a small [Java application](https://github.com/yugabyte/yugabyte-simple-java-app) that connects to a YugabyteDB cluster using the topology-aware YugabyteDB JDBC driver and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Java.
## Prerequisites
@@ -165,4 +167,4 @@ try {
## Learn more
-[YugabyteDB JDBC driver](../../../../reference/drivers/java/yugabyte-jdbc-reference/)
+[Connect an application using the PostgreSQL JDBC driver](../../../../drivers-orms/java/postgres-jdbc/)
diff --git a/docs/content/preview/tutorials/build-apps/nodejs/cloud-ysql-node.md b/docs/content/preview/tutorials/build-apps/nodejs/cloud-ysql-node.md
index ca4459e66095..3e4bc940c579 100644
--- a/docs/content/preview/tutorials/build-apps/nodejs/cloud-ysql-node.md
+++ b/docs/content/preview/tutorials/build-apps/nodejs/cloud-ysql-node.md
@@ -12,7 +12,7 @@ menu:
type: docs
---
-The following tutorial shows a small [Node.js application](https://github.com/yugabyte/yugabyte-simple-node-app) that connects to a YugabyteDB cluster using the [node-postgres module](../../../../reference/drivers/ysql-client-drivers/#node-postgres) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Node.js.
+The following tutorial shows a small [Node.js application](https://github.com/yugabyte/yugabyte-simple-node-app) that connects to a YugabyteDB cluster using the [node-postgres module](../../../../drivers-orms/nodejs/postgres-node-driver/) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Node.js.
## Prerequisites
@@ -179,4 +179,4 @@ try {
## Learn more
-[node-postgres module](../../../../reference/drivers/ysql-client-drivers/#node-postgres)
+[node-postgres module](../../../../drivers-orms/nodejs/postgres-node-driver/)
diff --git a/docs/content/preview/tutorials/build-apps/php/cloud-ysql-php.md b/docs/content/preview/tutorials/build-apps/php/cloud-ysql-php.md
index 340ba17c918d..0c549efca8b4 100644
--- a/docs/content/preview/tutorials/build-apps/php/cloud-ysql-php.md
+++ b/docs/content/preview/tutorials/build-apps/php/cloud-ysql-php.md
@@ -14,12 +14,12 @@ menu:
type: docs
---
-The following tutorial shows a small [PHP application](https://github.com/yugabyte/yugabyte-simple-php-app) that connects to a YugabyteDB cluster using the [php-pgsql](../../../../reference/drivers/ysql-client-drivers/#php-pgsql) driver and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in PHP.
+The following tutorial shows a small [PHP application](https://github.com/yugabyte/yugabyte-simple-php-app) that connects to a YugabyteDB cluster using the [php-pgsql](../../../../drivers-orms/php/ysql/) driver and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in PHP.
## Prerequisites
- PHP runtime. The sample application was created using PHP 8.1 but should work with earlier and later versions. Homebrew users on macOS can install PHP using `brew install php`.
-- [php-pgsql driver](../../../../reference/drivers/ysql-client-drivers/#php-pgsql).
+- [php-pgsql driver](../../../../drivers-orms/php/ysql/).
- On macOS, Homebrew automatically installs the driver with `brew install php`.
- Ubuntu users can install the driver using the `sudo apt-get install php-pgsql` command.
- CentOS users can install the driver using the `sudo yum install php-pgsql` command.
@@ -146,4 +146,4 @@ try {
## Learn more
-[php-pgsql driver](../../../../reference/drivers/ysql-client-drivers/#php-pgsql)
+[php-pgsql driver](../../../../drivers-orms/php/ysql/)
diff --git a/docs/content/preview/tutorials/build-apps/python/cloud-ysql-python.md b/docs/content/preview/tutorials/build-apps/python/cloud-ysql-python.md
index ba6c2c05b331..ca3555f2672f 100644
--- a/docs/content/preview/tutorials/build-apps/python/cloud-ysql-python.md
+++ b/docs/content/preview/tutorials/build-apps/python/cloud-ysql-python.md
@@ -13,7 +13,7 @@ menu:
type: docs
---
-The following tutorial shows a small [Python application](https://github.com/yugabyte/yugabyte-simple-python-app) that connects to a YugabyteDB cluster using the [Python psycopg2 PostgreSQL database adapter](../../../../reference/drivers/python/postgres-psycopg2-reference/) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Python.
+The following tutorial shows a small [Python application](https://github.com/yugabyte/yugabyte-simple-python-app) that connects to a YugabyteDB cluster using the [Python psycopg2 PostgreSQL database adapter](../../../../drivers-orms/python/postgres-psycopg2/) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Python.
## Prerequisites
@@ -165,4 +165,4 @@ except (Exception, psycopg2.DatabaseError) as e:
## Learn more
-[Python psycopg2 PostgreSQL database adapter](../../../../reference/drivers/ysql-client-drivers/#psycopg2)
+[Python psycopg2 PostgreSQL database adapter](../../../../drivers-orms/python/postgres-psycopg2/)
diff --git a/docs/content/preview/tutorials/build-apps/ruby/cloud-ysql-ruby.md b/docs/content/preview/tutorials/build-apps/ruby/cloud-ysql-ruby.md
index 020ce2c41f21..756181e6e0f3 100644
--- a/docs/content/preview/tutorials/build-apps/ruby/cloud-ysql-ruby.md
+++ b/docs/content/preview/tutorials/build-apps/ruby/cloud-ysql-ruby.md
@@ -14,14 +14,14 @@ menu:
type: docs
---
-The following tutorial shows a small [Ruby application](https://github.com/yugabyte/yugabyte-simple-ruby-app) that connects to a YugabyteDB cluster using the [Ruby Pg driver](../../../../reference/drivers/ysql-client-drivers/#pg) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Ruby.
+The following tutorial shows a small [Ruby application](https://github.com/yugabyte/yugabyte-simple-ruby-app) that connects to a YugabyteDB cluster using the [Ruby Pg driver](../../../../drivers-orms/ruby/ysql-pg/) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Ruby.
## Prerequisites
- Ruby 3.1 or later.
- OpenSSL 1.1.1 or later (used by libpq and pg to establish secure SSL connections).
-- [libpq](../../../../reference/drivers/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/).
-- [Ruby pg](../../../../reference/drivers/ysql-client-drivers/#pg). To install Ruby pg, run the following command:
+- [libpq](../../../../drivers-orms/ysql-client-drivers/#libpq). Homebrew users on macOS can install using `brew install libpq`. You can download the PostgreSQL binaries and source from [PostgreSQL Downloads](https://www.postgresql.org/download/).
+- [Ruby pg](../../../../drivers-orms/ruby/ysql-pg/). To install Ruby pg, run the following command:
```sh
gem install pg -- --with-pg-include=/libpq/include --with-pg-lib=/libpq/lib
@@ -166,6 +166,6 @@ end
## Learn more
-[Ruby pg driver](../../../../reference/drivers/ysql-client-drivers/#pg)
+[Ruby pg driver](../../../../drivers-orms/ruby/ysql-pg/)
-[libpq driver](../../../../reference/drivers/ysql-client-drivers/#libpq)
+[libpq driver](../../../../drivers-orms/ysql-client-drivers/#libpq)
diff --git a/docs/content/preview/tutorials/build-apps/rust/cloud-ysql-rust.md b/docs/content/preview/tutorials/build-apps/rust/cloud-ysql-rust.md
index be5fea6684c6..33dc3cb8beb1 100644
--- a/docs/content/preview/tutorials/build-apps/rust/cloud-ysql-rust.md
+++ b/docs/content/preview/tutorials/build-apps/rust/cloud-ysql-rust.md
@@ -14,7 +14,7 @@ menu:
type: docs
---
-The following tutorial shows a small [Rust application](https://github.com/yugabyte/yugabyte-simple-rust-app) that connects to a YugabyteDB cluster using the [Rust-Postgres driver](../../../../reference/drivers/ysql-client-drivers/#rust-postgres) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Rust.
+The following tutorial shows a small [Rust application](https://github.com/yugabyte/yugabyte-simple-rust-app) that connects to a YugabyteDB cluster using the [Rust-Postgres driver](../../../../drivers-orms/rust/yb-rust-postgres/) and performs basic SQL operations. Use the application as a template to get started with YugabyteDB Aeon in Rust.
## Prerequisites
@@ -147,4 +147,4 @@ let exec_txn = || -> Result<(), DBError> {
## Learn more
-[Rust-Postgres driver](../../../../reference/drivers/ysql-client-drivers/#rust-postgres)
+[Rust-Postgres driver](../../../../drivers-orms/rust/yb-rust-postgres/)
diff --git a/docs/content/preview/yugabyte-cloud/cloud-examples/_index.md b/docs/content/preview/yugabyte-cloud/cloud-examples/_index.md
index 00a7e4549872..3eb30b6e5ec8 100644
--- a/docs/content/preview/yugabyte-cloud/cloud-examples/_index.md
+++ b/docs/content/preview/yugabyte-cloud/cloud-examples/_index.md
@@ -16,7 +16,7 @@ The sample applications in this section provide advanced examples of connecting
To get started building applications for YugabyteDB Aeon, refer to [Build an application](../../tutorials/build-apps/).
-Applications connect to and interact with YugabyteDB using API client libraries (also known as client drivers). Before you can connect an application, you need to install the correct driver. Because the YugabyteDB YSQL API is PostgreSQL-compatible, and the YCQL API has roots in the Apache Cassandra CQL, YugabyteDB supports many third-party drivers. For information on available drivers, refer to [Drivers](../../reference/drivers/).
+Applications connect to and interact with YugabyteDB using API client libraries (also known as client drivers). Before you can connect an application, you need to install the correct driver. Because the YugabyteDB YSQL API is PostgreSQL-compatible, and the YCQL API has roots in the Apache Cassandra CQL, YugabyteDB supports many third-party drivers. For information on available drivers, refer to [Drivers and ORMs](../../drivers-orms/).
{{}}
diff --git a/docs/content/preview/yugabyte-platform/alerts-monitoring/universe-logging.md b/docs/content/preview/yugabyte-platform/alerts-monitoring/universe-logging.md
index 4ff490fc1380..0d5f1231e5b5 100644
--- a/docs/content/preview/yugabyte-platform/alerts-monitoring/universe-logging.md
+++ b/docs/content/preview/yugabyte-platform/alerts-monitoring/universe-logging.md
@@ -25,7 +25,7 @@ The Audit log export feature is {{}}. To enable the feature in Yugabyt
To export logs, you need to first create an export configuration. A configuration defines the sign in credentials and settings for the tool that you want to export your logs to. Refer to [Manage export configurations](../anywhere-export-configuration).
-If you want to set pgaudit.log_level to a [severity level](https://www.postgresql.org/docs/11/runtime-config-logging.html#RUNTIME-CONFIG-SEVERITY-LEVELS) greater than WARNING (that is, DEBUG1-5, INFO, NOTICE), you must set the YB-TServer [ysql_log_min_messages](../../reference/configuration/yb-tserver/#--ysql-log-min-messages) flag accordingly.
+If you want to set pgaudit.log_level to a [severity level](https://www.postgresql.org/docs/11/runtime-config-logging.html#RUNTIME-CONFIG-SEVERITY-LEVELS) greater than WARNING (that is, DEBUG1-5, INFO, NOTICE), you must set the YB-TServer [ysql_log_min_messages](../../../reference/configuration/yb-tserver/#ysql-log-min-messages) flag accordingly.
## Limitations
diff --git a/docs/content/preview/yugabyte-platform/configure-yugabyte-platform/on-premises-provider.md b/docs/content/preview/yugabyte-platform/configure-yugabyte-platform/on-premises-provider.md
index 9161101a79ba..2702b54d4ea1 100644
--- a/docs/content/preview/yugabyte-platform/configure-yugabyte-platform/on-premises-provider.md
+++ b/docs/content/preview/yugabyte-platform/configure-yugabyte-platform/on-premises-provider.md
@@ -68,7 +68,7 @@ For on-premises deployments, consider racks as zones to treat them as fault doma
### SSH Key Pairs
-In the **SSH User** field, enter the name of the user that has SSH privileges on your instances. This is required because YBA needs SSH access to the nodes to provision them with YugabyteDB. Unless you plan to provision the database nodes manually, the SSH user needs to have password-free sudo permissions to complete a few tasks.
+In the **SSH User** field, enter the name of the user that has SSH privileges on your instances. This is required because YBA needs SSH access to the nodes to provision them with YugabyteDB. This SSH user cannot be named yugabyte. Unless you plan to provision the database nodes manually, the SSH user needs to have password-free sudo permissions to complete a few tasks.
If the SSH user requires a password for sudo access or the SSH user does not have sudo access, you must enable the **Manually Provision Nodes** option (under **Advanced**) and [manually provision the instances](../on-premises-script/).
diff --git a/docs/content/preview/yugabyte-platform/create-deployments/connect-to-universe.md b/docs/content/preview/yugabyte-platform/create-deployments/connect-to-universe.md
index 27cbe35bcf5c..5908130bd14b 100644
--- a/docs/content/preview/yugabyte-platform/create-deployments/connect-to-universe.md
+++ b/docs/content/preview/yugabyte-platform/create-deployments/connect-to-universe.md
@@ -33,9 +33,9 @@ If the universe uses Client-to-Node encryption in transit, to connect you need t
For information on connecting using a client shell using this certificate, see [Connect from your desktop](#connect-from-your-desktop).
-To use TLS to connect an application, refer to the [driver documentation](../../../reference/drivers/). If you are using a PostgreSQL JDBC driver to connect to YugabyteDB, you can also refer to [Configuring the client](https://jdbc.postgresql.org/documentation/head/ssl-client.html) for more details.
+To use TLS to connect an application, refer to the [driver documentation](../../../drivers-orms/). If you are using a PostgreSQL JDBC driver to connect to YugabyteDB, you can also refer to [Configuring the client](https://jdbc.postgresql.org/documentation/head/ssl-client.html) for more details.
-If you are using PostgreSQL/YugabyteDB JDBC driver with SSL, you need to convert the certificates to DER format. To do this, you need to perform only steps 6 and 7 from [Set up SSL certificates for Java applications](../../../reference/drivers/java/postgres-jdbc-reference/#set-up-ssl-certificates-for-java-applications) section after downloading the certificates.
+If you are using PostgreSQL/YugabyteDB JDBC driver with SSL, you need to convert the certificates to DER format. To do this, you need to perform only steps 6 and 7 from [Set up SSL certificates for Java applications](../../../drivers-orms/java/postgres-jdbc-reference/#set-up-ssl-certificates-for-java-applications) section after downloading the certificates.
## Connect to a universe node
diff --git a/docs/content/preview/yugabyte-platform/manage-deployments/xcluster-replication/xcluster-replication-ddl.md b/docs/content/preview/yugabyte-platform/manage-deployments/xcluster-replication/xcluster-replication-ddl.md
index 2aeeefb9a1d6..9251b67ca2da 100644
--- a/docs/content/preview/yugabyte-platform/manage-deployments/xcluster-replication/xcluster-replication-ddl.md
+++ b/docs/content/preview/yugabyte-platform/manage-deployments/xcluster-replication/xcluster-replication-ddl.md
@@ -60,7 +60,7 @@ Perform DDL operations in the order as shown in the following table. The order v
| :-- | :----- | :----- | :----- |
| CREATE TABLE | Execute on Source | Execute on Target | [Add table to replication](#add-a-table-to-replication) |
| DROP TABLE | [Remove table from replication](#remove-a-table-from-replication) | Execute on Target | Execute on Source |
-| CREATE INDEX | Execute on Source | Execute on Target | [Reconcile configuration](#reconcile-configuration) |
+| CREATE INDEX | Execute on Source | Execute on Target | [Add table to replication](#add-a-table-to-replication) |
| DROP INDEX | [Remove index table from replication](#remove-a-table-from-replication) | Execute on Target | Execute on Source |
| ALTER TABLE or INDEX | Execute on Target | Execute on Source | No changes needed |
diff --git a/docs/content/preview/yugabyte-platform/manage-deployments/xcluster-replication/xcluster-replication-setup.md b/docs/content/preview/yugabyte-platform/manage-deployments/xcluster-replication/xcluster-replication-setup.md
index 308478e174f9..f792f7433579 100644
--- a/docs/content/preview/yugabyte-platform/manage-deployments/xcluster-replication/xcluster-replication-setup.md
+++ b/docs/content/preview/yugabyte-platform/manage-deployments/xcluster-replication/xcluster-replication-setup.md
@@ -139,7 +139,7 @@ A full copy is done by first backing up the data to external storage, and then r
### YSQL tables
-You can add databases containing colocated tables to the xCluster configuration as long as the underlying database is v2.18.1.0 or later. Colocated tables on the source and target should be created with the same colocation ID if they already exist on both the source and target prior to setup. Refer to [xCluster and colocation](../../../../architecture/docdb-sharding/colocated-tables/#xcluster-and-colocation).
+You can add databases containing colocated tables to the xCluster configuration as long as the underlying database is v2.18.1.0 or later. Colocated tables on the source and target should be created with the same colocation ID if they already exist on both the source and target prior to setup. Refer to [xCluster and colocation](../../../../explore/colocation/#xcluster-and-colocation).
If a [full copy](#full-copy-during-xcluster-setup) is required, the entire database is recreated on the target universe from the current database on the source universe. Be sure to keep the set of tables the same at all times on both the source and target universes in these databases by following the steps in [Manage tables and indexes](../xcluster-replication-ddl/).
diff --git a/docs/content/preview/yugabyte-platform/security/authorization-platform.md b/docs/content/preview/yugabyte-platform/security/authorization-platform.md
index 84c0c7432b10..f087a1ef1ab7 100644
--- a/docs/content/preview/yugabyte-platform/security/authorization-platform.md
+++ b/docs/content/preview/yugabyte-platform/security/authorization-platform.md
@@ -33,6 +33,8 @@ Enter the password to use for the default database admin superuser (`yugabyte` f
You can also enable and disable the endpoints and authorization after deployment. Navigate to your universe, click **Actions**, and choose **Edit YSQL Configuration** or **Edit YCQL Configuration**.
+Note that for universes deployed using YugabyteDB Anywhere, you can't exclusively [enable authentication using flags](../../../secure/enable-authentication/authentication-ysql/). You must enable and disable authentication using the YugabyteDB Anywhere UI.
+
## Default roles and users
The YugabyteDB database on your universe includes a set of default users and roles in YSQL and YCQL.
diff --git a/docs/content/preview/yugabyte-platform/security/create-kms-config/hashicorp-kms.md b/docs/content/preview/yugabyte-platform/security/create-kms-config/hashicorp-kms.md
index aec1b632a53d..85c866f1c456 100644
--- a/docs/content/preview/yugabyte-platform/security/create-kms-config/hashicorp-kms.md
+++ b/docs/content/preview/yugabyte-platform/security/create-kms-config/hashicorp-kms.md
@@ -188,19 +188,31 @@ You can create a new KMS configuration that uses HashiCorp Vault as follows:
1. Optionally, to confirm that the information is correct, click **Show details**. Note that sensitive configuration values are displayed partially masked.
-## Modify a KMS configuration
+## Replace an expiring token
-You can modify an existing KMS configuration as follows:
+If a KMS configuration uses a token for authentication, and that token cannot be infinitely renewed, you should replace the token before it expires (that is, reaches its TTL). You can also create a new policy, or switch to using an AppRole.
-1. Navigate to **Integrations > Security > Encryption At Rest** to open a list of existing configurations.
+To replace a token, you create a new token for the existing policy in Vault, and add it to your KMS configuration in YugabyteDB Anywhere as follows:
+
+1. In Hashicorp Vault, create a token for your existing policy. For example:
+
+ ```shell
+ vault token create -no-default-policy -policy=trx
+ ```
+
+ If you want to change the policy, see the steps in [Configure Hashicorp Vault](#configure-hashicorp-vault).
+
+1. In YugabyteDB Anywhere, navigate to **Integrations > Security > Encryption At Rest** to open a list of existing configurations.
+
+1. Find the KMS configuration you want to modify and click its corresponding **Actions > Edit Configuration**.
-1. Find the configuration you want to modify and click its corresponding **Actions > Edit Configuration**.
+1. Set **Authentication Type** to **Token** and enter the token you obtained from the vault.
-1. Provide new values for the **Vault Address** and **Secret Token** fields.
+ To switch to using an AppRole, set **Authentication Type** to **AppRole** and enter the credentials as appropriate.
1. Click **Save**.
-1. Optionally, to confirm that the information is correct, click **Show details** or **Actions > Details**.
+To confirm that the information is correct, click **Show details** or **Actions > Details**.
## Delete a KMS configuration
@@ -208,4 +220,4 @@ You can modify an existing KMS configuration as follows:
Without a KMS configuration, you would longer be able to decrypt universe keys that were encrypted using the master key in the KMS configuration. Even after a key is rotated out of service, it may still be needed to decrypt data in backups and snapshots that were created while it was active. For this reason, you can only delete a KMS configuration if it has never been used by any universes.
{{}}
-To delete a KMS configuration, click its corresponding **Actions > Delete Configuration**.
+To delete a KMS configuration, navigate to **Integrations > Security > Encryption At Rest** to open a list of existing configurations and click its corresponding **Actions > Delete Configuration**.
diff --git a/docs/content/preview/yugabyte-voyager/migrate/assess-migration.md b/docs/content/preview/yugabyte-voyager/migrate/assess-migration.md
index dd06aebe5f68..1e2f27cebbdb 100644
--- a/docs/content/preview/yugabyte-voyager/migrate/assess-migration.md
+++ b/docs/content/preview/yugabyte-voyager/migrate/assess-migration.md
@@ -137,7 +137,7 @@ For the most accurate migration assessment, the source database must be actively
## Assess a fleet of databases (Oracle only)
-Use the Bulk Assessment command ([assess-migration-bulk](../reference/assess-migration/#assess-migration-bulk)) to assess multiple schemas across one or more database instances simultaneously. It offers:
+Use the Bulk Assessment command ([assess-migration-bulk](../../reference/assess-migration/#assess-migration-bulk)) to assess multiple schemas across one or more database instances simultaneously. It offers:
- Multi-Schema Assessment: Assess multiple schemas in different database instances with a single command, simplifying migration planning.
- Centralized Reporting: All assessment reports are generated and stored in one organized directory, making
diff --git a/docs/content/stable/api/ycql/type_jsonb.md b/docs/content/stable/api/ycql/type_jsonb.md
index 41eb97ab5d4b..e594d484c843 100644
--- a/docs/content/stable/api/ycql/type_jsonb.md
+++ b/docs/content/stable/api/ycql/type_jsonb.md
@@ -241,6 +241,6 @@ Note that JSONB upsert only works for JSON objects and not for other data types
## See also
-- [Explore JSON documents](../../../develop/learn/data-types-ycql/#jsonb)
+- [Explore JSON documents](../../../explore/ycql-language/jsonb-ycql)
- [Data types](..#data-types)
- [Secondary indexes with JSONB](../../../explore/ycql-language/indexes-constraints/secondary-indexes-with-jsonb-ycql/)
diff --git a/docs/content/stable/architecture/design-goals.md b/docs/content/stable/architecture/design-goals.md
index cb3463306bd3..777b73cf809f 100644
--- a/docs/content/stable/architecture/design-goals.md
+++ b/docs/content/stable/architecture/design-goals.md
@@ -76,7 +76,7 @@ YugabyteDB has been designed with operational simplicity in mind, providing feat
## Heterogeneous workload support
-Depending on the use case, the database may need to support diverse workloads, such as [transactional processing](../../benchmark/tpcc/), [analytical queries](../../sample-data/retail-analytics/), [real-time data ingestion](/preview/tutorials/azure/azure-event-hubs/), [time-series](../../develop/common-patterns/timeseries/), and [key-value](../../benchmark/key-value-workload-ycql/) workloads.
+Depending on the use case, the database may need to support diverse workloads, such as [transactional processing](../../benchmark/tpcc/), [analytical queries](../../sample-data/retail-analytics/), [real-time data ingestion](/preview/tutorials/azure/azure-event-hubs/), [time-series](../../develop/data-modeling/common-patterns/timeseries/), and [key-value](../../benchmark/key-value-workload-ycql/) workloads.
## Transaction isolation levels
diff --git a/docs/content/stable/deploy/multi-dc/async-replication/async-transactional-setup-dblevel.md b/docs/content/stable/deploy/multi-dc/async-replication/async-transactional-setup-dblevel.md
index 574a2ea02547..3a91fb51de26 100644
--- a/docs/content/stable/deploy/multi-dc/async-replication/async-transactional-setup-dblevel.md
+++ b/docs/content/stable/deploy/multi-dc/async-replication/async-transactional-setup-dblevel.md
@@ -88,7 +88,7 @@ To set up unidirectional transactional replication, do the following:
Checkpointing of yugabyte completed. Bootstrap is not required for setting up xCluster replication
```
-1. If needed, perform a full copy of the database on the Primary to the Standby using distributed backup and restore. See [Distributed snapshots for YSQL](../../../manage/backup-restore/snapshot-ysql/). Otherwise, create the necessary schema objects (tables and indexes) on the Standby.
+1. If needed, perform a full copy of the database on the Primary to the Standby using distributed backup and restore. See [Distributed snapshots for YSQL](../../../../manage/backup-restore/snapshot-ysql/). Otherwise, create the necessary schema objects (tables and indexes) on the Standby.
1. Set up the xCluster replication group.
@@ -117,7 +117,7 @@ list_xcluster_outbound_replication_groups [namespace_id]
You should see output similar to the following:
```output
-1 Outbound Replication Groups found:
+1 Outbound Replication Groups found:
[repl_group1]
```
@@ -132,7 +132,7 @@ list_universe_replications [namespace_id]
You should see output similar to the following:
```output
-1 Universe Replication Groups found:
+1 Universe Replication Groups found:
[repl_group1]
```
diff --git a/docs/content/stable/develop/_index.md b/docs/content/stable/develop/_index.md
index 6b10512223dc..ee96a1d598fb 100644
--- a/docs/content/stable/develop/_index.md
+++ b/docs/content/stable/develop/_index.md
@@ -8,60 +8,74 @@ image: /images/section_icons/index/develop.png
type: indexpage
---
-{{}}
-
- {{}}
-
- {{}}
-
- {{}}
-
- {{}}
-
- {{}}
-
- {{}}
-
- {{}}
-
- {{}}
-
- {{}}
-
-{{}}
+## Data modeling
+
+Although YugabyteDB is fully SQL compatible, modeling data for a distributed database is quite different from modeling for a monolithic database like MySQL or PostgreSQL. This is because the table data is distributed across different nodes. You must understand how to model your data for efficient storage and retrieval from a distributed system.
+
+{{}}
+To understand how to model your data for YugabyteDB, see [Distributed data modeling](./data-modeling/).
+{{}}
+
+## Global applications
+
+Today's applications have to cater to users distributed across the globe. Running applications across multiple data centers while providing the best user experience is no trivial task. Yugabyte provides some battle-tested design patterns for your global applications.
+
+{{}}
+To learn more about building global applications, see [Build global applications](./build-global-apps/).
+{{}}
+
+## Multi-cloud applications
+
+A multi-cloud strategy provides the flexibility to use the optimal computing environment for each specific workload, helps avoid vendor lock-in, lets you place data close to the users, and can minimize cost by choosing optimal pricing and performance of various cloud providers. You can also opt for a hybrid model as your path to migration onto the cloud.
+
+{{}}
+To understand how to build a multi-cloud setup with YugabyteDB, see [Build multi-cloud applications](./multi-cloud/).
+{{}}
+
+## Application development
+
+Although building scalable applications on top of YugabyteDB is straightforward, you need to understand certain fundamental concepts like transactions, search, and more to make the best use of them.
+
+{{}}
+To learn how to build applications on top of YugabyteDB, see [Learn app development](./learn/).
+{{}}
+
+## Best practices
+
+Use these best practices to build distributed applications on top of YugabyteDB; this includes a list of techniques that you can adopt to make your application perform its best.
+
+{{}}
+For more details, see [Best practices](./best-practices-ysql).
+{{}}
+
+## Drivers and ORMs
+
+To communicate with YugabyteDB, applications need to use drivers. Applications can also be built using Object-Relational mappings, a technique used to communicate with the database using object-oriented techniques. We've tested various drivers and ORMs in multiple languages with the optimal configurations to get your applications up and running.
+
+{{}}
+For the list of drivers and ORMs with sample code, see [Drivers and ORMs](../drivers-orms/).
+{{}}
+
+## Quality of service
+
+Although YugabyteDB can scale horizontally when needed, it also includes safety measures and settings such as rate-limiting, admission control, transaction priorities, and more, to ensure applications can maintain a high quality of service for all users when the systems comes under heavy load.
+
+{{}}
+To learn more about how to use rate-limiting and other features, see [Quality of service](./quality-of-service/).
+{{}}
+
+## Cloud-native development
+
+Cloud-native development refers to building and running applications that fully exploit the advantages of cloud computing without needing to install any software on your development machine. Two prominent tools for cloud-native development environments are Gitpod and GitHub Codespaces. Both provide cloud-based development environments, but they have their own features and use cases.
+
+{{}}
+To learn more about how to use browser-based IDEs, see [Cloud-native development](./gitdev/).
+{{}}
+
+## Tutorials
+
+Yugabyte provides multiple step-by-step guides for building scalable and fault-tolerant applications with YugabyteDB using your favorite programming language, services, and frameworks, including Kafka, Gen-AI, and more.
+
+{{}}
+For step-by-step guides for various frameworks, see [Tutorials](/preview/tutorials/).
+{{}}
diff --git a/docs/content/stable/develop/common-patterns/timeseries/_index.md b/docs/content/stable/develop/common-patterns/timeseries/_index.md
deleted file mode 100644
index d9f6f09a6538..000000000000
--- a/docs/content/stable/develop/common-patterns/timeseries/_index.md
+++ /dev/null
@@ -1,45 +0,0 @@
----
-title: Time series data model
-headerTitle: Time series data model
-linkTitle: Time series
-description: Explore the Time series data model
-headcontent: Handle large amounts of data ordered by time
-menu:
- stable:
- identifier: common-patterns-timeseries
- parent: common-patterns
- weight: 100
-type: indexpage
----
-
-Time series data are measurements or events that are tracked and monitored over time. This could be server metrics, application performance monitoring, network data, sensor data, events, clicks, trades in a market, and many other types of analytics data. A time series data model is designed specifically for handling large amounts of data that are ordered by time.
-
-Although YugabyteDB is hash sharded by default, it also supports range sharding, where the data is ordered and split at specific boundaries.
-
-A time series pattern works best for range queries where you need to look up items in a given time range.
-
-You can use the following common patterns to store and retrieve time series data in YugabyteDB in both distributed and ordered manner:
-
-- **Global ordering by time**
-
- In this pattern, all your data is ordered by time across different tablets.
-
- To understand how to efficiently store and retrieve data in this pattern, see [Global ordering by time](./global-ordering).
-
-- **Ordering by time per entity**
-
- In this pattern, the data is ordered by time in a specific entity.
-
- To understand how to distribute the entities effectively and avoid hot shards, see [Ordering by time per entity](./ordering-by-entity).
-
-- **Automatic data expiration**
-
- In some scenarios, you don't want data lying around for a long time as they may not be needed or you have rules in your organization that you cannot store specific data longer than a particular duration. For such cases, you can set a time-to-live value on rows, columns, and the table itself.
-
- For more details, see [Automatic data expiration](./data-expiry).
-
-- **Partitioning**
-
- When you have a lot of data that needs to deleted regularly, you can opt to partition your data. This also has speed advantages in some cases.
-
- For more details, see [Partitioning by time](./partitioning-by-time).
diff --git a/docs/content/stable/develop/data-modeling/_index.md b/docs/content/stable/develop/data-modeling/_index.md
new file mode 100644
index 000000000000..d480c150fb68
--- /dev/null
+++ b/docs/content/stable/develop/data-modeling/_index.md
@@ -0,0 +1,62 @@
+---
+title: Distributed Data modeling
+linkTitle: Data modeling
+description: Learn to develop YugabyteDB applications
+image: fa-sharp fa-light fa-objects-column
+menu:
+ stable:
+ identifier: data-modeling
+ parent: develop
+ weight: 100
+type: indexpage
+---
+
+Data modeling is the process of defining the structure, organization, and relationships of data in a database. In a distributed SQL database, this process becomes even more crucial due to the complexities introduced by data distribution, replication, and consistency. To fully leverage the benefits offered by YugabyteDB, you need to approach data modeling with a distributed mindset. Data modeling for distributed SQL databases requires a careful balance of theoretical principles and practical considerations.
+
+## Organization
+
+In YugabyteDB, data is stored as rows and columns in tables; tables are organized under schemas and databases.
+
+{{}}
+To understand how to create and manage tables, schemas, and databases, see [Schemas and tables](../../explore/ysql-language-features/databases-schemas-tables).
+{{}}
+
+## Sharding
+
+In YugabyteDB, table data is split into tablets, and distributed across multiple nodes in the cluster. Applications can connect to any node for storing and retrieving data. Because reads and writes can span multiple nodes, it's crucial to consider how table data is sharded and distributed when modeling your data. To design your tables and indexes for fast retrieval and storage in YugabyteDB, you first need to understand the [data distribution](../../explore/going-beyond-sql/data-sharding) schemes: Hash and Range sharding.
+
+{{}}
+To learn more about data distribution schemes, see [Configurable data sharding](../../explore/going-beyond-sql/data-sharding).
+{{}}
+
+## Primary keys
+
+The primary key is the unique identifier for each row in the table. The distribution and ordering of table data depends on the primary key.
+
+{{}}
+To design optimal primary keys for your tables, see [Primary keys](./primary-keys-ysql).
+{{}}
+
+## Secondary indexes
+
+Indexes provide alternate access patterns for queries not involving the primary key of the table. With the help of an index, you can improve the access operations of your queries.
+
+{{}}
+To design optimal indexes for faster lookup, see [Secondary indexes](./secondary-indexes-ysql).
+{{}}
+
+## Hot shards
+
+In distributed systems, a hot-spot or hot-shard refers to a node that is overloaded with queries due to disproportionate traffic compared to other nodes in the cluster.
+
+{{}}
+To understand the hot-shard problem and solutions to overcome the issue, see [Hot shards](./hot-shards-ysql).
+{{}}
+
+## Table partitioning
+
+When the data in tables keep growing, you can partition the tables for better performance and enhanced data management. Partitioning also makes it easier to drop older data by dropping partitions. In YugabyteDB, you can also use partitioning with Tablespaces to improve latency in multi-region scenarios and adhere to data residency laws like GDPR.
+
+{{}}
+To understand partitioning in YugabyteDB, see [Table partitioning](./partitioning).
+{{}}
diff --git a/docs/content/stable/develop/common-patterns/_index.md b/docs/content/stable/develop/data-modeling/common-patterns/_index.md
similarity index 92%
rename from docs/content/stable/develop/common-patterns/_index.md
rename to docs/content/stable/develop/data-modeling/common-patterns/_index.md
index fdc69cb30b26..1cb61f861a79 100644
--- a/docs/content/stable/develop/common-patterns/_index.md
+++ b/docs/content/stable/develop/data-modeling/common-patterns/_index.md
@@ -8,8 +8,8 @@ image: /images/section_icons/architecture/distributed_acid.png
menu:
stable:
identifier: common-patterns
- parent: develop
- weight: 400
+ parent: data-modeling
+ weight: 600
type: indexpage
showRightNav: true
---
@@ -35,7 +35,9 @@ A good example would be the speed sensor in a car that tracks the speed of a car
An insurance company could use the data to investigate accidents or an automobile company could track various sensors and improve the performance of the car. This could amount to billions of data points.
+{{}}
For more information on storing and retrieving such vast amounts of ordered data in YugabyteDB, see [Time series data model](./timeseries).
+{{}}
## Key-value
@@ -50,13 +52,17 @@ user2.name = "Harry Potter"
user2.country = "UK"
```
-Key-value stores are expected to be some of the fastest storage data models. For more information on using YugabyteDB for key-value stores, see [Key-value data model](./keyvalue).
+Key-value stores are expected to be some of the fastest storage data models.
+
+{{}}
+For more information on using YugabyteDB for key-value stores, see [Key-value data model](./keyvalue).
+{{}}
## Wide-column
In a wide-column data model, the data is organized as rows and columns. Each row is identified by a row `id` or `name` and each column is identified by a column `id` or `name`. Each row can have any number of columns attached to it. You can visualize it as a table-like structure where some of the cells are empty. For example:
-```sql{.nocopy}
+```caddyfile{.nocopy}
| | col-1 | col-2 | col-3 |
| ----- | ----- | ----- | ----- |
| row-1 | a | | c |
@@ -66,7 +72,7 @@ In a wide-column data model, the data is organized as rows and columns. Each row
To retrieve specific cells, you can issue commands similar to the following:
-```sql{.nocopy}
+```python{.nocopy}
get(row-1, col-3) ==> c
get(row-3, col-2) ==> NULL
```
diff --git a/docs/content/stable/develop/common-patterns/keyvalue.md b/docs/content/stable/develop/data-modeling/common-patterns/keyvalue.md
similarity index 94%
rename from docs/content/stable/develop/common-patterns/keyvalue.md
rename to docs/content/stable/develop/data-modeling/common-patterns/keyvalue.md
index 0139def2b3c1..a99aff285714 100644
--- a/docs/content/stable/develop/common-patterns/keyvalue.md
+++ b/docs/content/stable/develop/data-modeling/common-patterns/keyvalue.md
@@ -22,8 +22,8 @@ With these three simple functionalities, key-value stores have carved themselves
YugabyteDB provides several advantages when used as a key-value store:
-- YugabyteDB internally [stores data](../../../architecture/docdb/) as a collection of key-value pairs and therefore automatically excels as a key-value store.
-- Being [distributed by design](../../../architecture/transactions/distributed-txns/), YugabyteDB also naturally acts as a distributed key-value store.
+- YugabyteDB internally [stores data](../../../../architecture/docdb/data-model/) as a collection of key-value pairs and therefore automatically excels as a key-value store.
+- Being [distributed by design](../../../../architecture/transactions/distributed-txns/), YugabyteDB also naturally acts as a distributed key-value store.
- YugabyteDB inherently provides consistency of data because of Raft replication, which is typically not guaranteed by other key-value stores.
## Use cases
@@ -36,7 +36,6 @@ YugabyteDB provides several advantages when used as a key-value store:
1. **Shopping cart** : A user's shopping cart can be represented as a JSON or Hstore and stored under a key (for example, `user1.cart`). Given the strong consistency and resilience offered by YugabyteDB, the cart information will not be lost even in case of disasters.
-
## Simple scenario
Consider a scenario where you want to store multiple details related to users like `id`, `name`, `country`. For this, you could adopt a simple key-value schema where each attribute is a separate key, such as the following where the key contains both the `id` and the attribute name while the value is the value of the attribute, like:
@@ -234,4 +233,4 @@ you will notice that the `name` attribute has been removed for user `id=1`.
## Learn more
- [Hstore](https://www.postgresql.org/docs/11/hstore.html)
-- [Json](../../../explore/ysql-language-features/jsonb-ysql/)
\ No newline at end of file
+- [Json](../../../../explore/ysql-language-features/jsonb-ysql/)
\ No newline at end of file
diff --git a/docs/content/stable/develop/data-modeling/common-patterns/timeseries/_index.md b/docs/content/stable/develop/data-modeling/common-patterns/timeseries/_index.md
new file mode 100644
index 000000000000..a70478bc3c06
--- /dev/null
+++ b/docs/content/stable/develop/data-modeling/common-patterns/timeseries/_index.md
@@ -0,0 +1,53 @@
+---
+title: Time series data model
+headerTitle: Time series data model
+linkTitle: Time series
+description: Explore the Time series data model
+headcontent: Handle large amounts of data ordered by time
+menu:
+ stable:
+ identifier: common-patterns-timeseries
+ parent: common-patterns
+ weight: 100
+type: indexpage
+---
+
+Time series data are measurements or events that are tracked and monitored over time. This could be server metrics, application performance monitoring, network data, sensor data, events, clicks, trades in a market, and many other types of analytics data. A time series data model is designed specifically for handling large amounts of data that are ordered by time.
+
+Although YugabyteDB is hash sharded by default, it also supports range sharding, where the data is ordered and split at specific boundaries.
+
+A time series pattern works best for range queries where you need to look up items in a given time range.
+
+You can use the following common patterns to store and retrieve time series data in YugabyteDB in both distributed and ordered manner:
+
+## Global ordering by time
+
+In this pattern, all your data is ordered by time across different tablets.
+
+{{}}
+To understand how to efficiently store and retrieve data in this pattern, see [Global ordering by time](./global-ordering).
+{{}}
+
+## Ordering by time per entity
+
+In this pattern, the data is ordered by time in a specific entity.
+
+{{}}
+To understand how to distribute the entities effectively and avoid hot shards, see [Ordering by time per entity](./ordering-by-entity).
+{{}}
+
+## Automatic data expiration
+
+In some scenarios, you don't want data lying around for a long time as they may not be needed or you have rules in your organization that you cannot store specific data longer than a particular duration. For such cases, you can set a time-to-live value on rows, columns, and the table itself.
+
+{{}}
+For more details, see [Automatic data expiration](./data-expiry).
+{{}}
+
+## Partitioning
+
+When you have a lot of data that needs to be deleted regularly, you can opt to partition your data. This also has speed advantages in some cases.
+
+{{}}
+For more details, see [Partitioning by time](./partitioning-by-time).
+{{}}
diff --git a/docs/content/stable/develop/common-patterns/timeseries/data-expiry.md b/docs/content/stable/develop/data-modeling/common-patterns/timeseries/data-expiry.md
similarity index 93%
rename from docs/content/stable/develop/common-patterns/timeseries/data-expiry.md
rename to docs/content/stable/develop/data-modeling/common-patterns/timeseries/data-expiry.md
index f9de3570ac1c..adc6990f1506 100644
--- a/docs/content/stable/develop/common-patterns/timeseries/data-expiry.md
+++ b/docs/content/stable/develop/data-modeling/common-patterns/timeseries/data-expiry.md
@@ -4,6 +4,7 @@ headerTitle: Automatic data expiration
linkTitle: Automatic data expiration
description: Expire data using the `USING TTL` operator
headcontent: Expire data using time-to-live
+badges: ycql
menu:
stable:
identifier: timeseries-automatic-expiration
@@ -15,7 +16,7 @@ type: docs
Consider a scenario where you only need the last few values and the older data is not of any value and can be purged. Typically, this requires setting up a separate background job. Using YugabyteDB however, you can set an expiration value for columns using the `USING TTL` operator.
{{}}
-TTL-based expiration is only available in [YCQL](../../../../api/ycql/).
+TTL-based expiration is only available in [YCQL](/{{}}/api/ycql/).
{{}}
## Setup
@@ -99,8 +100,8 @@ Note that the row is present but the value for the `speed` column is `null`.
Instead of explicitly setting the TTL at the row or column level, you can set a TTL on the table. This also has the benefit of saving space as the TTL value is stored in only one place and not per row or column.
-Define table-level TTL using the [default_time_to_live property](../../../../api/ycql/ddl_create_table/#table-properties-1).
+Define table-level TTL using the [default_time_to_live property](/{{}}/api/ycql/ddl_create_table/#table-properties-1).
## Learn more
-- [TTL for data expiration](../../../learn/ttl-data-expiration-ycql/)
\ No newline at end of file
+- [TTL for data expiration](/{{}}/develop/learn/ttl-data-expiration-ycql/)
\ No newline at end of file
diff --git a/docs/content/stable/develop/common-patterns/timeseries/global-ordering.md b/docs/content/stable/develop/data-modeling/common-patterns/timeseries/global-ordering.md
similarity index 99%
rename from docs/content/stable/develop/common-patterns/timeseries/global-ordering.md
rename to docs/content/stable/develop/data-modeling/common-patterns/timeseries/global-ordering.md
index 8a6e897d4203..92dfa290ff78 100644
--- a/docs/content/stable/develop/common-patterns/timeseries/global-ordering.md
+++ b/docs/content/stable/develop/data-modeling/common-patterns/timeseries/global-ordering.md
@@ -4,6 +4,7 @@ headerTitle: Global ordering by time
linkTitle: Global ordering by time
description: Distribute your time-ordered data and retrieve data efficiently
headcontent: Distribute time-ordered data and retrieve data efficiently
+badges: ysql
menu:
stable:
identifier: timeseries-global-ordering
diff --git a/docs/content/stable/develop/common-patterns/timeseries/ordering-by-entity.md b/docs/content/stable/develop/data-modeling/common-patterns/timeseries/ordering-by-entity.md
similarity index 99%
rename from docs/content/stable/develop/common-patterns/timeseries/ordering-by-entity.md
rename to docs/content/stable/develop/data-modeling/common-patterns/timeseries/ordering-by-entity.md
index 7dafc460e358..784617b00660 100644
--- a/docs/content/stable/develop/common-patterns/timeseries/ordering-by-entity.md
+++ b/docs/content/stable/develop/data-modeling/common-patterns/timeseries/ordering-by-entity.md
@@ -4,6 +4,7 @@ headerTitle: Order by time per entity
linkTitle: Ordering by time per entity
description: Keep entity data together using Entity-wise or Bucket-based ordering
headcontent: Keep entity data together in a time series data model
+badges: ysql
menu:
stable:
identifier: timeseries-entity-ordering
diff --git a/docs/content/stable/develop/common-patterns/timeseries/partitioning-by-time.md b/docs/content/stable/develop/data-modeling/common-patterns/timeseries/partitioning-by-time.md
similarity index 95%
rename from docs/content/stable/develop/common-patterns/timeseries/partitioning-by-time.md
rename to docs/content/stable/develop/data-modeling/common-patterns/timeseries/partitioning-by-time.md
index 7b0d2b36070d..7a1b479b290a 100644
--- a/docs/content/stable/develop/common-patterns/timeseries/partitioning-by-time.md
+++ b/docs/content/stable/develop/data-modeling/common-patterns/timeseries/partitioning-by-time.md
@@ -4,6 +4,9 @@ headerTitle: Partition data by time
linkTitle: Partition data by time
description: Partition data for efficient data management
headcontent: Partition data for efficient data management
+badges: ysql
+aliases:
+ - /preview/common-patterns/timeseries/partitioning-by-time/
menu:
stable:
identifier: timeseries-partition-by-time
@@ -17,7 +20,7 @@ Partitioning refers to splitting what is logically one large table into smaller
The following example describes the advantages of partitions in more detail.
{{}}
-Partitioning is only available in [YSQL](../../../../api/ysql/).
+Partitioning is only available in [YSQL](/{{}}/api/ysql/).
{{}}
## Setup
@@ -140,4 +143,4 @@ Time: 103.214 ms
## Learn more
-- [Table partitioning](../../../../explore/ysql-language-features/advanced-features/partitions/)
+- [Table partitioning](/{{}}/explore/ysql-language-features/advanced-features/partitions/)
diff --git a/docs/content/stable/develop/data-modeling/hot-shards-ysql.md b/docs/content/stable/develop/data-modeling/hot-shards-ysql.md
new file mode 100644
index 000000000000..c0bc7c59b920
--- /dev/null
+++ b/docs/content/stable/develop/data-modeling/hot-shards-ysql.md
@@ -0,0 +1,129 @@
+---
+title: Avoiding hotspots in YugabyteDB
+headertitle: Avoiding hotspots
+linkTitle: Hot shards
+badges: ysql
+menu:
+ stable:
+ identifier: data-modeling-hot-shard
+ parent: data-modeling
+ weight: 300
+type: docs
+---
+
+A hot shard is a common problem in data retrieval where a specific node becomes a performance bottleneck due to disproportionately high traffic or workload compared to other nodes in the system. This imbalance can lead to various issues, such as degraded system performance, increased latency, and potential system failures.
+
+This typically happens because of mismatches between query pattern and data distribution. You should be careful when choosing a primary key in the schema design to not accidentally create hotspots in your database.
+
+{{}}
+The hot shard issue can occur both for tables and indexes.
+{{}}
+
+Let us understand the problem and the solution to this via some examples.
+
+
+{{}}
+
+{{}}
+
+
+For illustration, create a census table as follows.
+
+```sql
+CREATE TABLE census(
+ id int,
+ name varchar(255),
+ age int,
+ zipcode int,
+ employed boolean,
+ PRIMARY KEY(id ASC)
+)
+```
+
+Add some data to the table as follows.
+
+```sql
+INSERT INTO public.census ( id,name,age,zipcode,employed ) VALUES
+ (1,'Zachary',55,94085,True), (2,'James',56,94085,False), (3,'Kimberly',50,94084,False),
+ (4,'Edward',56,94085,True), (5,'Barry',56,94084,False), (6,'Tyler',45,94084,False),
+ (7,'Nancy',47,94085,False), (8,'Sarah',52,94084,True), (9,'Nancy',59,94084,False),
+ (10,'Diane',51,94083,False), (11,'Ashley',42,94083,False), (12,'Jacqueline',58,94085,False),
+ (13,'Benjamin',49,94084,False), (14,'James',48,94083,False), (15,'Ann',43,94083,False),
+ (16,'Aimee',47,94085,True), (17,'Michael',49,94085,False), (18,'Rebecca',40,94085,False),
+ (19,'Kevin',45,94085,True), (20,'James',45,94084,False), (21,'Sandra',60,94085,False),
+ (22,'Kathleen',40,94085,True), (23,'William',42,94084,False), (24,'James',42,94083,False),
+ (25,'Tyler',50,94085,False), (26,'James',49,94085,True), (27,'Kathleen',55,94083,True),
+ (28,'Zachary',55,94083,True), (29,'Rebecca',41,94085,True), (30,'Jacqueline',49,94085,False),
+ (31,'Diane',48,94083,False), (32,'Sarah',53,94085,True), (33,'Rebecca',55,94083,True),
+ (34,'William',47,94085,False), (35,'William',60,94085,True), (36,'Sarah',53,94085,False),
+ (37,'Ashley',47,94084,True), (38,'Ashley',54,94084,False), (39,'Benjamin',42,94083,False),
+ (40,'Tyler',47,94085,True), (41,'Michael',42,94084,False), (42,'Diane',50,94084,False),
+ (43,'Nancy',51,94085,False), (44,'Rebecca',56,94085,False), (45,'Tyler',41,94085,True);
+```
+
+
+
+## Ordering of columns
+
+Consider a scenario where you want to look up people with a specific name, say `Michael` in `94085`. For this, a good index would be the following:
+
+```sql
+create index idx_zip3 on census(zipcode ASC, name ASC) include(id);
+```
+
+The query would be as follows:
+
+```sql
+select id from census where zipcode=94085 AND name='Michael';
+```
+
+This results in an output similar to the following:
+
+```yaml{.nocopy}
+ id
+----
+ 17
+(1 row)
+```
+
+Now consider a scenario where zip code 94085 is very popular and the target of many queries (say there was an election or a disaster in that area). As the index is distributed based on `zipcode`, everyone in zip code 94085 will end up located in the same tablet; as a result, all the queries will end up reading from that one tablet. In other words, this tablet has become hot. To avoid this, you can distribute the index on name instead of zip code, as follows:
+
+```sql
+drop index if exists idx_zip3;
+create index idx_zip3 on census(name ASC, zipcode ASC) include(id);
+```
+
+This swaps the order of columns in the index. The result is the index being distributed/ordered on name first, and then ordered on zip code. Now when many queries have the same zip code, the queries are handled by different tablets. This is because the names being looked up will be different and will be located on different tablets.
+
+{{}}
+Consider swapping the order of columns to avoid hot shards.
+{{}}
+
+## Distribution on more columns
+
+Suppose you choose to distribute your index based on hash sharding so that all citizens in the same zip code are located in the same tablet. Your index might look like the following:
+
+```sql{.nocopy}
+create index idx_zip4 on census(zipcode HASH, name ASC) include(id);
+```
+
+Now when you look up a specific person in a certain zip code (say, `zipcode=94085 AND name='Michael'`), the lookup is made on just one node. But this node could become hot if there are too many lookups for that zip code.
+
+To fix this, add `name` into the sharding part of the index as follows:
+
+```sql
+create index idx_zip4 on census((zipcode,name) HASH) include(id);
+```
+
+Now the index data for the same zip code would be distributed across multiple tablets, as the `name` columns is also part of the sharding scheme.
+
+{{}}
+In the case of hash sharding, consider adding more columns to the sharding part to avoid hot shards.
+{{}}
diff --git a/docs/content/stable/develop/data-modeling/partitioning.md b/docs/content/stable/develop/data-modeling/partitioning.md
new file mode 100644
index 000000000000..0258edb2606f
--- /dev/null
+++ b/docs/content/stable/develop/data-modeling/partitioning.md
@@ -0,0 +1,45 @@
+---
+title: Partitioning tables in YugabyteDB
+headertitle: Partitioning tables
+linkTitle: Partitioning tables
+badges: ysql
+menu:
+ stable:
+ identifier: data-modeling-partitions
+ parent: data-modeling
+ weight: 500
+type: docs
+---
+
+
+[Data partitioning](../../../explore/ysql-language-features/advanced-features/partitions) refers to the process of dividing a large table or dataset into smaller physical partitions based on certain criteria or rules. This technique offers several benefits, including improved performance, easier data management, and better use of storage resources. Each partition is internally a table. This scheme is useful for managing large volumes of data and particularly for dropping older data.
+
+### Manage large datasets
+
+You can manage large data volumes by partitioning based on time (say by day, week, month, and so on) to make it easier to drop old data, especially when you want to retain only the recent data.
+
+![Table partitioning](/images/develop/data-modeling/table-partitioning.png)
+
+{{}}
+To understand how large data can be partitioned for easier management, see [Partitioning data by time](../common-patterns/timeseries/partitioning-by-time).
+{{}}
+
+### Place data closer to users
+
+When you want to improve latency for local users when your users are spread across a large geography, partition your data according to where big clusters of users are located, and place their data in regions closer to them using [tablespaces](../../../explore/going-beyond-sql/tablespaces). Users will end up talking to partitions closer to them.
+
+![East and west applications](/images/develop/global-apps/latency-optimized-geo-partition-final.png)
+
+{{}}
+To understand how to partition and place data closer to users for improved latency, see [Latency-optimized geo-partitioning](../../build-global-apps/latency-optimized-geo-partition).
+{{}}
+
+### Adhere to compliance laws
+
+You can partition your data according to the user's citizenship and place their data in the boundaries of their respective nations to be compliant with data residency laws like [GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation).
+
+![User data stored within their country's boundaries](/images/develop/global-apps/locality-optimized-geo-partition-goal.png)
+
+{{}}
+To understand how to partition data to be compliant with data residency laws, see [Locality-optimized geo-partitioning](../../build-global-apps/locality-optimized-geo-partition).
+{{}}
diff --git a/docs/content/stable/develop/data-modeling/primary-keys-ycql.md b/docs/content/stable/develop/data-modeling/primary-keys-ycql.md
new file mode 100644
index 000000000000..9ec19ba3bb51
--- /dev/null
+++ b/docs/content/stable/develop/data-modeling/primary-keys-ycql.md
@@ -0,0 +1,226 @@
+---
+title: Designing optimal primary keys in YugabyteDB
+headerTitle: Designing optimal primary keys
+linkTitle: Primary keys
+badges: ycql
+menu:
+ stable:
+ identifier: data-modeling-pk-ycql
+ parent: data-modeling
+ weight: 100
+type: docs
+---
+
+{{}}
+
+The Primary key is a column or a set of columns that uniquely identifies a row, such as a user ID or order number. You should choose the primary key based on the most common access pattern. Columns of data type [string](../../../explore/ycql-language/data-types/#strings), [number](../../../explore/ycql-language/data-types/#numeric-types), [serial](../../../explore/ysql-language-features/data-types/#serial-pseudotype), or [UUID](../../../explore/ycql-language/data-types/#universally-unique-id-types) make good choices for primary keys.
+
+## Automatically generate the primary key
+
+The best way to uniquely identify a record is to allow the database to assign a unique identifier to the row. YugabyteDB supports multiple schemes for generating identifiers that you can choose based on the needs of your application.
+
+### UUID
+
+A UUID is a 128-bit number represented as a string of 36 characters, including hyphens. For example, `4b6aa2ff-53e6-44f5-8bd0-ef9de90a8095`. YugabyteDB natively supports [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) generation as per [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122) via the uuid-ossp extension. UUIDs have several advantages:
+
+- The likelihood of generating duplicate UUIDs is extremely low.
+- UUIDs can be independently generated on different nodes in the cluster without any coordination with other systems.
+- The randomness of UUIDs makes it hard to predict the next ID, providing an additional layer of security.
+
+You can add a UUID to your schema as follows:
+
+```sql
+create keyspace if not exists yugabyte;
+use yugabyte;
+
+drop table if exists users;
+create table users (
+ id uuid,
+ name text,
+ primary key (id)
+);
+```
+
+Insert some rows into the table:
+
+```sql
+insert into users (id, name) values (uuid(), 'John Wick');
+insert into users (id, name) values (uuid(), 'Iron Man');
+insert into users (id, name) values (uuid(), 'Harry Potter');
+insert into users (id, name) values (uuid(), 'Kack Sparrow');
+```
+
+Select all the rows from the table:
+
+```cql
+select * from users;
+```
+
+Notice how the generated IDs are totally random.
+
+```cql{.nocopy}
+ id | name
+--------------------------------------+--------------
+ 85a17586-317f-4ef1-b5dd-582a13ccc832 | Harry Potter
+ b431bb80-b20d-42fe-900d-fed295de507a | Kack Sparrow
+ 7abae478-532c-40aa-9f81-42e85750fe01 | John Wick
+ 2a151214-272d-4448-af3e-a343f434fa68 | Iron Man
+```
+
+### TimeUUID
+
+[TimeUUID](../../../api/ycql/type_uuid/) is a special type of UUID that has a time factor integrated into it so the generated UUIDs have an order associated with them. They can be generated using the `now()` function. To do this, first create a table as follows:
+
+```cql
+create keyspace if not exists yugabyte;
+use yugabyte;
+
+drop table if exists users;
+create table users (
+ id timeuuid,
+ name text,
+ primary key(id)
+);
+```
+
+Insert some rows into the table:
+
+```sql
+insert into users (id, name) values (now(), 'John Wick');
+insert into users (id, name) values (now(), 'Iron Man');
+insert into users (id, name) values (now(), 'Harry Potter');
+insert into users (id, name) values (now(), 'Kack Sparrow');
+```
+
+Select all the rows from the table:
+
+```cql
+select * from users;
+```
+
+The generated ids are not very random:
+
+```cql{.nocopy}
+ id | name
+--------------------------------------+--------------
+ 19f24446-2904-11ef-917b-6bf61abbc06e | Iron Man
+ 13dc1460-2904-11ef-917b-6bf61abbc06e | John Wick
+ 1a3f8ac6-2904-11ef-917b-6bf61abbc06e | Kack Sparrow
+ 19f29720-2904-11ef-917b-6bf61abbc06e | Harry Potter
+```
+
+## Existing columns as primary keys
+
+To illustrate how to choose existing columns as primary keys, first create a sample census schema.
+
+
+{{}}
+
+{{}}
+{{}}
+
+{{}}
+{{}}
+
+{{}} {{}} {{}}
+{{}}
+
+
+Create a census table as follows:
+
+```sql
+CREATE TABLE census(
+ id int,
+ name varchar,
+ age int,
+ zipcode int,
+ employed boolean,
+ PRIMARY KEY(id)
+);
+```
+
+Add some data to the table as follows.
+
+```cql
+INSERT INTO census (id,name,age,zipcode,employed) VALUES (1,'Zachary',55,94085,True);
+INSERT INTO census (id,name,age,zipcode,employed) VALUES (2,'James',56,94085,False);
+INSERT INTO census (id,name,age,zipcode,employed) VALUES (3,'Kimberly',50,94084,False);
+INSERT INTO census (id,name,age,zipcode,employed) VALUES (4,'Edward',56,94085,True);
+INSERT INTO census (id,name,age,zipcode,employed) VALUES (5,'Barry',56,94084,False);
+INSERT INTO census (id,name,age,zipcode,employed) VALUES (6,'Tyler',45,94084,False);
+INSERT INTO census (id,name,age,zipcode,employed) VALUES (7,'James',47,94085,False);
+INSERT INTO census (id,name,age,zipcode,employed) VALUES (8,'Sarah',52,94084,True);
+INSERT INTO census (id,name,age,zipcode,employed) VALUES (9,'James',59,94084,False);
+INSERT INTO census (id,name,age,zipcode,employed) VALUES (10,'Diane',51,94083,False);
+```
+
+
+
+### ID as the primary key
+
+In the `census` table, the most likely way to look up a person is by their `id`, so the primary key has been set to `id`. This means that the data is distributed based on ID. This works well for point lookups on ID. For example, to look up ID 9, you can do the following:
+
+```sql
+select * from census where id=9;
+```
+
+You will see output similar to the following:
+
+```yaml{.nocopy}
+ id | name | age | zipcode | employed
+----+-------+-----+---------+----------
+ 9 | Nancy | 59 | 94084 | False
+```
+
+One row matching ID 9 was quickly fetched with just one request.
+
+### Name as the primary key
+
+Suppose your most common lookup is based on the name. In this case you would make the name column part of the primary key. Because the name alone may not be unique enough to be the primary key (the primary key has to be unique), you can choose a primary key with both name and ID as follows:
+
+```sql
+CREATE TABLE census2(
+ id int,
+ name varchar,
+ age int,
+ zipcode int,
+ employed boolean,
+ PRIMARY KEY(name, id)
+) WITH CLUSTERING ORDER BY id ASC;
+```
+
+```cql
+INSERT INTO census2 (id,name,age,zipcode,employed) VALUES (1,'Zachary',55,94085,True);
+INSERT INTO census2 (id,name,age,zipcode,employed) VALUES (2,'James',56,94085,False);
+INSERT INTO census2 (id,name,age,zipcode,employed) VALUES (3,'Kimberly',50,94084,False);
+INSERT INTO census2 (id,name,age,zipcode,employed) VALUES (4,'Edward',56,94085,True);
+INSERT INTO census2 (id,name,age,zipcode,employed) VALUES (5,'Barry',56,94084,False);
+INSERT INTO census2 (id,name,age,zipcode,employed) VALUES (6,'Tyler',45,94084,False);
+INSERT INTO census2 (id,name,age,zipcode,employed) VALUES (7,'James',47,94085,False);
+INSERT INTO census2 (id,name,age,zipcode,employed) VALUES (8,'Sarah',52,94084,True);
+INSERT INTO census2 (id,name,age,zipcode,employed) VALUES (9,'James',59,94084,False);
+INSERT INTO census2 (id,name,age,zipcode,employed) VALUES (10,'Diane',51,94083,False);
+```
+
+When specifying the primary key, the `name` column is specified first, and `id` second. This ensures that the data is stored sorted based on `name` first, and for all matching names, the `id` is stored sorted in ascending order, ensuring all people with the same name will be stored in the same tablet. This allows you to do a fast lookup on `name` even though `(name, id)` is the primary key.
+
+Retrieve all the people with the name James as follows:
+
+```sql
+select * from census2 where name = 'James';
+```
+
+You will see output similar to the following:
+
+```tablegen{.nocopy}
+ name | id | age | zipcode | employed
+-------+----+-----+---------+----------
+ James | 2 | 56 | 94085 | False
+ James | 7 | 47 | 94085 | False
+ James | 9 | 59 | 94084 | False
+(5 rows)
+```
+
+There are 3 people named James, and all of them can be quickly looked up as the data has been distributed by name.
+
+Notice that the rows are ordered by id. This is because you specified `CLUSTERING ORDER BY id ASC` to ensure that the rows with the same name will be stored ordered in the order of the `id` column.
diff --git a/docs/content/stable/develop/data-modeling/primary-keys-ysql.md b/docs/content/stable/develop/data-modeling/primary-keys-ysql.md
new file mode 100644
index 000000000000..06a41c5a1a7d
--- /dev/null
+++ b/docs/content/stable/develop/data-modeling/primary-keys-ysql.md
@@ -0,0 +1,222 @@
+---
+title: Designing optimal primary keys in YugabyteDB
+headerTitle: Designing optimal primary keys
+linkTitle: Primary keys
+badges: ysql
+menu:
+ stable:
+ identifier: data-modeling-pk
+ parent: data-modeling
+ weight: 100
+type: docs
+---
+
+{{}}
+
+The Primary key is a column or a set of columns that uniquely identifies a row, such as a user ID or order number. You should choose the primary key based on the most common access pattern. Columns of data type [string](../../../explore/ycql-language/data-types/#strings), [number](../../../explore/ycql-language/data-types/#numeric-types), [serial](../../../explore/ysql-language-features/data-types/#serial-pseudotype), or [UUID](../../../explore/ycql-language/data-types/#universally-unique-id-types) make good choices for primary keys.
+
+## Automatically generating the primary key
+
+The best way to uniquely identify a record is to allow the database to assign a unique identifier to the row. YugabyteDB supports multiple schemes for generating identifiers that you can choose based on the needs of your application.
+
+### UUID
+
+A UUID is a 128-bit number represented as a string of 36 characters, including hyphens. For example, `4b6aa2ff-53e6-44f5-8bd0-ef9de90a8095`. YugabyteDB natively supports [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) generation as per [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122) via the uuid-ossp extension. UUIDs have several advantages:
+
+- The likelihood of generating duplicate UUIDs is extremely low.
+- UUIDs can be independently generated on different nodes in the cluster without any coordination with other systems.
+- The randomness of UUIDs makes it hard to predict the next ID, providing an additional layer of security.
+
+You can add a UUID to your schema as follows:
+
+```sql
+CREATE TABLE users (
+ id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
+ name TEXT
+);
+```
+
+The [DEFAULT](../../../api/ysql/the-sql-language/statements/ddl_create_table/#default) clause ensures that for every row inserted, a UUID is automatically generated and inserted along with the row.
+
+### Serial
+
+[Serial](../../../api/ysql/datatypes/type_serial/) is a special data type in YugabyteDB that creates an auto-incrementing integer column starting with `1`. It is essentially a shorthand for creating a sequence and using it as a default value for a column. You can choose between three types of serial data types depending on the needs of your application:
+
+- **SMALLSERIAL** - An integer column in the range of 1 to 32,767.
+- **SERIAL** - An integer column in the range of 1 to 2,147,483,647.
+- **BIGSERIAL** - An integer column in the range of 1 to 9,223,372,036,854,775,807.
+
+Serial can be used directly in table definitions to simplify the creation of auto-incrementing columns.
+
+```sql
+DROP TABLE IF EXISTS users;
+CREATE TABLE users (
+ id serial,
+ name TEXT,
+ PRIMARY KEY(id)
+);
+```
+
+For each row inserted into the table, an auto-incremented `id` value is automatically inserted along with the row.
+
+### Sequence
+
+A [sequence](../../../api/ysql/the-sql-language/statements/ddl_create_sequence/) is a database object that generates a sequence of unique numbers. Sequences are independent objects that can be associated with one or more tables or columns. Sequences offer more flexibility and control over auto-incrementing behavior. They can be created, managed, and used separately from table definitions. Sequences can be customized with different increment values, start values, minimum and maximum values, and cycle behavior.
+
+```sql
+CREATE SEQUENCE user_id_seq START 100 INCREMENT BY 100 CACHE 10000;
+
+DROP TABLE IF EXISTS users;
+CREATE TABLE users (
+ id INTEGER DEFAULT nextval('user_id_seq'),
+ name TEXT,
+ PRIMARY KEY(id)
+);
+```
+
+For every row inserted, user IDs are automatically generated as 100, 200,300, and so on.
+
+{{}}
+Use serial for basic use cases and opt for sequences when you need more control over the sequence behavior, need to share a sequence between multiple tables or columns, or require custom incrementing logic.
+{{}}
+
+## Existing columns as primary keys
+
+To illustrate how to choose existing columns as primary keys, first create a sample census schema.
+
+
+{{}}
+
+{{}}
+{{}}
+
+{{}}
+{{}}
+
+{{}} {{}} {{}}
+{{}}
+
+
+Create a census table as follows:
+
+```sql
+CREATE TABLE census(
+ id int,
+ name varchar(255),
+ age int,
+ zipcode int,
+ employed boolean,
+ PRIMARY KEY(id ASC)
+)
+```
+
+Add some data to the table as follows.
+
+```sql
+INSERT INTO public.census ( id,name,age,zipcode,employed ) VALUES
+ (1,'Zachary',55,94085,True), (2,'James',56,94085,False), (3,'Kimberly',50,94084,False),
+ (4,'Edward',56,94085,True), (5,'Barry',56,94084,False), (6,'Tyler',45,94084,False),
+ (7,'Nancy',47,94085,False), (8,'Sarah',52,94084,True), (9,'Nancy',59,94084,False),
+ (10,'Diane',51,94083,False), (11,'Ashley',42,94083,False), (12,'Jacqueline',58,94085,False),
+ (13,'Benjamin',49,94084,False), (14,'James',48,94083,False), (15,'Ann',43,94083,False),
+ (16,'Aimee',47,94085,True), (17,'Michael',49,94085,False), (18,'Rebecca',40,94085,False),
+ (19,'Kevin',45,94085,True), (20,'James',45,94084,False), (21,'Sandra',60,94085,False),
+ (22,'Kathleen',40,94085,True), (23,'William',42,94084,False), (24,'James',42,94083,False),
+ (25,'Tyler',50,94085,False), (26,'James',49,94085,True), (27,'Kathleen',55,94083,True),
+ (28,'Zachary',55,94083,True), (29,'Rebecca',41,94085,True), (30,'Jacqueline',49,94085,False),
+ (31,'Diane',48,94083,False), (32,'Sarah',53,94085,True), (33,'Rebecca',55,94083,True),
+ (34,'William',47,94085,False), (35,'William',60,94085,True), (36,'Sarah',53,94085,False),
+ (37,'Ashley',47,94084,True), (38,'Ashley',54,94084,False), (39,'Benjamin',42,94083,False),
+ (40,'Tyler',47,94085,True), (41,'Michael',42,94084,False), (42,'Diane',50,94084,False),
+ (43,'Nancy',51,94085,False), (44,'Rebecca',56,94085,False), (45,'Tyler',41,94085,True);
+```
+
+
+
+### ID as the primary key
+
+In the `census` table, the most likely way to look up a person is by their `id`, so the primary key has been set to `id ASC`. This means that the data is stored in ascending order of ID, ensuring contiguous IDs are mostly located in the same tablet. This works well for point lookups on ID and range scans on IDs. For example, to look up ID 9, you can do the following:
+
+```sql
+select * from census where id=9;
+```
+
+You will see output similar to the following:
+
+```yaml{.nocopy}
+ id | name | age | zipcode | employed
+----+-------+-----+---------+----------
+ 9 | Nancy | 59 | 94084 | f
+```
+
+One row matching ID 9 was quickly fetched with just one request. You can also do a quick range scan.
+
+```sql
+select * from census where id>=5 and id<=15;
+```
+
+You will see an output similar to the following:
+
+```tablegen{.nocopy}
+ id | name | age | zipcode | employed
+----+------------+-----+---------+----------
+ 5 | Barry | 56 | 94084 | f
+ 6 | Tyler | 45 | 94084 | f
+ 7 | Nancy | 47 | 94085 | f
+ 8 | Sarah | 52 | 94084 | t
+ 9 | Nancy | 59 | 94084 | f
+ 10 | Diane | 51 | 94083 | f
+ 11 | Ashley | 42 | 94083 | f
+ 12 | Jacqueline | 58 | 94085 | f
+ 13 | Benjamin | 49 | 94084 | f
+ 14 | James | 48 | 94083 | f
+ 15 | Ann | 43 | 94083 | f
+(11 rows)
+```
+
+11 rows were quickly retrieved as the data is stored sorted on the `id` column. So range scans are also fast.
+
+### Name as the primary key
+
+Suppose your most common lookup is based on the name. In this case you would make the `name` column part of the primary key. Because the name alone may not be unique enough to be the primary key (the primary key has to be unique), you can choose a primary key with both name and ID as follows:
+
+```sql
+CREATE TABLE census2(
+ id int,
+ name varchar(255),
+ age int,
+ zipcode int,
+ employed boolean,
+ PRIMARY KEY(name ASC, id ASC)
+);
+
+-- copy the same data into census2
+INSERT INTO census2 SELECT * FROM census;
+```
+
+When specifying the primary key, the `name` column is specified first, and `id` second. This ensures that the data is stored sorted based on `name` first, and for all matching names, the `id` is stored sorted in ascending order, ensuring all people with the same name will be stored in the same tablet. This allows you to do a fast lookup on `name` even though `(name, id)` is the primary key.
+
+Retrieve all the people with the name James as follows:
+
+```sql
+select * from census2 where name = 'James';
+```
+
+You will see output similar to the following:
+
+```tablegen{.nocopy}
+ id | name | age | zipcode | employed
+----+-------+-----+---------+----------
+ 2 | James | 56 | 94085 | f
+ 14 | James | 48 | 94083 | f
+ 20 | James | 45 | 94084 | f
+ 24 | James | 42 | 94083 | f
+ 26 | James | 49 | 94085 | t
+(5 rows)
+```
+
+There are 5 people named James, and all of them can be quickly looked up as the data has been sorted on name.
+
+{{}}
+The primary key was specified with `ASC` order. However, if the queries are going to retrieve data in descending order with `ORDER BY name DESC`, then it is better to match the same ordering in the primary key definition.
+{{}}
diff --git a/docs/content/stable/develop/data-modeling/secondary-indexes-ycql.md b/docs/content/stable/develop/data-modeling/secondary-indexes-ycql.md
new file mode 100644
index 000000000000..0db6c79a13ed
--- /dev/null
+++ b/docs/content/stable/develop/data-modeling/secondary-indexes-ycql.md
@@ -0,0 +1,179 @@
+---
+title: Designing secondary indexes in YugabyteDB
+headertitle: Designing secondary indexes
+linkTitle: Secondary indexes
+badges: ycql
+menu:
+ stable:
+ identifier: data-modeling-indexes-ycql
+ parent: data-modeling
+ weight: 200
+type: docs
+---
+
+{{}}
+
+The primary goal of an index is to enhance the performance of data retrieval operations on the data in the tables. Indexes are designed to quickly locate data without having to search every row in a database table and provide fast access for patterns other than that of the primary key of the table. In YugabyteDB, indexes are internally designed just like tables and operate as such. The main difference between a table and an index is that the primary key of the table has to be unique but it need not be unique for an index.
+
+{{}}
+In YugabyteDB, indexes are global and are implemented just like tables. They are split into tablets and distributed across the different nodes in the cluster. The sharding of indexes is based on the primary key of the index and is independent of how the main table is sharded and distributed. Indexes are not colocated with the base table.
+{{}}
+
+To illustrate secondary indexes, first create a sample census schema.
+
+
+{{}}
+
+{{}}
+{{}}
+
+{{}}
+{{}}
+
+{{}} {{}} {{}}
+{{}}
+
+
+Create a census table as follows:
+
+```sql
+create keyspace if not exists yugabyte;
+use yugabyte;
+
+drop table if exists census;
+CREATE TABLE census(
+ id int,
+ name varchar,
+ age int,
+ zipcode int,
+ employed boolean,
+ PRIMARY KEY(id)
+) WITH transactions = { 'enabled' : true };
+```
+
+{{}}
+To attach indexes to tables, the tables should be created with transactions enabled.
+{{}}
+
+Add some data to the table as follows.
+
+```sql
+INSERT INTO census (id,name,age,zipcode,employed) VALUES (1,'Zachary',55,94085,True);
+INSERT INTO census (id,name,age,zipcode,employed) VALUES (2,'James',56,94085,False);
+INSERT INTO census (id,name,age,zipcode,employed) VALUES (3,'Kimberly',50,94084,False);
+INSERT INTO census (id,name,age,zipcode,employed) VALUES (4,'Edward',56,94085,True);
+INSERT INTO census (id,name,age,zipcode,employed) VALUES (5,'Barry',56,94084,False);
+INSERT INTO census (id,name,age,zipcode,employed) VALUES (6,'Tyler',45,94084,False);
+INSERT INTO census (id,name,age,zipcode,employed) VALUES (7,'James',47,94085,False);
+INSERT INTO census (id,name,age,zipcode,employed) VALUES (8,'Sarah',52,94084,True);
+INSERT INTO census (id,name,age,zipcode,employed) VALUES (9,'James',59,94084,False);
+INSERT INTO census (id,name,age,zipcode,employed) VALUES (10,'Diane',51,94083,False);
+```
+
+
+
+## Basic index
+
+Suppose you need to look up the data based on the zip codes of the people in the census. You can fetch details with a query similar to the following:
+
+```sql
+select id,name from census where zipcode=94085;
+```
+
+This required a sequential scan of all the rows in the table. This is because the primary key of the table is `id`, and looking up by zip code requires a full scan. To avoid the full scan, create an index on `zipcode` so that the executor can quickly fetch the matching rows by looking at the index.
+
+```sql
+create index idx_zip on census(zipcode);
+```
+
+Now, for a query to get all the people in zip code 94085 as follows:
+
+```sql
+explain select id,name from census where zipcode=94085;
+```
+
+You will see an output like the following:
+
+```yaml{.nocopy}
+ Index Scan using yugabyte.idx_zip on yugabyte.census
+ Key Conditions: (zipcode = 94085)
+```
+
+The same 4 rows were fetched from the table, but much faster. This is because the planner uses the index to execute the query.
+
+## Covering index
+
+In the prior example, to retrieve the rows the index was first looked up, and then more columns (such as `name`) were fetched for the same rows from the table. This additional round trip to the table is needed because the columns are not present in the index. To avoid this, you can store the column along with the index as follows:
+
+```sql
+create index idx_zip2 on census(zipcode) include(name);
+```
+
+Now, for a query to get all people in zip code 94085 as follows:
+
+```sql
+explain select id,name from census where zipcode=94085;
+```
+
+You will see an output like the following:
+
+```yaml{.nocopy}
+ Index Only Scan using yugabyte.idx_zip2 on yugabyte.census
+ Key Conditions: (zipcode = 94085)
+```
+
+This is an index-only scan, which means that all the data required by the query has been fetched from the index. This is also why there was no entry for Table Read Requests.
+
+{{}}
+When an index contains all the columns of the table, it is referred to as a Duplicate index.
+{{}}
+
+## Listing indexes
+
+You can list the indexes associated with a table using the following methods.
+
+### DESC command
+
+The `DESC TABLE
` command lists the indexes associated with a table along with the schema details.
+
+```cql
+DESC TABLE census;
+```
+
+The indexes are listed at the end of the output as follows:
+
+```cql{.nocopy}
+CREATE TABLE yugabyte.census (
+ id int PRIMARY KEY,
+ name text,
+ age int,
+ zipcode int,
+ employed boolean
+) WITH default_time_to_live = 0
+ AND transactions = {'enabled': 'true'};
+CREATE INDEX idx_zip2 ON yugabyte.census (zipcode, id) INCLUDE (name)
+ WITH transactions = {'enabled': 'true'};
+CREATE INDEX idx_zip ON yugabyte.census (zipcode, id)
+ WITH transactions = {'enabled': 'true'};
+```
+
+The `DESC INDEX ` command gives just the description of the specified index.
+
+```cql
+DESC INDEX idx_zip2;
+```
+
+The output includes the description of just the index as follows:
+
+```cql{.nocopy}
+CREATE INDEX idx_zip2 ON yugabyte.census (zipcode, id) INCLUDE (name)
+ WITH transactions = {'enabled': 'true'};
+```
+
+## Conclusion
+
+While primary keys are essential to ensure data uniqueness and facilitate efficient data distribution, secondary indexes provide the flexibility needed to optimize queries based on non-primary key columns. Using secondary indexes, applications can boost performance and provide a robust and scalable solution for managing large-scale, distributed datasets.
+
+## Learn more
+
+- [Explore indexes and constraints](../../../explore/ycql-language/indexes-constraints/)
diff --git a/docs/content/stable/develop/data-modeling/secondary-indexes-ysql.md b/docs/content/stable/develop/data-modeling/secondary-indexes-ysql.md
new file mode 100644
index 000000000000..f92e614cf2bb
--- /dev/null
+++ b/docs/content/stable/develop/data-modeling/secondary-indexes-ysql.md
@@ -0,0 +1,215 @@
+---
+title: Designing secondary indexes in YugabyteDB
+headertitle: Designing secondary indexes
+linkTitle: Secondary indexes
+badges: ysql
+menu:
+ stable:
+ identifier: data-modeling-indexes
+ parent: data-modeling
+ weight: 200
+type: docs
+---
+
+{{}}
+
+The primary goal of an index is to enhance the performance of data retrieval operations on the data in the tables. Indexes are designed to quickly locate data without having to search every row in a database table and provide fast access for patterns other than that of the primary key of the table. In YugabyteDB, indexes are internally designed just like tables and operate as such. The main difference between a table and an index is that the primary key of the table has to be unique but it need not be unique for an index.
+
+{{}}
+In YugabyteDB, indexes are global and are implemented just like tables. They are split into tablets and distributed across the different nodes in the cluster. The sharding of indexes is based on the primary key of the index and is independent of how the main table is sharded and distributed. Indexes are not colocated with the base table.
+{{}}
+
+To illustrate secondary indexes, first create a sample census schema.
+
+
+{{}}
+
+{{}}
+{{}}
+
+{{}}
+{{}}
+
+{{}} {{}} {{}}
+{{}}
+
+
+Create a census table as follows:
+
+```sql
+CREATE TABLE census(
+ id int,
+ name varchar(255),
+ age int,
+ zipcode int,
+ employed boolean,
+ PRIMARY KEY(id ASC)
+)
+```
+
+Add some data to the table as follows.
+
+```sql
+INSERT INTO public.census ( id,name,age,zipcode,employed ) VALUES
+ (1,'Zachary',55,94085,True), (2,'James',56,94085,False), (3,'Kimberly',50,94084,False),
+ (4,'Edward',56,94085,True), (5,'Barry',56,94084,False), (6,'Tyler',45,94084,False),
+ (7,'Nancy',47,94085,False), (8,'Sarah',52,94084,True), (9,'Nancy',59,94084,False),
+ (10,'Diane',51,94083,False), (11,'Ashley',42,94083,False), (12,'Jacqueline',58,94085,False),
+ (13,'Benjamin',49,94084,False), (14,'James',48,94083,False), (15,'Ann',43,94083,False),
+ (16,'Aimee',47,94085,True), (17,'Michael',49,94085,False), (18,'Rebecca',40,94085,False),
+ (19,'Kevin',45,94085,True), (20,'James',45,94084,False), (21,'Sandra',60,94085,False),
+ (22,'Kathleen',40,94085,True), (23,'William',42,94084,False), (24,'James',42,94083,False),
+ (25,'Tyler',50,94085,False), (26,'James',49,94085,True), (27,'Kathleen',55,94083,True),
+ (28,'Zachary',55,94083,True), (29,'Rebecca',41,94085,True), (30,'Jacqueline',49,94085,False),
+ (31,'Diane',48,94083,False), (32,'Sarah',53,94085,True), (33,'Rebecca',55,94083,True),
+ (34,'William',47,94085,False), (35,'William',60,94085,True), (36,'Sarah',53,94085,False),
+ (37,'Ashley',47,94084,True), (38,'Ashley',54,94084,False), (39,'Benjamin',42,94083,False),
+ (40,'Tyler',47,94085,True), (41,'Michael',42,94084,False), (42,'Diane',50,94084,False),
+ (43,'Nancy',51,94085,False), (44,'Rebecca',56,94085,False), (45,'Tyler',41,94085,True);
+```
+
+
+
+## Basic index
+
+Suppose you need to look up the data based on the zip codes of the people in the census. You can fetch details with a query similar to the following:
+
+```sql
+select id from census where zipcode=94085;
+```
+
+This required a sequential scan of all the rows in the table. This is because the primary key of the table is `id`, and looking up by zip code requires a full scan. To avoid the full scan, create an index on `zipcode` so that the executor can quickly fetch the matching rows by looking at the index.
+
+```sql
+create index idx_zip on census(zipcode ASC);
+```
+
+Now, for a query to get all the people in zip code 94085 as follows:
+
+```sql
+explain (analyze, dist, costs off) select id from census where zipcode=94085;
+```
+
+You will see an output like the following:
+
+```yaml{.nocopy}
+ Index Scan using idx_zip on public.census (actual time=3.273..3.295 rows=23 loops=1)
+ Output: id
+ Index Cond: (census.zipcode = 94085)
+ Storage Table Read Requests: 1
+ Storage Table Read Execution Time: 1.401 ms
+ Storage Table Rows Scanned: 23
+ Storage Index Read Requests: 1
+ Storage Index Read Execution Time: 1.529 ms
+ Storage Index Rows Scanned: 23
+...
+```
+
+The same 23 rows were fetched from the table, but much faster. This is because the planner uses the index to execute the query.
+
+## Covering index
+
+In the prior example, to retrieve the rows the index was first looked up, and then more columns were fetched for the same rows from the table. This additional round trip to the table is needed because the columns are not present in the index. To avoid this, you can store the column along with the index as follows:
+
+```sql
+create index idx_zip2 on census(zipcode ASC) include(id);
+```
+
+Now, for a query to get all people in zip code 94085 as follows:
+
+```sql
+explain (analyze, dist, costs off) select id from census where zipcode=94085;
+```
+
+You will see an output like the following:
+
+```yaml{.nocopy}
+ QUERY PLAN
+-------------------------------------------------------------------------------------
+ Index Only Scan using idx_zip2 on census (actual time=1.930..1.942 rows=23 loops=1)
+ Index Cond: (zipcode = 94085)
+ Storage Index Read Requests: 1
+ Storage Index Read Execution Time: 1.042 ms
+ Storage Index Rows Scanned: 23
+...
+```
+
+This is an index-only scan, which means that all the data required by the query has been fetched from the index. This is also why there was no entry for Table Read Requests.
+
+When an index contains all the columns of the table, it is referred to as a Duplicate index. Duplicate indexes can be used in multi-region deployments to reduce read latencies.
+
+{{}}
+See [Duplicate indexes](../../../develop/build-global-apps/duplicate-indexes/) for more details.
+{{}}
+
+## Listing indexes
+
+You can list the indexes associated with a table using the following methods.
+
+### \d+ meta command
+
+The `\d+
` meta command lists the indexes associated with a table along with the schema details.
+
+```sql
+\d+ census
+```
+
+The indexes are listed at the end of the output as follows:
+
+```yaml{.nocopy}
+ Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
+----------+------------------------+-----------+----------+---------+----------+--------------+-------------
+ id | integer | | not null | | plain | |
+ name | character varying(255) | | | | extended | |
+ age | integer | | | | plain | |
+ zipcode | integer | | | | plain | |
+ employed | boolean | | | | plain | |
+Indexes:
+ "census_pkey" PRIMARY KEY, lsm (id ASC)
+ "idx_zip" lsm (zipcode ASC)
+```
+
+### pg_indexes view
+
+You can also fetch more information about indexes using the [pg_indexes](../../../architecture/system-catalog#schema) view.
+
+```sql
+SELECT * FROM pg_indexes WHERE tablename = 'census' ;
+```
+
+This gives an output similar to the following:
+
+```yaml{.nocopy}
+ schemaname | tablename | indexname | tablespace | indexdef
+------------+-----------+-------------+------------+---------------------------------------------------------------------
+ public | census | census_pkey | null | CREATE UNIQUE INDEX census_pkey ON public.census USING lsm (id ASC)
+ public | census | idx_zip | null | CREATE INDEX idx_zip ON public.census USING lsm (zipcode ASC)
+```
+
+## Index usage
+
+It's a good idea to keep track of how well indexes are used by your applications so that you can evaluate and improve your indexes, and drop indexes that are not used. To get the usage statistics of the indexes of a table, you can execute the following command:
+
+```sql
+SELECT * FROM pg_stat_user_indexes WHERE relname = 'census';
+```
+
+This should give an output similar to the following:
+
+```yaml{.nocopy}
+ relid | indexrelid | schemaname | relname | indexrelname | idx_scan | idx_tup_read | idx_tup_fetch
+-------+------------+------------+---------+--------------+----------+--------------+---------------
+ 17227 | 17230 | public | census | census_pkey | 2 | 12 | 0
+ 17227 | 17237 | public | census | idx_zip | 2 | 24 | 0
+```
+
+You can get an idea of how many times the index was scanned and how many tuples were read from the index using this statistic.
+
+## Conclusion
+
+While primary keys are essential to ensure data uniqueness and facilitate efficient data distribution, secondary indexes provide the flexibility needed to optimize queries based on non-primary key columns. Using secondary indexes, applications can boost performance and provide a robust and scalable solution for managing large-scale, distributed datasets.
+
+## Learn more
+
+- [Use Explain Analyze to improve query performance](../../../explore/query-1-performance/explain-analyze)
+- [Explore indexes and constraints](../../../explore/ysql-language-features/indexes-constraints/)
diff --git a/docs/content/stable/develop/learn/_index.md b/docs/content/stable/develop/learn/_index.md
index a33d2913c63c..008655b545b9 100644
--- a/docs/content/stable/develop/learn/_index.md
+++ b/docs/content/stable/develop/learn/_index.md
@@ -11,159 +11,58 @@ menu:
type: indexpage
---
-
+## Transactions
+
+Transactions are a sequence of operations performed as a single logical unit of work. These operations can modify multiple tables or rows. Transactions are important to maintain data integrity when multiple users are modifying the same set of rows across tables. For example, credit and debit transactions in a bank account.
+
+{{}}
+To understand how to use transactions when developing applications, see [Transactions](./transactions/acid-transactions-ysql).
+{{}}
+
+## Text search
+
+YugabyteDB supports advanced text search schemes like similarity search, phonetic search, and full-text search, along with the standard pattern matching using the `LIKE` operator.
+
+{{}}
+To understand build advanced search functionalities into your applications, see [Text search](./text-search/).
+{{}}
+
+## Aggregations
+
+When performing analytical operations on your data, it is common to fetch aggregates like min, max, sum, average, and so on.
+
+{{}}
+To understand how to best use aggregates in your applications, see [Aggregations](./aggregations-ycql).
+{{}}
+
+## Batch operations
+
+Sometimes it's better to batch multiple statements into one request to avoid round trips to the server. In [YSQL](/{{}}/api/ysql), this can be done using [Stored Procedures](/{{}}/explore/ysql-language-features/stored-procedures/), which are not supported in the [YCQL](/{{}}/api/ycql) API.
+
+{{}}
+To understand how to best do batch operations in YCQL, see [Batch operations](./batch-operations-ycql).
+{{}}
+
+## Date and time
+
+Although date and time are common concepts, working with dates and times across various time zones can be quite a challenge.
+
+{{}}
+To understand how to use date and time data types effectively in your applications, see [Date and Time](./date-and-time-ysql).
+{{}}
+
+## Strings and text
+
+Text, string, and character data types are probably some of the most commonly used types when designing a schema. YugabyteDB provides an extensive suite of functionality to format and manipulate text data types.
+
+{{}}
+To learn how to use text, string, and character types effectively in applications, see [Strings and text](./strings-and-text-ysql).
+{{}}
+
+## Data expiration
+
+Cleaning up old, unwanted data can be a painful task. YugabyteDB supports Time-to-Live (TTL) functionality in the YCQL API which you can use to automatically purge old data and reduce storage costs.
+
+{{}}
+To understand how to use TTL in your YCQL applications, see [TTL for data expiration](./ttl-data-expiration-ycql).
+{{}}
diff --git a/docs/content/stable/develop/learn/data-modeling-ycql.md b/docs/content/stable/develop/learn/data-modeling-ycql.md
deleted file mode 100644
index 12b9720d2415..000000000000
--- a/docs/content/stable/develop/learn/data-modeling-ycql.md
+++ /dev/null
@@ -1,228 +0,0 @@
----
-title: Data modeling in YCQL
-headerTitle: Data modeling
-linkTitle: Data modeling
-description: Learn data modeling in YCQL and how to identify the patterns used to access data and the types of queries to be performed.
-menu:
- stable:
- identifier: data-modeling-ycql
- parent: learn
- weight: 110
-type: docs
----
-
-{{}}
-
-Data modeling is a process that involves identifying the entities (items to be stored) and the relationships between entities. To create your data model, identify the patterns used to access data and the types of queries to be performed. These two ideas inform the organization and structure of the data, and the design and creation of the database's tables.
-
-This topic documents data modeling with [Yugabyte Cloud Query Language (YCQL)](../../../api/ycql/), YugabyteDB's Cassandra-compatible API.
-
-## Keyspaces, tables, rows, and columns
-
-### Keyspaces
-
-Cassandra keyspaces are a collection of tables. They are analogous to SQL namespaces. Typically, each application creates all its tables in one keyspace.
-
-### Tables
-
-A table is a collection of data. A keyspace most often contains one or more tables. Each table is identified by a name. Tables have a set of columns and contain records (rows) with data. Tables can be created, dropped, and altered at runtime without blocking updates and queries.
-
-### Rows
-
-Each table contains multiple rows of data. A row is a set of columns that is uniquely identifiable among all of the other rows.
-
-### Columns
-
-Each row is composed of one or more columns. A column is a fundamental data element, and does not need to be broken down any further.
-
-As the example of a `users` table which holds information about users of a service.
-
-| user_id | firstname | lastname | address
-| -------- | --------- | -------- | --------
-| 1001 | Sherlock | Holmes | 221b Baker St, London, UK
-| 1003 | Clark | Kent | 344 Clinton Street, Metropolis
-| 1007 | James | Bond |
-
-Note the following about the `users` table:
-
-- Each row in the table has a unique value for the primary key column (`user_id`).
-- Other than the primary key, the `users` table has three other columns - `firstname`, `lastname`, `address` each of which is a string.
-- Some columns may have no data (for example, James Bond's address `address` is unknown). These have `null` values in the database.
-
-Now consider another example of the `books` table that keeps track of authors and the books they have written.
-
-| author | book_title | price | year | genre
-| -------------------- | -------------------- | ------ | ---- | -----
-| William Shakespeare | Hamlet | 6.75 | 1602 | tragedy
-| William Shakespeare | Macbeth | 7.50 | 1606 | tragedy
-| Charles Dickens | Oliver Twist | 9.25 | 1837 | serial novel
-| Charles Dickens | A Tale of Two Cities | 11.40 | 1859 | historical novel
-
-Note the following about the `books` table:
-
-- The primary key for this table consists of two columns - `author` and `book_title`. Each row in the table must have values for these two attributes, and the combination of these values must be unique.
-- Other than the primary key, the table has other columns such as `price`, `year`, `genre`.
-- The columns `author`, `book_title` and `genre` are string, `price` is a float, `year` is an integer.
-
-## Primary key
-
-When creating a table, the primary key of the table must be specified in addition to the table name. The primary key uniquely identifies each row in the table, therefore no two rows can have the same key.
-
-There are two components of primary keys, and they are described below.
-
-### Partition key columns (required)
-
-One or more columns of a table are made the partition key columns. The values of the partition key columns are used to compute an internal hash value. This hash value determines the tablet (or partition) in which the row will be stored. This has two implications:
-
-- Each unique set of partition key values is hashed and distributed across nodes randomly to ensure uniform utilization of the cluster.
-
-- All the data for a unique set of partition key values are always stored on the same node. This matters only if there are clustering key columns, which are described in the next section.
-
-In the case of the `users` table, you can make `user_id` column the only primary key column. This is a good choice for a partition key because our queries do not care about the order of the `user_id`s. If the table is split into a number of tablets (partitions), the data may be assigned as follows.
-
-| tablet | user_id | firstname | lastname | address
-| --------- | -------- | --------- | -------- | --------
-| tablet-22 | 1001 | Sherlock | Holmes | 221b Baker St, London, UK
-| tablet-4 | 1003 | Clark | Kent | 344 Clinton Street, Metropolis
-| tablet-17 | 1007 | James | Bond |
-
-### Clustering key columns (optional)
-
-The clustering columns specify the order in which the column data is sorted and stored on disk for a given unique partition key value. More than one clustering column can be specified, and the columns are sorted in the order they are declared in the clustering column. It is also possible to control the sort order (ascending or descending sort) for these columns. Note that the sort order respects the data type.
-
-In a table that has both partition keys and clustering keys, it is possible for two rows to have the same partition key value and therefore they end up on the same node. However, those rows must have different clustering key values in order to satisfy the primary key requirements. Tables without clustering key columns are said to have *simple primary keys*.
-
-In the case of the `books` table, `author` is a good partition key and `book_title` is a good clustering key. Such a data model would allow easily listing all the books for a given author, as well as look up details of a specific book. This would cause the data to be stored as follows.
-
-| tablet | author | book_title | price | year | genre
-| --------- | -------------------- | -------------------- | ------ | ---- | -----
-| tablet-15 | William Shakespeare | Hamlet | 6.75 | 1602 | tragedy
-| tablet-15 | William Shakespeare | Macbeth | 7.50 | 1606 | tragedy
-| tablet-21 | Charles Dickens | A Tale of Two Cities | 11.40 | 1859 | historical novel
-| tablet-21 | Charles Dickens | Oliver Twist | 9.25 | 1837 | serial novel
-
-Note that if you had made both `author` and `book_title` partition key columns, you would not be able to list all the books for a given author efficiently.
-
-**Note**
-
-- The partition key columns are also often referred to as its *hash columns*. This is because an internal hash function is used to distribute data items across tablets based on their partition key values.
-
-- The clustering key columns are also referred to as its **range columns**. This is because rows with the same partition key are stored on disk in sorted order by the clustering key value.
-
-## Secondary indexes
-
-A database index is a data structure that improves the speed of data retrieval operations on a database table. Typically, databases are very efficient at looking up data by the primary key. A secondary index can be created using one or more columns of a database table, and provides the basis for both rapid random lookups and efficient access of ordered records when querying by those columns. To achieve this, secondary indexes require additional writes and storage space to maintain the index data structure. YugabyteDB's secondary index support is documented in detail [here](../../../api/ycql/ddl_create_index/).
-
-### Benefits of secondary indexes
-
-Secondary indexes can be used to speed up queries and to enforce uniqueness of values in a column.
-
-#### Speed up queries
-
-The predominant use of a secondary index is to make lookups by some column values efficient. Let us take an example of a users table, where `user_id` is the primary key. Suppose we want to lookup `user_id` by the email of the user efficiently. You can achieve this as follows.
-
-```sql
-ycqlsh> CREATE KEYSPACE example;
-```
-
-```sql
-ycqlsh> CREATE TABLE example.users(
- user_id bigint PRIMARY KEY,
- firstname text,
- lastname text,
- email text
- ) WITH transactions = { 'enabled' : true };
-```
-
-```sql
-ycqlsh> CREATE INDEX user_by_email ON example.users (email)
- INCLUDE (firstname, lastname);
-```
-
-Next let us insert some data.
-
-```sql
-ycqlsh> INSERT INTO example.users (user_id, firstname, lastname, email)
- VALUES (1, 'James', 'Bond', 'bond@example.com');
-```
-
-```sql
-ycqlsh> INSERT INTO example.users (user_id, firstname, lastname, email)
- VALUES (2, 'Sherlock', 'Holmes', 'sholmes@example.com');
-```
-
-You can now query the table by the email of a user efficiently as follows.
-
-```sql
-ycqlsh> SELECT * FROM example.users WHERE email='bond@example.com';
-```
-
-Read more about using secondary indexes to speed up queries in this quick guide to YugabyteDB secondary indexes.
-
-### Enforce uniqueness of column values
-
-In some cases, you would need to ensure that duplicate values cannot be inserted in a column of a table. You can achieve this in YugabyteDB by creating a unique secondary index, where the application does not want duplicate values to be inserted into a column.
-
-```sql
-ycqlsh> CREATE KEYSPACE example;
-```
-
-```sql
-ycqlsh> CREATE TABLE example.users(
- user_id bigint PRIMARY KEY,
- firstname text,
- lastname text,
- email text
- ) WITH transactions = { 'enabled' : true };
-```
-
-```sql
-ycqlsh> CREATE UNIQUE INDEX unique_emails ON example.users (email);
-```
-
-Inserts would succeed as long as the email is unique.
-
-```sql
-ycqlsh> INSERT INTO example.users (user_id, firstname, lastname, email)
- VALUES (1, 'James', 'Bond', 'bond@example.com');
-```
-
-```sql
-ycqlsh> INSERT INTO example.users (user_id, firstname, lastname, email)
- VALUES (2, 'Sherlock', 'Holmes', 'sholmes@example.com');
-```
-
-But upon inserting a duplicate email, you get an error.
-
-```sql
-ycqlsh> INSERT INTO example.users (user_id, firstname, lastname, email)
- VALUES (3, 'Fake', 'Bond', 'bond@example.com');
-```
-
-```
-InvalidRequest: Error from server: code=2200 [Invalid query] message="SQL error: Execution Error. Duplicate value disallowed by unique index unique_emails
-```
-
-## Documents
-
-Documents are the most common way for storing, retrieving, and managing semi-structured data. Unlike the traditional relational data model, the document data model is not restricted to a rigid schema of rows and columns. The schema can be changed easily thus helping application developers write business logic faster than ever before. Instead of columns with names and data types that are used in a relational model, a document contains a description of the data type and the value for that description. Each document can have the same or different structure. Even nested document structures are possible where one or more sub-documents are embedded inside a larger document.
-
-Databases commonly support document data management through the use of a JSON data type. [JSON.org](http://www.json.org/) defines JSON (JavaScript Object Notation) to be a lightweight data-interchange format. It’s easy for humans to read and write. it’s easy for machines to parse and generate. JSON has four simple data types:
-
-- string
-- number
-- boolean
-- null (or empty)
-
-In addition, it has two core complex data types.
-
-- Collection of name-value pairs which is realized as an object, hash table, dictionary, or something similar depending on the language.
-- Ordered list of values which is realized as an array, vector, list or sequence depending on the language.
-
-Document data models are best fit for applications requiring a flexible schema and fast data access. For example, nested documents enable applications to store related pieces of information in the same database record in a denormalized manner. As a result, applications can issue fewer queries and updates to complete common operations.
-
-### Comparison with Apache Cassandra’s JSON support
-
-[Apache Cassandra’s JSON](http://cassandra.apache.org/doc/latest/cql/json.html) support can be misleading for many developers. YCQL allows `SELECT` and `INSERT` statements to include the `JSON` keyword. The `SELECT` output will now be available in the JSON format and the `INSERT` inputs can now be specified in the JSON format. However, this “JSON” support is simply an ease-of-use abstraction in the CQL layer that the underlying database engine is unaware of. Since there is no native JSON data type in CQL, the schema doesn’t have any knowledge of the JSON provided by the user. This means the schema definition doesn’t change nor does the schema enforcement. Cassandra developers needing native JSON support previously had no choice but to add a new document database such as MongoDB or Couchbase into their data tier.
-
-With YugabyteDB’s native JSON support using the [`JSONB`](../data-types-ycql/#jsonb) data type, application developers can now benefit from the structured query language of Cassandra and the document data modeling of MongoDB in a single database.
diff --git a/docs/content/stable/develop/learn/data-modeling-ysql.md b/docs/content/stable/develop/learn/data-modeling-ysql.md
deleted file mode 100644
index 7bb382651108..000000000000
--- a/docs/content/stable/develop/learn/data-modeling-ysql.md
+++ /dev/null
@@ -1,374 +0,0 @@
----
-title: YSQL data modeling in YugabyteDB
-headerTitle: Distributed SQL Data modeling
-linkTitle: Data modeling
-description: Learn data modeling in YSQL and how to identify the patterns used to access data and the types of queries to be performed.
-menu:
- stable:
- identifier: data-modeling-ysql
- parent: learn
- weight: 100
-type: docs
----
-
-{{}}
-
-Data modeling involves designing the database schema for efficient storage and access. In a distributed SQL database like YugabyteDB, table data is split into tablets and distributed across multiple nodes in the cluster, allowing applications to connect to any node for storing and retrieving data. Because reads and writes can span multiple nodes, it's crucial to consider how table data is partitioned and distributed when modeling your data.
-
-In YugabyteDB, data is stored as rows and columns in tables, which are organized under schemas and databases.
-
-{{}}
-To understand more about creating and managing tables, schemas, and databases, see [Schemas and tables](../../../explore/ysql-language-features/databases-schemas-tables).
-{{}}
-
-To design your tables and indexes for fast retrieval and storage in YugabyteDB, you first need to understand the two [data distribution](../../../explore/going-beyond-sql/data-sharding) schemes, Hash and Range sharding, in detail.
-
-In YugabyteDB, the sharding and ordering of data in the tables and indexes is governed by the primary key of the table and index respectively.
-
-## Cluster setup
-
-
-{{}}
-
-{{}}
-{{}}
-
-{{}}
-{{}}
-
-{{}} {{}} {{}}
-{{}}
-
-
-## Sample data
-
-For illustration, create a census table as follows.
-
-```sql
-CREATE TABLE census(
- id int,
- name varchar(255),
- age int,
- zipcode int,
- employed boolean,
- PRIMARY KEY(id ASC)
-) SPLIT AT VALUES ((10), (25));
-```
-
-For illustration purposes, the data is being explicitly split into three tablets. Normally this is not needed, as tablets are auto-split.
-
-Add some data to the table as follows.
-
-```sql
-INSERT INTO public.census ( id,name,age,zipcode,employed ) VALUES
- (1,'Zachary',55,94085,True), (2,'James',56,94085,False), (3,'Kimberly',50,94084,False),
- (4,'Edward',56,94085,True), (5,'Barry',56,94084,False), (6,'Tyler',45,94084,False),
- (7,'Nancy',47,94085,False), (8,'Sarah',52,94084,True), (9,'Nancy',59,94084,False),
- (10,'Diane',51,94083,False), (11,'Ashley',42,94083,False), (12,'Jacqueline',58,94085,False),
- (13,'Benjamin',49,94084,False), (14,'James',48,94083,False), (15,'Ann',43,94083,False),
- (16,'Aimee',47,94085,True), (17,'Michael',49,94085,False), (18,'Rebecca',40,94085,False),
- (19,'Kevin',45,94085,True), (20,'James',45,94084,False), (21,'Sandra',60,94085,False),
- (22,'Kathleen',40,94085,True), (23,'William',42,94084,False), (24,'James',42,94083,False),
- (25,'Tyler',50,94085,False), (26,'James',49,94085,True), (27,'Kathleen',55,94083,True),
- (28,'Zachary',55,94083,True), (29,'Rebecca',41,94085,True), (30,'Jacqueline',49,94085,False),
- (31,'Diane',48,94083,False), (32,'Sarah',53,94085,True), (33,'Rebecca',55,94083,True),
- (34,'William',47,94085,False), (35,'William',60,94085,True), (36,'Sarah',53,94085,False),
- (37,'Ashley',47,94084,True), (38,'Ashley',54,94084,False), (39,'Benjamin',42,94083,False),
- (40,'Tyler',47,94085,True), (41,'Michael',42,94084,False), (42,'Diane',50,94084,False),
- (43,'Nancy',51,94085,False), (44,'Rebecca',56,94085,False), (45,'Tyler',41,94085,True);
-```
-
-
-
-{{}}
-To explain the behavior of the queries, the examples use **explain (analyze, dist, costs off)**. In practice, you do not need to do this unless you are trying to optimize performance. For more details, see [Analyze queries](../../../explore/query-1-performance/explain-analyze).
-{{}}
-
-## Primary keys
-
-The Primary key is a column or a set of columns that uniquely identifies a row, such as a user ID or order number. The choice of primary key is very important as it defines how data is distributed and ordered when stored. You should choose the primary key based on the most common access pattern. Columns of data type [string](../../../explore/ysql-language-features/data-types/#strings), [number](../../../explore/ysql-language-features/data-types/#numeric-types), [serial](../../../explore/ysql-language-features/data-types/#serial-pseudotype), or [UUID](../../../api/ysql/datatypes/type_uuid/) make good choices for primary keys.
-
-Always specify the primary key when creating the table, as it could be an expensive operation to define a primary key after the data has been added because the table data has to be re-ordered.
-
-{{}}
-In the absence of an explicit primary key, YugabyteDB automatically inserts an internal **row_id** to be used as the primary key. This **row_id** is not accessible by users.
-{{}}
-
-### ID as the primary key
-
-In the `census` table, the most likely way to look up a person is by their `id`, so the primary key has been set to `id ASC`. This means that the data is stored in ascending order of ID, ensuring contiguous IDs are mostly located in the same tablet. This works well for point lookups on ID and range scans on IDs. For example, to look up ID 9, you can do the following:
-
-```sql
-explain (analyze, dist, costs off) select * from census where id=9;
-```
-
-You will see an output similar to the following:
-
-```yaml{.nocopy}
- QUERY PLAN
-----------------------------------------------------------------------------------
- Index Scan using census_pkey on census (actual time=2.814..2.820 rows=1 loops=1)
- Index Cond: (id = 9)
- Storage Table Read Requests: 1
- Storage Table Read Execution Time: 1.560 ms
- Storage Table Rows Scanned: 1
-...
-```
-
-One row matching ID 9 was fetched with just one request (`Storage Table Read Requests : 1`), as the system knows exactly where to look for that row. Also, only one row was scanned. But if you do a range scan for items across 2 tablets as follows:
-
-```sql
-explain (analyze, dist, costs off) select * from census where id>=9 and id<=10;
-```
-
-You will see an output similar to:
-
-```yaml{.nocopy}
- QUERY PLAN
-----------------------------------------------------------------------------------
- Index Scan using census_pkey on census (actual time=3.456..4.393 rows=11 loops=1)
- Index Cond: ((id >= 5) AND (id <= 15))
- Storage Table Read Requests: 2
- Storage Table Read Execution Time: 3.584 ms
- Storage Table Rows Scanned: 11
-...
-```
-
-Notice how there are two Table Read Requests. This is because the table was split at ID 10. Rows with an ID of 5 through 9 are in one tablet, while rows with ID 10 through 15 are in another, requiring two requests to be made.
-
-### Name as the primary key
-
-Suppose your most common lookup is based on the name. In this case you would make the name column part of the primary key. Because the name alone may not be unique enough to be the primary key (the primary key has to be unique), you can choose a primary key with both name and ID as follows:
-
-```sql
-CREATE TABLE census2(
- id int,
- name varchar(255),
- age int,
- zipcode int,
- employed boolean,
- PRIMARY KEY(name ASC, id ASC)
-) SPLIT AT VALUES (('H'), ('S'));
--- NOTE: Splitting only for demo
-
--- copy the same data into census2
-INSERT INTO census2 SELECT * FROM census;
-```
-
-Note how the `name` column is specified first, and `id` second. This ensures that the data is stored sorted based on `name` first, and for all matching names, the `id` will be stored sorted in ascending order, and all the people with the same name will be in the same tablet. This allows you to do a fast lookup on `name` even though `(name, id)` is the primary key. Retrieve all the people with the name James as follows:
-
-```sql
-explain (analyze, dist, costs off) select * from census2 where name = 'James';
-```
-
-You will see an output similar to the following:
-
-```yaml{.nocopy}
- QUERY PLAN
-------------------------------------------------------------------------------------
- Index Scan using census2_pkey on census2 (actual time=1.489..1.496 rows=5 loops=1)
- Index Cond: ((name)::text = 'James'::text)
- Storage Table Read Requests: 1
- Storage Table Read Execution Time: 1.252 ms
- Storage Table Rows Scanned: 5
-...
-```
-
-There are 5 people named James, and all of them are located in one tablet, requiring only one Table Read Request.
-
-If you do a range query as follows:
-
-```sql
-explain (analyze, dist, costs off) select * from census2 where name >= 'James' and name <='Michael';
-```
-
-You will see an output similar to the following:
-
-```yaml{.nocopy}
- QUERY PLAN
----------------------------------------------------------------------------------------
- Index Scan using census2_pkey on census2 (actual time=2.411..2.430 rows=11 loops=1)
- Index Cond: (((name)::text >= 'James'::text) AND ((name)::text <= 'Michael'::text))
- Storage Table Read Requests: 1
- Storage Table Read Execution Time: 2.010 ms
- Storage Table Rows Scanned: 11
-```
-
-Notice how only one Table Read Request is needed to fetch the results; all the results with names James, Kathleen, Kevin, Kimberly, and Michael are stored in the same tablet.
-
-{{}}
-The primary key was specified with `ASC` order. However, if the queries are going to retrieve data in descending order with `ORDER BY name DESC`, then it is better to match the same ordering in the primary key definition.
-{{}}
-
-## Secondary indexes
-
-The primary goal of an index is to enhance the performance of data retrieval operations on the data in the tables. Indexes are designed to quickly locate data without having to search every row in a database table and provide fast access for patterns other than that of the primary key of the table. In YugabyteDB, indexes are internally designed just like tables and operate as such. The main difference between a table and an index is that the primary key of the table has to be unique but it need not be unique for an index.
-
-Indexes can be created using the [CREATE INDEX](../../../api/ysql/the-sql-language/statements/ddl_create_index) statement, which has the following format:
-
-```sql{.nocopy}
-CREATE INDEX idx_name ON table_name
- ((columns), columns) INCLUDE (columns)
--- [SHARDING] [CLUSTERING] [COVERING]
-```
-
-The columns that are specified in the [CREATE INDEX](../../../api/ysql/the-sql-language/statements/ddl_create_index) statement are of three kinds:
-
-- **Sharding** - These columns determine how the index data is distributed.
-- **Clustering** - These optional columns determine how the index rows matching the same sharding key are ordered.
-- **Covering** - These are optional additional columns that are stored in the index to avoid a trip to the table.
-
-### Basic index
-
-Suppose you also need to look up the data based on the zip codes of the people in the census. You can fetch details with a query similar to the following:
-
-```sql
-explain (analyze, dist, costs off) select id from census where zipcode=94085;
-```
-
-For which you will get a query plan similar to the following:
-
-```yaml{.nocopy}
- QUERY PLAN
-----------------------------------------------------------------------
- Seq Scan on public.census (actual time=4.201..4.206 rows=23 loops=1)
- Output: id
- Remote Filter: (census.zipcode = 94085)
- Storage Table Read Requests: 1
- Storage Table Read Execution Time: 1.928 ms
- Storage Table Rows Scanned: 45
-```
-
-You will quickly notice that this required a sequential scan of all the rows in the table. This is because the primary key of the table is either `name` or `id`, and looking up by zip code requires a full scan. To avoid the full scan, you need to create an index on `zipcode` so that the executor can quickly fetch the matching rows by looking at the index.
-
-```sql
-create index idx_zip on census(zipcode ASC);
-```
-
-Now, for a query to get all the people in zip code 94085 as follows:
-
-```sql
-explain (analyze, dist, costs off) select id from census where zipcode=94085;
-```
-
-You will see an output like the following:
-
-```yaml{.nocopy}
- QUERY PLAN
--------------------------------------------------------------------------------------------
- Index Scan using idx_zip on public.census (actual time=3.273..3.295 rows=23 loops=1)
- Output: id
- Index Cond: (census.zipcode = 94085)
- Storage Table Read Requests: 1
- Storage Table Read Execution Time: 1.401 ms
- Storage Table Rows Scanned: 23
- Storage Index Read Requests: 1
- Storage Index Read Execution Time: 1.529 ms
- Storage Index Rows Scanned: 23
-...
-```
-
-The index was used to identify all rows matching `zipcode = 94085`. 23 rows were fetched from the index and the corresponding data for the 23 rows were fetched from the table.
-
-### Covering index
-
-In the prior example, to retrieve 23 rows the index was first looked up and then more columns were fetched for the same rows from the table. This additional round trip to the table is needed because the columns are not present in the index. To avoid this, you can store the column along with the index as follows:
-
-```sql
-create index idx_zip2 on census(zipcode ASC) include(id);
-```
-
-Now, for a query to get all the people in zip code 94085 as follows:
-
-```sql
-explain (analyze, dist, costs off) select id from census where zipcode=94085;
-```
-
-You will see an output like the following:
-
-```yaml{.nocopy}
- QUERY PLAN
--------------------------------------------------------------------------------------
- Index Only Scan using idx_zip2 on census (actual time=1.930..1.942 rows=23 loops=1)
- Index Cond: (zipcode = 94085)
- Storage Index Read Requests: 1
- Storage Index Read Execution Time: 1.042 ms
- Storage Index Rows Scanned: 23
-...
-```
-
-This has become an index-only scan, which means that all the data required by the query has been fetched from the index. This is also why there was no entry for Table Read Requests.
-
-## Hot shard or tablet
-
-A hot shard is a common problem in data retrieval where a specific node ends up handling most of the queries because of the query pattern and data distribution scheme.
-
-{{}}
-The hot shard issue can occur both for tables and indexes.
-{{}}
-
-Consider a scenario where you want to look up people with a specific name, say `Michael`, in `94085`. For this, a good index would be the following:
-
-```sql
-create index idx_zip3 on census(zipcode ASC, name ASC) include(id);
-```
-
-The query would be as follows:
-
-```sql
-explain (analyze, dist, costs off) select id from census where zipcode=94085 AND name='Michael';
-```
-
-This results in an output similar to the following:
-
-```yaml{.nocopy}
- QUERY PLAN
-------------------------------------------------------------------------------------
- Index Only Scan using idx_zip3 on census (actual time=1.618..1.620 rows=1 loops=1)
- Index Cond: ((zipcode = 94085) AND (name = 'Michael'::text))
- Heap Fetches: 0
- Storage Index Read Requests: 1
- Storage Index Read Execution Time: 0.970 ms
- Storage Index Rows Scanned: 1
-```
-
-Now consider a scenario where zip code 94085 is very popular and the target of many queries (say there was an election or a disaster in that area). As the index is distributed based on `zipcode`, everyone in zip code 94085 will end up located in the same tablet; as a result, all the queries will end up reading from that one tablet. In other words, this tablet has become hot. To avoid this, you can distribute the index on name instead of zip code, as follows:
-
-```sql
-drop index if exists idx_zip3;
-create index idx_zip3 on census(name ASC, zipcode ASC) include(id);
-```
-
-Notice that we have swapped the order of columns in the index. This results in the index being distributed/ordered on name first and then ordered on zip code. Now when many queries have the same zip code, the queries will be handled by different tablets as the names being looked up will be different and will be located on different tablets.
-
-{{}}
-Consider swapping the order of columns to avoid hot shards.
-{{}}
-
-## Partitioning
-
-[Data partitioning](../../../explore/ysql-language-features/advanced-features/partitions) refers to the process of dividing a large table or dataset into smaller physical partitions based on certain criteria or rules. This technique offers several benefits, including improved performance, easier data management, and better use of storage resources. Each partition is internally a table. This scheme is useful for managing large volumes of data and especially useful for dropping older data.
-
-### Manage large datasets
-
-You can manage large data volumes by partitioning based on time (say by day, week, month, and so on) to make it easier to drop old data, especially when you want to retain only the recent data.
-
-{{}}
-To understand how large data can be partitioned for easier management, see [Partitioning data by time](../../common-patterns/timeseries/partitioning-by-time).
-{{}}
-
-### Place data closer to users
-
-When you want to improve latency for local users when your users are spread across a large geography, partition your data according to where big clusters of users are located, and place their data in regions closer to them using [tablespaces](../../../explore/going-beyond-sql/tablespaces). Users will end up talking to partitions closer to them.
-
-{{}}
-To understand how to partition and place data closer to users for improved latency, see [Latency-optimized geo-partitioning](../../build-global-apps/latency-optimized-geo-partition).
-{{}}
-
-### Adhere to compliance laws
-
-You can partition your data according to the user's citizenship and place their data in the boundaries of their respective nations to be compliant with data residency laws like [GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation).
-
-{{}}
-To understand how to partition data to be compliant with data residency laws, see [Locality-optimized geo-partitioning](../../build-global-apps/locality-optimized-geo-partition).
-{{}}
diff --git a/docs/content/stable/develop/learn/data-types-ycql.md b/docs/content/stable/develop/learn/data-types-ycql.md
deleted file mode 100644
index d44f2d2b2996..000000000000
--- a/docs/content/stable/develop/learn/data-types-ycql.md
+++ /dev/null
@@ -1,208 +0,0 @@
----
-title: Data types in YCQL
-headerTitle: Data types in YCQL
-linkTitle: Data types
-description: Learn about the data types in YCQL.
-menu:
- stable:
- identifier: data-types-1-ycql
- parent: learn
- weight: 120
-type: docs
----
-
-{{}}
-
-This topic lists the various data types available in YugabyteDB's [Cassandra-compatible YCQL API](../../../api/ycql/).
-
-## JSONB
-
-There are a number of different serialization formats for JSON data, one of the popular formats being JSONB (JSON Better) to efficiently model document data.
-
-The YCQL API supports the [JSONB data type](../../../api/ycql/type_jsonb/) to parse, store, and query JSON documents natively. This data type is similar in query language syntax and functionality to the one supported by PostgreSQL. JSONB serialization allows for easy search and retrieval of attributes inside the document. This is achieved by storing all the JSON attributes in a sorted order, which allows for efficient binary search of keys. Similarly, arrays are stored such that random access for a particular array index into the serialized JSON document is possible. In addition, [DocDB](../../../architecture/docdb/), YugabyteDB's underlying storage engine, is document-oriented, which makes storing JSON data simpler than would otherwise be possible.
-
-Consider the example of an ecommerce application for an online bookstore. The database for such a bookstore needs to store details of various books, some of which may have custom attributes. The following example shows a JSON document that captures the details of a particular book, Macbeth by William Shakespeare.
-
-```json
-{
- "name":"Macbeth",
- "author":{
- "first_name":"William",
- "last_name":"Shakespeare"
- },
- "year":1623,
- "editors":[
- "John",
- "Elizabeth",
- "Jeff"
- ]
-}
-```
-
-### Create a table
-
-The books table for this bookstore can be modelled as follows. Assume that the ID of each book is an int, but this could be a string or a UUID.
-
-```cql
-ycqlsh> CREATE KEYSPACE store;
-```
-
-```cql
-ycqlsh> CREATE TABLE store.books ( id int PRIMARY KEY, details jsonb );
-```
-
-### Insert data
-
-Next, insert some sample data for a few books into this store as follows:
-
-```cql
-INSERT INTO store.books (id, details) VALUES (1,
- '{ "name" : "Macbeth",
- "author" : {"first_name": "William", "last_name": "Shakespeare"},
- "year" : 1623,
- "editors": ["John", "Elizabeth", "Jeff"] }'
-);
-INSERT INTO store.books (id, details) VALUES (2,
- '{ "name" : "Hamlet",
- "author" : {"first_name": "William", "last_name": "Shakespeare"},
- "year" : 1603,
- "editors": ["Lysa", "Mark", "Robert"] }'
-);
-INSERT INTO store.books (id, details) VALUES (3,
- '{ "name" : "Oliver Twist",
- "author" : {"first_name": "Charles", "last_name": "Dickens"},
- "year" : 1838,
- "genre" : "novel",
- "editors": ["Mark", "Tony", "Britney"] }'
-);
-INSERT INTO store.books (id, details) VALUES (4,
- '{ "name" : "Great Expectations",
- "author" : {"first_name": "Charles", "last_name": "Dickens"},
- "year" : 1950,
- "genre" : "novel",
- "editors": ["Robert", "John", "Melisa"] }'
-);
-INSERT INTO store.books (id, details) VALUES (5,
- '{ "name" : "A Brief History of Time",
- "author" : {"first_name": "Stephen", "last_name": "Hawking"},
- "year" : 1988,
- "genre" : "science",
- "editors": ["Melisa", "Mark", "John"] }'
-);
-```
-
-Note the following about the preceding book details:
-
-- The year attribute for each of the books is interpreted as an integer.
-- The first two books do not have a genre attribute, which the others do.
-- The author attribute is a map.
-- The editors attribute is an array.
-
-### Retrieve a subset of attributes
-
-Running the following `SELECT` query returns all attributes of each book:
-
-```cql
-ycqlsh> SELECT * FROM store.books;
-
-```
-
-The following query retrieves just the ID and name for all the books:
-
-```cql
-ycqlsh> SELECT id, details->>'name' as book_title FROM store.books;
-```
-
-```output
- id | book_title
-----+-------------------------
- 5 | A Brief History of Time
- 1 | Macbeth
- 4 | Great Expectations
- 2 | Hamlet
- 3 | Oliver Twist
-```
-
-### Query by attribute values - string
-
-The name attribute is a string in the book details JSON document. Run the following to query the details of the book named *Hamlet*.
-
-```cql
-ycqlsh> SELECT * FROM store.books WHERE details->>'name'='Hamlet';
-```
-
-```output
- id | details
-----+---------------------------------------------------------------
- 2 | {"author":{"first_name":"William","last_name":"Shakespeare"},
- "editors":["Lysa","Mark","Robert"],
- "name":"Hamlet","year":1603}
-```
-
-Note that you can query by attributes that exist only in some of the documents. For example, you can query for all books that have a genre of novel. Recall that not all books have a genre attribute defined.
-
-```cql
-ycqlsh> SELECT id, details->>'name' as title,
- details->>'genre' as genre
- FROM store.books
- WHERE details->>'genre'='novel';
-```
-
-```output
- id | title | genre
-----+--------------------+-------
- 4 | Great Expectations | novel
- 3 | Oliver Twist | novel
-```
-
-### Query by attribute values - integer
-
-The year attribute is an integer in the book details JSON document. Run the following to query the ID and name of books written after 1900:
-
-```cql
-ycqlsh> SELECT id, details->>'name' as title, details->>'year'
- FROM store.books
- WHERE CAST(details->>'year' AS integer) > 1900;
-```
-
-```output
- id | title | expr
-----+-------------------------+------
- 5 | A Brief History of Time | 1988
- 4 | Great Expectations | 1950
-```
-
-### Query by attribute values - map
-
-The author attribute is a map, which in turn consists of the attributes `first_name` and `last_name`. Fetch the IDs and titles of all books written by William Shakespeare as follows:
-
-```cql
-ycqlsh> SELECT id, details->>'name' as title,
- details->>'author' as author
- FROM store.books
- WHERE details->'author'->>'first_name' = 'William' AND
- details->'author'->>'last_name' = 'Shakespeare';
-```
-
-```output
- id | title | author
-----+---------+----------------------------------------------------
- 1 | Macbeth | {"first_name":"William","last_name":"Shakespeare"}
- 2 | Hamlet | {"first_name":"William","last_name":"Shakespeare"}
-```
-
-### Query by attribute Values - array
-
-The editors attribute is an array consisting of the first names of the editors of each of the books. You can query for the book titles where `Mark` is the first entry in the editors list as follows:
-
-```cql
-ycqlsh> SELECT id, details->>'name' as title,
- details->>'editors' as editors FROM store.books
- WHERE details->'editors'->>0 = 'Mark';
-```
-
-```output
- id | title | editors
-----+--------------+---------------------------
- 3 | Oliver Twist | ["Mark","Tony","Britney"]
-```
diff --git a/docs/content/stable/develop/learn/data-types-ysql.md b/docs/content/stable/develop/learn/data-types-ysql.md
deleted file mode 100644
index bce575692242..000000000000
--- a/docs/content/stable/develop/learn/data-types-ysql.md
+++ /dev/null
@@ -1,16 +0,0 @@
----
-title: Data types in YSQL
-headerTitle: Data types in YSQL
-linkTitle: Data types
-description: Learn about the data types in YSQL.
-menu:
- stable:
- identifier: data-types-2-ysql
- parent: learn
- weight: 120
-type: docs
-private: true
----
-
-
-{{}}
diff --git a/docs/content/stable/drivers-orms/csharp/_index.md b/docs/content/stable/drivers-orms/csharp/_index.md
index 1336b7df193b..2a8828150826 100644
--- a/docs/content/stable/drivers-orms/csharp/_index.md
+++ b/docs/content/stable/drivers-orms/csharp/_index.md
@@ -19,8 +19,8 @@ The following projects can be used to implement C# applications using the Yugaby
| Project | Documentation and Guides | Latest Driver Version | Supported YugabyteDB Version |
| :------ | :----------------------- | :-------------------- | :--------------------------- |
-| YugabyteDB C# Driver for YSQL [Recommended] | [Documentation](ysql/) [Reference](../../reference/drivers/csharp/yb-npgsql-reference/) | [8.0.3-yb-1](https://www.nuget.org/packages/NpgsqlYugabyteDB/) | 2.8 and later |
-| PostgreSQL Npgsql Driver | [Documentation](postgres-npgsql/) [Reference](../../reference/drivers/csharp/postgres-npgsql-reference/) | [6.0.3](https://www.nuget.org/packages/Npgsql/) | 2.6 and later |
+| YugabyteDB C# Driver for YSQL [Recommended] | [Documentation](ysql/) [Reference](yb-npgsql-reference/) | [8.0.3-yb-1](https://www.nuget.org/packages/NpgsqlYugabyteDB/) | 2.8 and later |
+| PostgreSQL Npgsql Driver | [Documentation](postgres-npgsql/) [Reference](postgres-npgsql-reference/) | [6.0.3](https://www.nuget.org/packages/Npgsql/) | 2.6 and later |
| YugabyteDB C# Driver for YCQL | [Documentation](ycql/) | [3.6.0](https://github.com/yugabyte/cassandra-csharp-driver/releases/tag/3.6.0) | |
| Project | Documentation and Guides | Example Apps |
@@ -30,16 +30,16 @@ The following projects can be used to implement C# applications using the Yugaby
Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations by referring to [Connect an app](ysql/) or [Use an ORM](entityframework/).
-For reference documentation, including using projects with SSL, refer to the [drivers and ORMs reference](../../reference/drivers/csharp/yb-npgsql-reference/) pages.
-
## Prerequisites
To develop C# applications for YugabyteDB, you need the following:
-- **.NET SDK**\
+- **.NET SDK**
+
Install .NET SDK 6.0 or later. To download it for your supported OS, visit [Download .NET](https://dotnet.microsoft.com/en-us/download).
-- **Create a C# project**\
+- **Create a C# project**
+
For ease-of-use, use an integrated development environment (IDE) such as Visual Studio. To download and install Visual Studio, visit the [Visual Studio Downloads](https://visualstudio.microsoft.com/downloads/) page.
- To create a C# project in Visual Studio, select [Console Application](https://docs.microsoft.com/en-us/dotnet/core/tutorials/with-visual-studio?pivots=dotnet-6-0) as template when creating a new project.
- If you are not using an IDE, use the following dotnet command:
@@ -49,9 +49,10 @@ To develop C# applications for YugabyteDB, you need the following:
```
- **YugabyteDB cluster**
+
- Create a free cluster on YugabyteDB Aeon. Refer to [Use a cloud cluster](/preview/quick-start-yugabytedb-managed/). Note that YugabyteDB Aeon requires SSL.
- Alternatively, set up a standalone YugabyteDB cluster by following the steps in [Install YugabyteDB](/preview/quick-start/).
## Next step
-- [Connect an app](ysql/)
+[Connect an app](ysql/)
diff --git a/docs/content/stable/reference/drivers/csharp/postgres-npgsql-reference.md b/docs/content/stable/drivers-orms/csharp/postgres-npgsql-reference.md
similarity index 96%
rename from docs/content/stable/reference/drivers/csharp/postgres-npgsql-reference.md
rename to docs/content/stable/drivers-orms/csharp/postgres-npgsql-reference.md
index f1cf5d12812c..d767c3bac231 100644
--- a/docs/content/stable/reference/drivers/csharp/postgres-npgsql-reference.md
+++ b/docs/content/stable/drivers-orms/csharp/postgres-npgsql-reference.md
@@ -3,13 +3,13 @@ title: PostgreSQL Npgsql Driver
headerTitle: C# Drivers
linkTitle: C# Drivers
description: C# PostgreSQL Npgsql Driver for YSQL
-headcontent: C# Drivers for YSQL
+badges: ysql
menu:
stable:
name: C# Drivers
- identifier: ref-postgres-npgsql-driver
- parent: drivers
- weight: 620
+ identifier: ref-2-postgres-npgsql-driver
+ parent: csharp-drivers
+ weight: 100
type: docs
---
@@ -31,11 +31,11 @@ type: docs
-Npgsql is an open source ADO.NET Data Provider for PostgreSQL; it allows programs written in C#, Visual Basic, and F# to access the YugabyteDB server. Npgsql is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../../../secure/authentication/password-authentication/#scram-sha-256).
+Npgsql is an open source ADO.NET Data Provider for PostgreSQL; it allows programs written in C#, Visual Basic, and F# to access the YugabyteDB server. Npgsql is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
For details on Npgsql, refer to the [Npgsql documentation](https://www.npgsql.org/doc/).
-For building a sample C# application with Npgsql, see [Connect an application](../../../../drivers-orms/csharp/postgres-npgsql/).
+For building a sample C# application with Npgsql, see [Connect an application](../postgres-npgsql/).
## Download the driver dependency
diff --git a/docs/content/stable/drivers-orms/csharp/postgres-npgsql.md b/docs/content/stable/drivers-orms/csharp/postgres-npgsql.md
index a5039bec7060..975a2f979fa6 100644
--- a/docs/content/stable/drivers-orms/csharp/postgres-npgsql.md
+++ b/docs/content/stable/drivers-orms/csharp/postgres-npgsql.md
@@ -5,9 +5,9 @@ linkTitle: Connect an app
description: Connect a C# application using PostgreSQL Npgsql driver
menu:
stable:
- identifier: postgres-npgsql-driver
+ identifier: csharp-2-postgres-npgsql-driver
parent: csharp-drivers
- weight: 420
+ weight: 500
type: docs
---
@@ -113,7 +113,7 @@ var connStringBuilder = new NpgsqlConnectionStringBuilder();
YugabyteDB Aeon clusters require SSL. Refer to [Connect applications](../../../yugabyte-cloud/cloud-connect/connect-applications/) for instructions on how to obtain the cluster connection parameters and download the CA certificate.
-Refer to [Configure SSL/TLS](../../../reference/drivers/csharp/postgres-npgsql-reference/#configure-ssl-tls) for more information on Npgsql default and supported SSL modes, and examples for setting up your connection strings when using SSL.
+Refer to [Configure SSL/TLS](../postgres-npgsql-reference/#configure-ssl-tls) for more information on Npgsql default and supported SSL modes, and examples for setting up your connection strings when using SSL.
### Step 3: Write your application
@@ -290,8 +290,3 @@ John 35 CSharp + SSL
```
If you receive no output or an error, check the parameters in the connection string.
-
-## Learn more
-
-- [PostgreSQL Npgsql driver reference](../../../reference/drivers/csharp/postgres-npgsql-reference/)
-- Build C# applications using [EntityFramework ORM](../entityframework)
diff --git a/docs/content/stable/reference/drivers/csharp/yb-npgsql-reference.md b/docs/content/stable/drivers-orms/csharp/yb-npgsql-reference.md
similarity index 92%
rename from docs/content/stable/reference/drivers/csharp/yb-npgsql-reference.md
rename to docs/content/stable/drivers-orms/csharp/yb-npgsql-reference.md
index 8e3f65399632..a0866d3e7135 100644
--- a/docs/content/stable/reference/drivers/csharp/yb-npgsql-reference.md
+++ b/docs/content/stable/drivers-orms/csharp/yb-npgsql-reference.md
@@ -3,13 +3,13 @@ title: YugabyteDB Npgsql Smart Driver
headerTitle: C# Drivers
linkTitle: C# Drivers
description: C# Npgsql Smart Driver for YSQL
-headcontent: C# Drivers for YSQL
+badges: ysql
menu:
stable:
name: C# Drivers
- identifier: ref-yb-npgsql-driver
- parent: drivers
- weight: 600
+ identifier: ref-1-yb-npgsql-driver
+ parent: csharp-drivers
+ weight: 100
type: docs
---
@@ -31,12 +31,12 @@ type: docs
-Yugabyte Npgsql smart driver is a .NET driver for [YSQL](../../../../api/ysql/) based on [PostgreSQL Npgsql driver](https://github.com/npgsql/npgsql/tree/main/src/Npgsql), with additional connection load balancing features.
+Yugabyte Npgsql smart driver is a .NET driver for [YSQL](../../../api/ysql/) based on [PostgreSQL Npgsql driver](https://github.com/npgsql/npgsql/tree/main/src/Npgsql), with additional connection load balancing features.
For more information on the Yugabyte Npgsql smart driver, see the following:
-- [YugabyteDB smart drivers for YSQL](../../../../drivers-orms/smart-drivers/)
-- [CRUD operations](../../../../drivers-orms/csharp/ysql/)
+- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
+- [CRUD operations](../ysql/)
- [GitHub repository](https://github.com/yugabyte/npgsql)
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
@@ -79,7 +79,7 @@ var connStringBuilder = "Host=127.0.0.1,127.0.0.2,127.0.0.3;Port=5433;Database=y
NpgsqlConnection conn = new NpgsqlConnection(connStringBuilder)
```
-You can specify [multiple hosts](../../../../drivers-orms/csharp/ysql/#use-multiple-addresses) in the connection string in case the primary address fails. After the driver establishes the initial connection, it fetches the list of available servers from the universe, and performs load balancing of subsequent connection requests across these servers.
+You can specify [multiple hosts](../ysql/#use-multiple-addresses) in the connection string in case the primary address fails. After the driver establishes the initial connection, it fetches the list of available servers from the universe, and performs load balancing of subsequent connection requests across these servers.
To specify topology keys, you set the `Topology Keys` property to comma separated values, as per the following example:
diff --git a/docs/content/stable/drivers-orms/csharp/ycql.md b/docs/content/stable/drivers-orms/csharp/ycql.md
index af52ea1c892c..071761b5193e 100644
--- a/docs/content/stable/drivers-orms/csharp/ycql.md
+++ b/docs/content/stable/drivers-orms/csharp/ycql.md
@@ -5,7 +5,7 @@ linkTitle: Connect an app
description: Connect a C# application using YugabyteDB YCQL driver
menu:
stable:
- identifier: csharp-driver-ycql
+ identifier: csharp-3-driver-ycql
parent: csharp-drivers
weight: 500
type: docs
diff --git a/docs/content/stable/drivers-orms/csharp/ysql.md b/docs/content/stable/drivers-orms/csharp/ysql.md
index 8e1afb67c7e9..26d81516d7cf 100644
--- a/docs/content/stable/drivers-orms/csharp/ysql.md
+++ b/docs/content/stable/drivers-orms/csharp/ysql.md
@@ -5,9 +5,9 @@ linkTitle: Connect an app
description: Connect a C# application using Npgsql Smart Driver
menu:
stable:
- identifier: csharp-driver-ysql
+ identifier: csharp-1-driver-ysql
parent: csharp-drivers
- weight: 400
+ weight: 500
type: docs
---
@@ -204,5 +204,3 @@ John 35 CSharp
- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
-- [YugabyteDB Npgsql Smart Driver reference](../../../reference/drivers/csharp/yb-npgsql-reference/)
-- Build C# applications using [Entity Framework ORM](../entityframework)
diff --git a/docs/content/stable/drivers-orms/elixir/_index.md b/docs/content/stable/drivers-orms/elixir/_index.md
index 09b29bca5c7e..72ab71d9b265 100644
--- a/docs/content/stable/drivers-orms/elixir/_index.md
+++ b/docs/content/stable/drivers-orms/elixir/_index.md
@@ -28,13 +28,15 @@ Learn how to establish a connection to a YugabyteDB database and begin basic CRU
To develop Elixir applications for YugabyteDB, you need the following:
-- **Elixir**\
+- **Elixir**
+
Install the latest versions of [Elixir, Erlang VM, IEx and Mix](https://elixir-lang.org/docs.html) (tested with Elixir 1.17.1 and Erlang/OTP 26 erts-14.2.5).
- **YugabyteDB cluster**
+
- Create a free cluster on YugabyteDB Aeon. Refer to [Use a cloud cluster](../../quick-start-yugabytedb-managed/). Note that YugabyteDB Aeon requires SSL.
- Alternatively, set up a standalone YugabyteDB cluster by following the steps in [Install YugabyteDB](../../quick-start/).
## Next step
-- [Basic application using Phoenix framework](phoenix/)
+[Basic application using Phoenix framework](phoenix/)
diff --git a/docs/content/stable/drivers-orms/go/_index.md b/docs/content/stable/drivers-orms/go/_index.md
index bdbed08e37df..d6995c098249 100644
--- a/docs/content/stable/drivers-orms/go/_index.md
+++ b/docs/content/stable/drivers-orms/go/_index.md
@@ -19,35 +19,37 @@ The following projects can be used to implement Golang applications using the Yu
| Project | Documentation and Guides | Latest Driver Version | Supported YugabyteDB Version |
| ------- | ------------------------ | ------------------------ | ---------------------|
-| YugabyteDB PGX Driver [Recommended] | [Documentation](yb-pgx/) [Reference](../../reference/drivers/go/yb-pgx-reference/) | [v4](https://pkg.go.dev/github.com/yugabyte/pgx/) | 2.8 and above
-| PGX Driver | [Documentation](pgx/) [Reference](../../reference/drivers/go/pgx-reference/) | [v4](https://pkg.go.dev/github.com/jackc/pgx/) | 2.8 and above
-| PQ Driver | [Documentation](pq/) [Reference](../../reference/drivers/go/pq-reference/) | [v1.10.2](https://github.com/lib/pq/releases/tag/v1.10.2/) | 2.6 and above
+| YugabyteDB PGX Driver [Recommended] | [Documentation](yb-pgx/) [Reference](yb-pgx-reference/) | [v4](https://pkg.go.dev/github.com/yugabyte/pgx/) | 2.8 and above |
+| PGX Driver | [Documentation](pgx/) [Reference](pgx-reference/) | [v4](https://pkg.go.dev/github.com/jackc/pgx/) | 2.8 and above |
+| PQ Driver | [Documentation](pq/) [Reference](pq-reference/) | [v1.10.2](https://github.com/lib/pq/releases/tag/v1.10.2/) | 2.6 and above |
| YugabyteDB Go Driver for YCQL | [Documentation](ycql) | [3.16.3](https://github.com/yugabyte/gocql) | |
| Project | Documentation and Guides | Example Apps |
| ------- | ------------------------ | ------------- |
-| GORM [Recommended] | [Documentation](gorm/) [Hello World](../orms/go/ysql-gorm)| [GORM App](https://github.com/YugabyteDB-Samples/orm-examples/tree/master/golang/gorm)
-| GO-PG | [Documentation](pg/) |
+| GORM [Recommended] | [Documentation](gorm/) [Hello World](../orms/go/ysql-gorm)| [GORM App](https://github.com/YugabyteDB-Samples/orm-examples/tree/master/golang/gorm) |
+| GO-PG | [Documentation](pg/) | |
Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations by referring to [Connect an app](yb-pgx/) or [Use an ORM](gorm/).
-For reference documentation, including using projects with SSL, refer to the [drivers and ORMs reference](../../reference/drivers/go/pgx-reference/) pages.
-
## Prerequisites
To develop Golang applications for YugabyteDB, you need the following:
-- **Go**\
- Install the latest Go (1.16 or later) on your system.\
+- **Go**
+
+ Install the latest Go (1.16 or later) on your system.
+
Run `go --version` in a terminal to check your version of Go. To install Go, visit [Go Downloads](https://golang.org/dl/).
-- **Create a Go project**\
+- **Create a Go project**
+
For ease-of-use, use an integrated development environment (IDE) such as Visual Studio. To download and install Visual Studio, visit the [Visual Studio Downloads](https://visualstudio.microsoft.com/downloads/) page.
- **YugabyteDB cluster**
+
- Create a free cluster on YugabyteDB Aeon. Refer to [Use a cloud cluster](/preview/quick-start-yugabytedb-managed/). Note that YugabyteDB Aeon requires SSL.
- Alternatively, set up a standalone YugabyteDB cluster by following the steps in [Install YugabyteDB](/preview/quick-start/).
## Next step
-- [Connect an app](yb-pgx/)
+[Connect an app](yb-pgx/)
diff --git a/docs/content/stable/drivers-orms/go/pg.md b/docs/content/stable/drivers-orms/go/pg.md
index fb7fd7f90ccd..5ff55d65367f 100644
--- a/docs/content/stable/drivers-orms/go/pg.md
+++ b/docs/content/stable/drivers-orms/go/pg.md
@@ -8,7 +8,7 @@ menu:
stable:
identifier: pg-orm
parent: go-drivers
- weight: 610
+ weight: 600
type: docs
---
@@ -84,11 +84,11 @@ db := pg.Connect(opt)
#### Use SSL
-For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the following SSL-related environment variables at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](../../../reference/drivers/go/yb-pgx-reference/#configure-ssl-tls) for the default and supported modes.
+For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the following SSL-related environment variables at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](yb-pgx-reference/#configure-ssl-tls) for the default and supported modes.
```sh
$ export PGSSLMODE=verify-ca
-$ export PGSSLROOTCERT=~/root.crt # Here, the CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly.
+$ export PGSSLROOTCERT=~/root.crt # CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly.
```
| Environment Variable | Description |
@@ -224,7 +224,7 @@ func main() {
#### Using pg.Options()
-If the password contains these special characters (#, %, ^), the driver may fail to parse the URL. In such a case, use pg.Options() instead of pg.ParseURL() to initialize the Options in `ybsql_hello_world.go`. The standard PG environment variables except PGPASSWORD and PGSSLROOTCERT are implicitly read by the driver. Set the PG variables as follows (replace the values as appropriate for YugabyteDB Aeon):
+If the password contains these special characters (#, %, ^), the driver may fail to parse the URL. In such a case, use `pg.Options()` instead of `pg.ParseURL()` to initialize the Options in `ybsql_hello_world.go`. The standard PG environment variables except PGPASSWORD and PGSSLROOTCERT are implicitly read by the driver. Set the PG variables as follows (replace the values as appropriate for YugabyteDB Aeon):
```sh
$ export PGHOST=127.0.0.1
@@ -234,7 +234,7 @@ $ export PGPASSWORD=password#with%special^chars
$ export PGDATABASE=yugabyte
```
-To use pg.Options(), replace the main function in your file with the following:
+To use `pg.Options()`, replace the main function in your file with the following:
```go
/* Modify the main() from the ybsql_hello_world.go script by replacing the first few lines and enabling pg.Options() */
@@ -334,5 +334,4 @@ Query for id=1 returned: Employee<1 John 35 [%!l(string=Go)]>
## Learn more
-- Build Go applications using [GORM](../gorm/)
-- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
+[YugabyteDB smart drivers for YSQL](../../smart-drivers/)
diff --git a/docs/content/stable/reference/drivers/go/pgx-reference.md b/docs/content/stable/drivers-orms/go/pgx-reference.md
similarity index 94%
rename from docs/content/stable/reference/drivers/go/pgx-reference.md
rename to docs/content/stable/drivers-orms/go/pgx-reference.md
index 11e43094ba4e..d04bc54e3b2e 100644
--- a/docs/content/stable/reference/drivers/go/pgx-reference.md
+++ b/docs/content/stable/drivers-orms/go/pgx-reference.md
@@ -3,13 +3,13 @@ title: PGX Driver
headerTitle: Go Drivers
linkTitle: Go Drivers
description: Go PGX Driver for YSQL
-headcontent: Go Drivers for YSQL
+badges: ysql
menu:
stable:
name: Go Drivers
- identifier: ref-pgx-go-driver
- parent: drivers
- weight: 610
+ identifier: ref-2-pgx-go-driver
+ parent: go-drivers
+ weight: 100
type: docs
---
@@ -41,7 +41,7 @@ The [PGX driver](https://github.com/jackc/pgx/) is one of the most popular and a
The driver allows Go programmers to connect to YugabyteDB to execute DMLs and DDLs using the PGX APIs. It also supports the standard `database/sql` package.
-For a tutorial on building a sample Go application with PGX, see [Connect an application](../../../../drivers-orms/go/pgx/).
+For a tutorial on building a sample Go application with PGX, see [Connect an application](../pgx/).
## Fundamentals
@@ -108,7 +108,7 @@ if err != nil {
The `conn.Exec()` function also returns an `error` object which, if not `nil`, needs to be handled in your code.
-Read more on designing [Database schemas and tables](../../../../explore/ysql-language-features/databases-schemas-tables/).
+Read more on designing [Database schemas and tables](../../../explore/ysql-language-features/databases-schemas-tables/).
### Read and write data
@@ -211,7 +211,7 @@ For more details, see [pgxpool package doc](https://pkg.go.dev/github.com/jackc/
To build a Go application that communicates securely over SSL with YugabyteDB database, you need the root certificate (`ca.crt`) of the YugabyteDB cluster.
-To generate these certificates and install them while launching the cluster, follow the instructions in [Create server certificates](../../../../secure/tls-encryption/server-certificates/).
+To generate these certificates and install them while launching the cluster, follow the instructions in [Create server certificates](../../../secure/tls-encryption/server-certificates/).
For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the SSL-related environment variables as follows at the client side.
@@ -244,7 +244,7 @@ YugabyteDB Aeon requires SSL/TLS, and connections using SSL mode `disable` will
## Transaction and isolation levels
-YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access.
+YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access.
The PGX driver provides `conn.Begin()` function to start a transaction. The function `conn.BeginEx()` can create a transaction with a specified isolation level.`
diff --git a/docs/content/stable/drivers-orms/go/pgx.md b/docs/content/stable/drivers-orms/go/pgx.md
index a45247b06a2e..5b7d2ea0ff59 100644
--- a/docs/content/stable/drivers-orms/go/pgx.md
+++ b/docs/content/stable/drivers-orms/go/pgx.md
@@ -5,9 +5,9 @@ linkTitle: Connect an app
description: Connect a Go application using PGX Driver
menu:
stable:
- identifier: pgx-driver
+ identifier: go-2-pgx-driver
parent: go-drivers
- weight: 410
+ weight: 500
type: docs
---
@@ -98,19 +98,19 @@ conn, err := pgx.Connect(context.Background(), url)
| Parameter | Description | Default |
| :-------- | :---------- | :------ |
-| user | User connecting to the database | yugabyte
-| password | User password | yugabyte
-| host | Hostname of the YugabyteDB instance | localhost
-| port | Listen port for YSQL | 5433
-| dbname | Database name | yugabyte
+| user | User connecting to the database | yugabyte |
+| password | User password | yugabyte |
+| host | Hostname of the YugabyteDB instance | localhost |
+| port | Listen port for YSQL | 5433 |
+| dbname | Database name | yugabyte |
#### Use SSL
-For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the SSL-related environment variables as below at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](../../../reference/drivers/go/pgx-reference/#configure-ssl-tls) for the default and supported modes.
+For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the SSL-related environment variables as below at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](../pgx-reference/#configure-ssl-tls) for the default and supported modes.
```sh
$ export PGSSLMODE=verify-ca
-$ export PGSSLROOTCERT=~/root.crt # Here, the CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly.
+$ export PGSSLROOTCERT=~/root.crt # CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly.
```
| Environment variable | Description |
@@ -232,7 +232,4 @@ Query for id=1 returned: Row[John, 35, Go]
## Learn more
- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
-- [YugabyteDB PGX driver reference](../../../reference/drivers/go/pgx-reference/)
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
-- Build Go applications using [GORM](../gorm/)
-- Build Go applications using [PG](../pg/)
diff --git a/docs/content/stable/reference/drivers/go/pq-reference.md b/docs/content/stable/drivers-orms/go/pq-reference.md
similarity index 92%
rename from docs/content/stable/reference/drivers/go/pq-reference.md
rename to docs/content/stable/drivers-orms/go/pq-reference.md
index 9524ae8c3c11..258edcbd339b 100644
--- a/docs/content/stable/reference/drivers/go/pq-reference.md
+++ b/docs/content/stable/drivers-orms/go/pq-reference.md
@@ -3,13 +3,13 @@ title: PQ Driver
headerTitle: Go Drivers
linkTitle: Go Drivers
description: Go PQ Driver for YSQL
-headcontent: Go Drivers for YSQL
+badges: ysql
menu:
stable:
name: Go Drivers
- identifier: ref-pq-go-driver
- parent: drivers
- weight: 620
+ identifier: ref-3-pq-go-driver
+ parent: go-drivers
+ weight: 100
type: docs
---
@@ -39,9 +39,9 @@ type: docs
The [PQ driver](https://github.com/lib/pq/) is a popular driver for PostgreSQL that can used for connecting to YugabyteDB YSQL.
-The driver allows Go programmers to connect to YugabyteDB database to execute DMLs and DDLs using the standard `database/sql` package. The driver supports the [SCRAM-SHA-256 authentication method](../../../../secure/authentication/password-authentication/#scram-sha-256).
+The driver allows Go programmers to connect to YugabyteDB database to execute DMLs and DDLs using the standard `database/sql` package. The driver supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
-For a tutorial on building a sample Go application with pq, see [Connect an application](../../../../drivers-orms/go/pq/).
+For a tutorial on building a sample Go application with pq, see [Connect an application](../pq/).
## Fundamentals
@@ -126,7 +126,7 @@ if _, err := db.Exec(createStmt); err != nil {
The `db.Exec()` function also returns an `error` object which, if not `nil`, needs to handled in your code.
-Read more on designing [Database schemas and tables](../../../../explore/ysql-language-features/databases-schemas-tables/).
+Read more on designing [Database schemas and tables](../../../explore/ysql-language-features/databases-schemas-tables/).
### Read and write data
@@ -193,7 +193,7 @@ if err != nil {
To build a Go application that communicates securely over SSL with YugabyteDB database, you need the root certificate (`ca.crt`) of the YugabyteDB Cluster.
-To generate these certificates and install them while launching the cluster, follow the instructions in [Create server certificates](../../../../secure/tls-encryption/server-certificates/).
+To generate these certificates and install them while launching the cluster, follow the instructions in [Create server certificates](../../../secure/tls-encryption/server-certificates/).
For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the SSL-related environment variables at the client side.
@@ -226,7 +226,7 @@ YugabyteDB Aeon requires SSL/TLS, and connections using SSL mode `disable` will
## Transaction and isolation levels
-YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access.
+YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access.
The PQ driver provides `db.Begin()` function to start a transaction. The function `conn.BeginEx()` can create a transaction with a specified isolation level.`
diff --git a/docs/content/stable/drivers-orms/go/pq.md b/docs/content/stable/drivers-orms/go/pq.md
index ddf6ef9bda8d..219294a92315 100644
--- a/docs/content/stable/drivers-orms/go/pq.md
+++ b/docs/content/stable/drivers-orms/go/pq.md
@@ -5,9 +5,9 @@ linkTitle: Connect an app
description: Connect a Go application using PQ driver
menu:
stable:
- identifier: pq-driver
+ identifier: go-3-pq-driver
parent: go-drivers
- weight: 420
+ weight: 500
type: docs
---
@@ -105,19 +105,19 @@ if err != nil {
| Parameter | Description | Default |
| :-------- | :---------- | :------ |
-| user | User connecting to the database | yugabyte
-| password | User password | yugabyte
-| host | Hostname of the YugabyteDB instance | localhost
-| port | Listen port for YSQL | 5433
-| dbname | Database name | yugabyte
+| user | User connecting to the database | yugabyte |
+| password | User password | yugabyte |
+| host | Hostname of the YugabyteDB instance | localhost |
+| port | Listen port for YSQL | 5433 |
+| dbname | Database name | yugabyte |
#### Use SSL
-For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the SSL-related environment variables as below at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](../../../reference/drivers/go/pq-reference/#ssl-modes) for the default and supported modes.
+For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the SSL-related environment variables as below at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](../pq-reference/#ssl-modes) for the default and supported modes.
```sh
$ export PGSSLMODE=verify-ca
-$ export PGSSLROOTCERT=~/root.crt # Here, the CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly.
+$ export PGSSLROOTCERT=~/root.crt # CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly.
```
| Environment Variable | Description |
@@ -234,7 +234,4 @@ Query for id=1 returned: Row[John, 35, Go]
## Learn more
- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
-- [YugabyteDB PQ driver reference](../../../reference/drivers/go/pq-reference/)
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
-- Build Go applications using [GORM](../gorm/)
-- Build Go applications using [PG](../pg/)
diff --git a/docs/content/stable/reference/drivers/go/yb-pgx-reference.md b/docs/content/stable/drivers-orms/go/yb-pgx-reference.md
similarity index 87%
rename from docs/content/stable/reference/drivers/go/yb-pgx-reference.md
rename to docs/content/stable/drivers-orms/go/yb-pgx-reference.md
index 21532075f360..6d95304540b1 100644
--- a/docs/content/stable/reference/drivers/go/yb-pgx-reference.md
+++ b/docs/content/stable/drivers-orms/go/yb-pgx-reference.md
@@ -3,13 +3,13 @@ title: PGX Smart Driver
headerTitle: Go Drivers
linkTitle: Go Drivers
description: Go PGX Smart Driver for YSQL
-headcontent: Go Drivers for YSQL
+badges: ysql
menu:
stable:
name: Go Drivers
- identifier: ref-yb-pgx-go-driver
- parent: drivers
- weight: 600
+ identifier: ref-1-yb-pgx-go-driver
+ parent: go-drivers
+ weight: 100
type: docs
---
@@ -37,12 +37,12 @@ type: docs
-YugabyteDB PGX smart driver is a Go driver for [YSQL](../../../../api/ysql/) based on [PGX](https://github.com/jackc/pgx/), with additional connection load balancing features.
+YugabyteDB PGX smart driver is a Go driver for [YSQL](../../../api/ysql/) based on [PGX](https://github.com/jackc/pgx/), with additional connection load balancing features.
For more information on the YugabyteDB PGX smart driver, see the following:
-- [YugabyteDB smart drivers for YSQL](../../../../drivers-orms/smart-drivers/)
-- [CRUD operations](../../../../drivers-orms/go/yb-pgx)
+- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
+- [CRUD operations](../yb-pgx)
- [GitHub repository](https://github.com/yugabyte/pgx)
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
@@ -84,7 +84,7 @@ url := fmt.Sprintf("%s?load_balance=true", baseUrl)
conn, err := pgx.Connect(context.Background(), url)
```
-You can specify [multiple hosts](../../../../drivers-orms/go/yb-pgx/#use-multiple-addresses) in the connection string in case the primary address fails. After the driver establishes the initial connection, it fetches the list of available servers from the universe, and performs load balancing of subsequent connection requests across these servers.
+You can specify [multiple hosts](../yb-pgx/#use-multiple-addresses) in the connection string in case the primary address fails. After the driver establishes the initial connection, it fetches the list of available servers from the universe, and performs load balancing of subsequent connection requests across these servers.
To specify topology keys, you set the `topology_keys` property to comma separated values, as per the following example:
@@ -114,7 +114,7 @@ if err != nil {
The `conn.Exec()` function also returns an `error` object which, if not `nil`, needs to be handled in your code.
-Read more on designing [Database schemas and tables](../../../../explore/ysql-language-features/databases-schemas-tables/).
+Read more on designing [Database schemas and tables](../../../explore/ysql-language-features/databases-schemas-tables/).
### Read and write data
@@ -234,9 +234,9 @@ For more details, see the [pgxpool package](https://pkg.go.dev/github.com/jackc/
## Configure SSL/TLS
-To build a Go application that communicates securely over SSL with YugabyteDB database, you need the root certificate (`ca.crt`) of the YugabyteDB cluster. To generate these certificates and install them while launching the cluster, follow the instructions in [Create server certificates](../../../../secure/tls-encryption/server-certificates/).
+To build a Go application that communicates securely over SSL with YugabyteDB database, you need the root certificate (`ca.crt`) of the YugabyteDB cluster. To generate these certificates and install them while launching the cluster, follow the instructions in [Create server certificates](../../../secure/tls-encryption/server-certificates/).
-Because a YugabyteDB Aeon cluster is always configured with SSL/TLS, you don't have to generate any certificate but only set the client-side SSL configuration. To fetch your root certificate, refer to [CA certificate](../../../../yugabyte-cloud/cloud-secure-clusters/cloud-authentication/#download-your-cluster-certificate).
+Because a YugabyteDB Aeon cluster is always configured with SSL/TLS, you don't have to generate any certificate but only set the client-side SSL configuration. To fetch your root certificate, refer to [CA certificate](../../../yugabyte-cloud/cloud-secure-clusters/cloud-authentication/#download-your-cluster-certificate).
For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the SSL-related environment variables as follows at the client side.
@@ -263,7 +263,7 @@ $ export PGSSLROOTCERT=~/root.crt # Here, the CA certificate file is downloaded
## Transaction and isolation levels
-YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access.
+YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access.
The PGX driver provides the `conn.Begin()` function to start a transaction. The `conn.BeginEx()` function can create a transaction with a specified isolation level.
diff --git a/docs/content/stable/drivers-orms/go/yb-pgx.md b/docs/content/stable/drivers-orms/go/yb-pgx.md
index d0b9259d5654..2800a8c77f38 100644
--- a/docs/content/stable/drivers-orms/go/yb-pgx.md
+++ b/docs/content/stable/drivers-orms/go/yb-pgx.md
@@ -5,9 +5,9 @@ linkTitle: Connect an app
description: Connect a Go application using YugabyteDB PGX Smart Driver
menu:
stable:
- identifier: yb-pgx-driver
+ identifier: go-1-yb-pgx-driver
parent: go-drivers
- weight: 400
+ weight: 500
type: docs
---
@@ -81,7 +81,7 @@ cd yb-pgx
go mod init hello
```
-Optionally, you can choose to import the pgxpool package instead. Refer to [Use pgxpool API](../../../reference/drivers/go/yb-pgx-reference/#use-pgxpool-api) to learn more.
+Optionally, you can choose to import the pgxpool package instead. Refer to [Use pgxpool API](../yb-pgx-reference/#use-pgxpool-api) to learn more.
### Step 2: Set up the database connection
@@ -93,14 +93,14 @@ The following table describes the connection parameters required to connect, inc
| Parameter | Description | Default |
| :-------- | :---------- | :------ |
-| host | Host name of the YugabyteDB instance. You can also enter [multiple addresses](#use-multiple-addresses). | localhost
-| port | Listen port for YSQL | 5433
-| user | User connecting to the database | yugabyte
-| password | User password | yugabyte
-| dbname | Database name | yugabyte
-| `load_balance` | [Uniform load balancing](../../smart-drivers/#cluster-aware-connection-load-balancing) | Defaults to upstream driver behavior unless set to 'true'
-| `yb_servers_refresh_interval` | If `load_balance` is true, the interval in seconds to refresh the servers list | 300
-| `topology_keys` | [Topology-aware load balancing](../../smart-drivers/#topology-aware-connection-load-balancing) | If `load_balance` is true, uses uniform load balancing unless set to comma-separated geo-locations in the form `cloud.region.zone`.
+| host | Host name of the YugabyteDB instance. You can also enter [multiple addresses](#use-multiple-addresses). | localhost |
+| port | Listen port for YSQL | 5433 |
+| user | User connecting to the database | yugabyte |
+| password | User password | yugabyte |
+| dbname | Database name | yugabyte |
+| `load_balance` | [Uniform load balancing](../../smart-drivers/#cluster-aware-connection-load-balancing) | Defaults to upstream driver behavior unless set to 'true' |
+| `yb_servers_refresh_interval` | If `load_balance` is true, the interval in seconds to refresh the servers list | 300 |
+| `topology_keys` | [Topology-aware load balancing](../../smart-drivers/#topology-aware-connection-load-balancing) | If `load_balance` is true, uses uniform load balancing unless set to comma-separated geo-locations in the form `cloud.region.zone`. |
The following is an example connection string for connecting to YugabyteDB with uniform load balancing:
@@ -178,11 +178,11 @@ The hosts are only used during the initial connection attempt. If the first host
#### Use SSL
-For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the following SSL-related environment variables at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](../../../reference/drivers/go/yb-pgx-reference/#configure-ssl-tls) for the default and supported modes.
+For a YugabyteDB Aeon cluster, or a YugabyteDB cluster with SSL/TLS enabled, set the following SSL-related environment variables at the client side. SSL/TLS is enabled by default for client-side authentication. Refer to [Configure SSL/TLS](../yb-pgx-reference/#configure-ssl-tls) for the default and supported modes.
```sh
$ export PGSSLMODE=verify-ca
-$ export PGSSLROOTCERT=~/root.crt # Here, the CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly.
+$ export PGSSLROOTCERT=~/root.crt # CA certificate file is downloaded as `root.crt` under home directory. Modify your path accordingly.
```
| Environment Variable | Description |
@@ -681,7 +681,4 @@ Closing the application ...
## Learn more
- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
-- [YugabyteDB PGX smart driver reference](../../../reference/drivers/go/yb-pgx-reference/)
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
-- Build Go applications using [GORM](../gorm/)
-- Build Go applications using [PG](../pg/)
diff --git a/docs/content/stable/drivers-orms/go/ycql.md b/docs/content/stable/drivers-orms/go/ycql.md
index ec673a182791..7ea201b99b01 100644
--- a/docs/content/stable/drivers-orms/go/ycql.md
+++ b/docs/content/stable/drivers-orms/go/ycql.md
@@ -5,7 +5,7 @@ linkTitle: Connect an app
description: Connect a Go application using YugabyteDB Go driver for YCQL
menu:
stable:
- identifier: yb-pgx-driver-ycql
+ identifier: go-4-yb-pgx-driver-ycql
parent: go-drivers
weight: 500
type: docs
diff --git a/docs/content/stable/drivers-orms/java/_index.md b/docs/content/stable/drivers-orms/java/_index.md
index a55739e7aa5c..35d57632c42b 100644
--- a/docs/content/stable/drivers-orms/java/_index.md
+++ b/docs/content/stable/drivers-orms/java/_index.md
@@ -19,12 +19,12 @@ The following projects can be used to implement Java applications using the Yuga
| Driver | Documentation and Guides | Latest Driver Version | Supported YugabyteDB Version |
| ------- | ------------------------ | ------------------------ | ---------------------|
-| YugabyteDB JDBC Driver [Recommended] | [Documentation](yugabyte-jdbc/) [Blog](https://dev.to/yugabyte/yugabytedb-jdbc-smart-driver-for-proxyless-halb-2k8a/) [Reference](../../reference/drivers/java/yugabyte-jdbc-reference/) | [42.3.5-yb-5](https://mvnrepository.com/artifact/com.yugabyte/jdbc-yugabytedb/42.3.5-yb-5) | 2.8 and above
-| YugabyteDB R2DBC Driver | [Documentation](yb-r2dbc/) | [1.1.0-yb-1-ea](https://mvnrepository.com/artifact/com.yugabyte/r2dbc-postgresql) | 2.18 and above
-| PostgreSQL JDBC Driver | [Documentation](postgres-jdbc/) [Reference](../../reference/drivers/java/postgres-jdbc-reference/) | [42.3.4](https://mvnrepository.com/artifact/org.postgresql/postgresql/42.3.4) | 2.4 and above
-| Vert.x Pg Client | [Documentation](ysql-vertx-pg-client/) | [4.3.2](https://mvnrepository.com/artifact/io.vertx/vertx-core/4.3.2) |
-| YugabyteDB YCQL (3.10) Driver | [Documentation](ycql) [Reference](../../reference/drivers/ycql-client-drivers/#java) | [3.10.3-yb-2](https://mvnrepository.com/artifact/com.yugabyte/cassandra-driver-core/3.10.3-yb-2) | |
-| YugabyteDB YCQL (4.15) Driver | [Documentation](ycql-4.x) [Reference](../../reference/drivers/ycql-client-drivers/#java) | [4.15.0-yb-1](https://mvnrepository.com/artifact/com.yugabyte/java-driver-core/4.15.0-yb-1) | |
+| YugabyteDB JDBC Driver [Recommended] | [Documentation](yugabyte-jdbc/) [Reference](yugabyte-jdbc-reference/) [Blog](https://dev.to/yugabyte/yugabytedb-jdbc-smart-driver-for-proxyless-halb-2k8a/) | [42.3.5-yb-5](https://mvnrepository.com/artifact/com.yugabyte/jdbc-yugabytedb/42.3.5-yb-5) | 2.8 and above |
+| YugabyteDB R2DBC Driver | [Documentation](yb-r2dbc/) | [1.1.0-yb-1-ea](https://mvnrepository.com/artifact/com.yugabyte/r2dbc-postgresql) | 2.18 and above |
+| PostgreSQL JDBC Driver | [Documentation](postgres-jdbc/) [Reference](postgres-jdbc-reference/) | [42.3.4](https://mvnrepository.com/artifact/org.postgresql/postgresql/42.3.4) | 2.4 and above |
+| Vert.x Pg Client | [Documentation](ysql-vertx-pg-client/) | [4.3.2](https://mvnrepository.com/artifact/io.vertx/vertx-core/4.3.2) | |
+| YugabyteDB YCQL (3.10) Driver | [Documentation](ycql) | [3.10.3-yb-2](https://mvnrepository.com/artifact/com.yugabyte/cassandra-driver-core/3.10.3-yb-2) | |
+| YugabyteDB YCQL (4.15) Driver | [Documentation](ycql-4.x) | [4.15.0-yb-1](https://mvnrepository.com/artifact/com.yugabyte/java-driver-core/4.15.0-yb-1) | |
| Projects | Documentation and Guides | Example Apps |
| ------- | ------------------------ | ------------ |
@@ -36,8 +36,6 @@ The following projects can be used to implement Java applications using the Yuga
Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations by referring to [Connect an app](yugabyte-jdbc/) or [Use an ORM](hibernate/).
-For reference documentation, including using projects with SSL, refer to the [drivers and ORMs reference](../../reference/drivers/java/yugabyte-jdbc-reference/) pages.
-
## Prerequisites
To develop Java driver applications for YugabyteDB, you need the following:
@@ -88,4 +86,4 @@ To develop Java driver applications for YugabyteDB, you need the following:
## Next step
-- [Connect an app](yugabyte-jdbc/)
+[Connect an app](yugabyte-jdbc/)
diff --git a/docs/content/stable/drivers-orms/java/hibernate.md b/docs/content/stable/drivers-orms/java/hibernate.md
index 9d5744d25540..eb3bb2cf9b69 100644
--- a/docs/content/stable/drivers-orms/java/hibernate.md
+++ b/docs/content/stable/drivers-orms/java/hibernate.md
@@ -8,7 +8,7 @@ menu:
stable:
identifier: java-orm
parent: java-drivers
- weight: 500
+ weight: 600
type: docs
---
diff --git a/docs/content/stable/drivers-orms/java/mybatis.md b/docs/content/stable/drivers-orms/java/mybatis.md
index f599c9e40080..4536f3bbd4db 100644
--- a/docs/content/stable/drivers-orms/java/mybatis.md
+++ b/docs/content/stable/drivers-orms/java/mybatis.md
@@ -8,7 +8,7 @@ menu:
stable:
identifier: java-orm-mybatis
parent: java-drivers
- weight: 700
+ weight: 600
type: docs
---
@@ -34,7 +34,7 @@ type: docs
-[MyBatis](https://mybatis.org/mybatis-3/) is a Java persistence framework with support for custom SQL, stored procedures, and advanced object mapping. MyBatis eliminates the need for writing native JDBC code, manual results mapping, and setting of DB parameters. MyBatis provides simple XML- and annotation-based support for query-to-object mapping for retrieving database records.
+[MyBatis](https://mybatis.org/mybatis-3/) is a Java persistence framework with support for custom SQL, stored procedures, and advanced object mapping. MyBatis eliminates the need for writing native JDBC code, manual results mapping, and setting of DB parameters. MyBatis provides basic XML- and annotation-based support for query-to-object mapping for retrieving database records.
YugabyteDB YSQL API has full compatibility with MyBatis for Data persistence in Java applications. This page provides details for building Java applications using MyBatis for connecting to a YugabyteDB database.
@@ -96,35 +96,35 @@ Create the XML file `UserMapper.xml` in the resources folder of your Java projec
-
+
insert into users (email, first_name, last_name) values (#{email}, #{firstName}, #{lastName})
-
+
-
+
-
+
-
+
delete from users where user_id = #{userId};
-
+
```
### Step 4: Configure the data mappers and datasource in MyBatis configuration file
-All the data mappers must be defined in the MyBatis configuration file. Create `mybatis-config.xml` in the resources folder to configure the MyBatis framework.
+All the data mappers must be defined in the MyBatis configuration file. Create `mybatis-config.xml` in the resources folder to configure the MyBatis framework.
In `mybatis-config.xml`, define the User data mapper and the datasource for connecting to the YugabyteDB database.
@@ -178,20 +178,20 @@ import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
public class MybatisUtil {
-
- private static SqlSessionFactory sqlSessionFactory;
-
- public static SqlSessionFactory getSessionFactory() {
+
+ private static SqlSessionFactory sqlSessionFactory;
+
+ public static SqlSessionFactory getSessionFactory() {
String resource = "mybatis-config.xml";
InputStream inputStream;
- try {
- inputStream = Resources.getResourceAsStream(resource);
- sqlSessionFactory =
- new SqlSessionFactoryBuilder().build(inputStream);
- } catch (IOException e) {
- e.printStackTrace();
- }
- return sqlSessionFactory;
+ try {
+ inputStream = Resources.getResourceAsStream(resource);
+ sqlSessionFactory =
+ new SqlSessionFactoryBuilder().build(inputStream);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return sqlSessionFactory;
}
}
```
@@ -217,33 +217,31 @@ public class UserDAO {
}
public void save(final User entity) {
-
+
try (SqlSession session = sqlSessionFactory.openSession()) {
- session.insert("mybatis.mapper.UserMapper.save", entity);
- session.commit();
+ session.insert("mybatis.mapper.UserMapper.save", entity);
+ session.commit();
} catch (RuntimeException rte) {}
}
public User findById(final Long id) {
-
- User user = null;
+
+ User user = null;
try (SqlSession session = sqlSessionFactory.openSession()) {
- user = session.selectOne("mybatis.mapper.UserMapper.findById", id);
-
+ user = session.selectOne("mybatis.mapper.UserMapper.findById", id);
} catch (RuntimeException rte) {}
return user;
}
public List findAll() {
-
- List users = null;
+ List users = null;
try (SqlSession session = sqlSessionFactory.openSession()) {
users = session.selectList("mybatis.mapper.UserMapper.findAll");
} catch (RuntimeException rte) {}
-
- return users;
+
+ return users;
}
public void delete(final User user) {
@@ -266,26 +264,26 @@ import java.sql.SQLException;
import org.apache.ibatis.session.SqlSessionFactory;
public class MyBatisExample {
-
- public static void main(String[] args) throws ClassNotFoundException, SQLException {
-
- SqlSessionFactory sessionFactory = MybatisUtil.getSessionFactory();
-
- System.out.println("Connected to the YugabyteDB Cluster successfully.");
- UserDAO userDAO = new UserDAO(sessionFactory);
- User user = new User();
- user.setEmail("demo@yugabyte.com");
- user.setFirstName("Alice");
- user.setLastName("yugabeing");
-
- // Save an user
- userDAO.save(user);
- System.out.println("Inserted user record: " + user.getFirstName());
-
- // Find the user
- User userFromDB = userDAO.findById(new Long(201));
- System.out.println("Query returned:" + userFromDB.toString());
- }
+
+ public static void main(String[] args) throws ClassNotFoundException, SQLException {
+
+ SqlSessionFactory sessionFactory = MybatisUtil.getSessionFactory();
+
+ System.out.println("Connected to the YugabyteDB Cluster successfully.");
+ UserDAO userDAO = new UserDAO(sessionFactory);
+ User user = new User();
+ user.setEmail("demo@yugabyte.com");
+ user.setFirstName("Alice");
+ user.setLastName("yugabeing");
+
+ // Save an user
+ userDAO.save(user);
+ System.out.println("Inserted user record: " + user.getFirstName());
+
+ // Find the user
+ User userFromDB = userDAO.findById(new Long(201));
+ System.out.println("Query returned:" + userFromDB.toString());
+ }
}
```
@@ -300,4 +298,4 @@ Query returned:User [userId=101, firstName=Alice, lastName=Yugabeing, email=demo
## Learn more
-- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
\ No newline at end of file
+[YugabyteDB smart drivers for YSQL](../../smart-drivers/)
\ No newline at end of file
diff --git a/docs/content/stable/reference/drivers/java/postgres-jdbc-reference.md b/docs/content/stable/drivers-orms/java/postgres-jdbc-reference.md
similarity index 94%
rename from docs/content/stable/reference/drivers/java/postgres-jdbc-reference.md
rename to docs/content/stable/drivers-orms/java/postgres-jdbc-reference.md
index 302c06c5af0e..0dadce7668e0 100644
--- a/docs/content/stable/reference/drivers/java/postgres-jdbc-reference.md
+++ b/docs/content/stable/drivers-orms/java/postgres-jdbc-reference.md
@@ -3,13 +3,13 @@ title: PostgreSQL JDBC Driver
headerTitle: JDBC Drivers
linkTitle: JDBC Drivers
description: Java JDBC Driver for YSQL
-headcontent: JDBC Drivers for YSQL
+badges: ysql
menu:
stable:
name: JDBC Drivers
- identifier: ref-postgres-jdbc-driver
- parent: drivers
- weight: 600
+ identifier: ref-2-postgres-jdbc-driver
+ parent: java-drivers
+ weight: 100
type: docs
---
@@ -31,9 +31,9 @@ type: docs
-The [PostgreSQL JDBC driver](https://jdbc.postgresql.org/) is the official JDBC driver for PostgreSQL, and can be used for connecting to YugabyteDB YSQL. YugabyteDB YSQL has full compatibility with the PostgreSQL JDBC Driver, allowing Java programmers to connect to YugabyteDB database to execute DMLs and DDLs using the JDBC APIs. The driver supports the [SCRAM-SHA-256 authentication method](../../../../secure/authentication/password-authentication/#scram-sha-256).
+The [PostgreSQL JDBC driver](https://jdbc.postgresql.org/) is the official JDBC driver for PostgreSQL, and can be used for connecting to YugabyteDB YSQL. YugabyteDB YSQL has full compatibility with the PostgreSQL JDBC Driver, allowing Java programmers to connect to YugabyteDB database to execute DMLs and DDLs using the JDBC APIs. The driver supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
-For building a sample Java application with the PostgreSQL JDBC driver, see [Connect an application](../../../../drivers-orms/java/postgres-jdbc/).
+For building a sample Java application with the PostgreSQL JDBC driver, see [Connect an application](../postgres-jdbc/).
## Download the driver dependency
@@ -117,7 +117,7 @@ try {
}
```
-`java.sql.Statement` throws the `java.sql.SQLException` exception, which needs to handled in the Java code. Read more on designing [Database schemas and tables](../../../../explore/ysql-language-features/databases-schemas-tables/).
+`java.sql.Statement` throws the `java.sql.SQLException` exception, which needs to handled in the Java code. Read more on designing [Database schemas and tables](../../../explore/ysql-language-features/databases-schemas-tables/).
### Read and write data
@@ -189,7 +189,7 @@ try {
## Configure SSL/TLS
-To build a Java application that communicates securely over SSL, get the root certificate (`ca.crt`) of the YugabyteDB Cluster. If certificates are not generated yet, follow the instructions in [Create server certificates](../../../../secure/tls-encryption/server-certificates/).
+To build a Java application that communicates securely over SSL, get the root certificate (`ca.crt`) of the YugabyteDB Cluster. If certificates are not generated yet, follow the instructions in [Create server certificates](../../../secure/tls-encryption/server-certificates/).
Generally, when configuring the Java client to use SSL, all the certificates required for connecting to the database are available on the Classpath of the Java application, or in the default PostgreSQL working directory `(~/.postgresql/)` of the VM or container where the application is hosted.
@@ -224,7 +224,7 @@ YugabyteDB cluster can be configured to authenticate the identity of the JDBC cl
Steps for configuring the JDBC client for server authentication are as follows:
-1. Download the certificate (`yugabytedb.crt`, `yugabytedb.key`, and `ca.crt`) files (see [Copy configuration files to the nodes](../../../../secure/tls-encryption/server-certificates/#copy-configuration-files-to-the-nodes)).
+1. Download the certificate (`yugabytedb.crt`, `yugabytedb.key`, and `ca.crt`) files (see [Copy configuration files to the nodes](../../../secure/tls-encryption/server-certificates/#copy-configuration-files-to-the-nodes)).
1. If you do not have access to the system `cacerts` Java truststore you can create your own truststore.
@@ -268,12 +268,12 @@ Steps for configuring the JDBC client for server authentication are as follows:
Steps for configuring the JDBC client for server authentication in a Kubernetes cluster are as follows:
-1. Create a minikube cluster by adding `tls.enabled=true` to the command line described in [Quick start](/preview/quick-start/kubernetes/).
+1. Create a minikube cluster by adding `tls.enabled=true` to the command line described in [Quick start](../../../quick-start/kubernetes/).
```sh
$ kubectl create namespace yb-demo
$ helm install yb-demo yugabytedb/yugabyte \
- --version {{}} \
+ --version {{}} \
--set resource.master.requests.cpu=0.5,resource.master.requests.memory=0.5Gi,\
resource.tserver.requests.cpu=0.5,resource.tserver.requests.memory=0.5Gi,\
replicas.master=1,replicas.tserver=1,tls.enabled=true --namespace yb-demo
@@ -286,7 +286,7 @@ Steps for configuring the JDBC client for server authentication in a Kubernetes
```
```output
- ysqlsh (11.2-YB-2.9.0.0-b0)
+ ysqlsh (11.2-YB-{{}}-b0)
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.
```
@@ -346,7 +346,7 @@ Connection conn = DriverManager.getConnection(jdbc:postgresql://localhost:5433/y
## Transaction and isolation levels
-YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access.
+YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access.
JDBC Driver `java.sql.Connection` interface provides `connection.setAutoCommit()`, `connection.commit()` and `connection.rollback()` methods for enabling transactional access to YugabyteDB Database.
diff --git a/docs/content/stable/drivers-orms/java/postgres-jdbc.md b/docs/content/stable/drivers-orms/java/postgres-jdbc.md
index 065161400fe9..d82a6f8bc424 100644
--- a/docs/content/stable/drivers-orms/java/postgres-jdbc.md
+++ b/docs/content/stable/drivers-orms/java/postgres-jdbc.md
@@ -5,9 +5,10 @@ linkTitle: Connect an app
description: Connect a Java application using PostgreSQL JDBC driver
menu:
stable:
- identifier: postgres-jdbc-driver
+ identifier: java-driver-3-jdbc-postgres
parent: java-drivers
weight: 500
+badges: ysql
type: docs
---
@@ -68,7 +69,7 @@ To start building your application, make sure you have met the [prerequisites](.
If you're building the application with SSL, do the following additional steps:
-- Set up SSL/TLS depending on the platform you choose to create your local cluster. To set up a cluster in Minikube with SSL/TLS, see [SSL certificates for a cluster in Kubernetes](../../../reference/drivers/java/postgres-jdbc-reference/#ssl-certificates-for-a-cluster-in-kubernetes-optional). To set up SSL certificates for a local cluster, see [Set up SSL certificates for Java applications](../../../reference/drivers/java/postgres-jdbc-reference/#set-up-ssl-certificates-for-java-applications).
+- Set up SSL/TLS depending on the platform you choose to create your local cluster. To set up a cluster in Minikube with SSL/TLS, see [SSL certificates for a cluster in Kubernetes](../postgres-jdbc-reference/#ssl-certificates-for-a-cluster-in-kubernetes-optional). To set up SSL certificates for a local cluster, see [Set up SSL certificates for Java applications](../postgres-jdbc-reference/#set-up-ssl-certificates-for-java-applications).
- Install [OpenSSL](https://www.openssl.org/) 1.1.1 or later.
### Step 1: Set up the client dependency
@@ -107,7 +108,6 @@ Java applications can connect to and query the YugabyteDB database using the `ja
Use the `DriverManager.getConnection` method to create a connection object for the YugabyteDB Database. This can be used to perform DDLs and DMLs against the database.
-
| JDBC parameter | Description | Default |
| :------------- | :---------- | :------ |
| hostname | Hostname of the YugabyteDB instance | localhost |
@@ -222,8 +222,5 @@ If there is no output or you get an error, verify that the connection string in
## Learn more
-- [PostgreSQL JDBC driver reference](../../../reference/drivers/java/postgres-jdbc-reference/)
- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
- [Develop Spring Boot applications using the YugabyteDB JDBC Driver](/preview/integrations/spring-framework/sdyb/)
-- Build Java applications using [Hibernate ORM](../hibernate/)
-- Build Java applications using [Ebean ORM](../ebean/)
diff --git a/docs/content/stable/drivers-orms/java/yb-r2dbc.md b/docs/content/stable/drivers-orms/java/yb-r2dbc.md
index 081648cda254..44bb73bc0f74 100644
--- a/docs/content/stable/drivers-orms/java/yb-r2dbc.md
+++ b/docs/content/stable/drivers-orms/java/yb-r2dbc.md
@@ -5,9 +5,10 @@ linkTitle: Connect an app
description: Connect a Java application using YugabyteDB R2DBC Smart Driver for YSQL
menu:
stable:
- identifier: r2dbc-driver
+ identifier: java-driver-2-r2dbc
parent: java-drivers
- weight: 600
+ weight: 500
+badges: ycql
type: docs
---
diff --git a/docs/content/stable/drivers-orms/java/ycql.md b/docs/content/stable/drivers-orms/java/ycql.md
index 4facdfdda9d4..d13f7fbe1c97 100644
--- a/docs/content/stable/drivers-orms/java/ycql.md
+++ b/docs/content/stable/drivers-orms/java/ycql.md
@@ -8,6 +8,7 @@ menu:
identifier: ycql-java-driver
parent: java-drivers
weight: 500
+badges: ycql
type: docs
---
diff --git a/docs/content/stable/drivers-orms/java/ysql-vertx-pg-client.md b/docs/content/stable/drivers-orms/java/ysql-vertx-pg-client.md
index 4c8d26bbb8ec..7cced85a222d 100644
--- a/docs/content/stable/drivers-orms/java/ysql-vertx-pg-client.md
+++ b/docs/content/stable/drivers-orms/java/ysql-vertx-pg-client.md
@@ -5,9 +5,9 @@ linkTitle: Connect an app
description: Connect a Java application using Vert.x PG driver
menu:
stable:
- identifier: vertx-pg-client
+ identifier: java-driver-4-vertx-pg-client
parent: java-drivers
- weight: 600
+ weight: 500
type: docs
---
diff --git a/docs/content/preview/reference/drivers/java/yugabyte-jdbc-reference.md b/docs/content/stable/drivers-orms/java/yugabyte-jdbc-reference.md
similarity index 95%
rename from docs/content/preview/reference/drivers/java/yugabyte-jdbc-reference.md
rename to docs/content/stable/drivers-orms/java/yugabyte-jdbc-reference.md
index 357eb02c368d..adf82799b3d9 100644
--- a/docs/content/preview/reference/drivers/java/yugabyte-jdbc-reference.md
+++ b/docs/content/stable/drivers-orms/java/yugabyte-jdbc-reference.md
@@ -3,13 +3,13 @@ title: YugabyteDB JDBC Smart Driver
headerTitle: JDBC Drivers
linkTitle: JDBC Drivers
description: YugabyteDB JDBC Smart Driver for YSQL reference
-headcontent: JDBC Drivers for YSQL
+badges: ysql
menu:
- preview:
+ stable:
name: JDBC Drivers
- identifier: ref-yugabyte-jdbc-driver
- parent: drivers
- weight: 500
+ identifier: ref-1-yugabyte-jdbc-driver
+ parent: java-drivers
+ weight: 100
type: docs
---
@@ -31,12 +31,12 @@ type: docs
-YugabyteDB JDBC smart driver is a JDBC driver for [YSQL](../../../../api/ysql/) built on the [PostgreSQL JDBC driver](https://github.com/pgjdbc/pgjdbc), with additional connection load balancing features.
+YugabyteDB JDBC smart driver is a JDBC driver for [YSQL](../../../api/ysql/) built on the [PostgreSQL JDBC driver](https://github.com/pgjdbc/pgjdbc), with additional connection load balancing features.
For more information on the YugabyteDB Java smart driver, see the following:
-- [YugabyteDB smart drivers for YSQL](../../../../drivers-orms/smart-drivers/)
-- [CRUD operations](../../../../drivers-orms/java/yugabyte-jdbc)
+- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
+- [CRUD operations](../yugabyte-jdbc)
- [GitHub repository](https://github.com/yugabyte/pgjdbc)
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
@@ -169,7 +169,7 @@ To use the driver, do the following:
## Try it out
-This tutorial shows how to use the YugabyteDB JDBC Driver with YugabyteDB. It starts by creating a three-node cluster with a replication factor of 3. This tutorial uses the [yb-ctl](../../../../admin/yb-ctl/#root) utility.
+This tutorial shows how to use the YugabyteDB JDBC Driver with YugabyteDB. It starts by creating a three-node cluster with a replication factor of 3. This tutorial uses the [yugabyted](../../../reference/configuration/yugabyted/) utility.
Next, you use [yb-sample-apps](https://github.com/yugabyte/yb-sample-apps/tree/master) to demonstrate the driver's load balancing features and create a Maven project to learn how to use the driver in an application.
@@ -267,7 +267,7 @@ To access sample applications that use the YugabyteDB JDBC driver, visit [Yugaby
To use the samples, complete the following steps:
-- Install YugabyteDB by following the instructions in [Quick start](../../../../quick-start/).
+- Install YugabyteDB by following the instructions in [Quick start](../../../quick-start/).
- Build the examples by running `mvn package`.
diff --git a/docs/content/stable/drivers-orms/java/yugabyte-jdbc.md b/docs/content/stable/drivers-orms/java/yugabyte-jdbc.md
index 12f72b23d32e..6714cb9d2b2c 100644
--- a/docs/content/stable/drivers-orms/java/yugabyte-jdbc.md
+++ b/docs/content/stable/drivers-orms/java/yugabyte-jdbc.md
@@ -5,9 +5,9 @@ linkTitle: Connect an app
description: Connect a Java application using YugabyteDB JDBC Smart Driver
menu:
stable:
- identifier: yugabyte-jdbc-driver
+ identifier: java-driver-1-yugabyte-jdbc
parent: java-drivers
- weight: 400
+ weight: 500
type: docs
---
@@ -246,8 +246,5 @@ If you receive no output or an error, check the parameters in the connection str
## Learn more
- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
-- Refer to [YugabyteDB JDBC driver reference](../../../reference/drivers/java/yugabyte-jdbc-reference/) and [Try it out](../../../reference/drivers/java/yugabyte-jdbc-reference/#try-it-out) for detailed smart driver examples.
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
- [Develop Spring Boot applications using the YugabyteDB JDBC Driver](/preview/integrations/spring-framework/sdyb/)
-- Build Java applications using [Hibernate ORM](../hibernate/)
-- Build Java applications using [Ebean ORM](../ebean/)
diff --git a/docs/content/stable/drivers-orms/nodejs/_index.md b/docs/content/stable/drivers-orms/nodejs/_index.md
index 88881ff42fda..4a13bc57848e 100644
--- a/docs/content/stable/drivers-orms/nodejs/_index.md
+++ b/docs/content/stable/drivers-orms/nodejs/_index.md
@@ -19,24 +19,23 @@ The following projects are recommended for implementing Node applications using
| Project | Documentation and Guides | Latest Driver Version | Supported YugabyteDB Version |
| :------ | :----------------------- | :----------------------- | :--------------------|
-| YugabyteDB node-postgres Smart Driver| [Documentation](yugabyte-node-driver/) [Reference](../../reference/drivers/nodejs/yugabyte-pg-reference/) | [8.7.3-yb-1](https://www.npmjs.com/package/pg) | 2.8 and above |
-| PostgreSQL node-postgres Driver| [Documentation](postgres-node-driver/) [Reference](../../reference/drivers/nodejs/postgres-pg-reference/) | [8.7.3](https://www.npmjs.com/package/pg) | 2.6 and above |
+| YugabyteDB node-postgres Smart Driver| [Documentation](yugabyte-node-driver/) [Reference](yugabyte-pg-reference/) | [8.7.3-yb-1](https://www.npmjs.com/package/pg) | 2.8 and above |
+| PostgreSQL node-postgres Driver| [Documentation](postgres-node-driver/) [Reference](postgres-pg-reference/) | [8.7.3](https://www.npmjs.com/package/pg) | 2.6 and above |
| YugabyteDB Node.js Driver for YCQL | [Documentation](ycql/) | [4.0.0](https://github.com/yugabyte/cassandra-nodejs-driver) | |
| Project | Documentation and Guides | Example Apps |
| :------ | :----------------------- | :----------- |
| Sequelize | [Documentation](sequelize/) [Hello World](../orms/nodejs/ysql-sequelize/) | [Sequelize ORM App](https://github.com/YugabyteDB-Samples/orm-examples/tree/master/node/sequelize) |
-| Prisma | [Documentation](prisma/) [Hello World](../orms/nodejs/ysql-prisma/) | [Prisma ORM App](https://github.com/yugabyte/orm-examples/tree/master/node/prisma)
+| Prisma | [Documentation](prisma/) [Hello World](../orms/nodejs/ysql-prisma/) | [Prisma ORM App](https://github.com/yugabyte/orm-examples/tree/master/node/prisma) |
Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations by referring to [Connect an app](yugabyte-node-driver/) or [Use an ORM](sequelize/).
-For reference documentation, including using projects with SSL, refer to the [drivers and ORMs reference](../../reference/drivers/nodejs/yugabyte-pg-reference/) pages.
-
## Prerequisites
To develop Node.js applications for YugabyteDB, you need the following:
-- **Node.js**\
+- **Node.js**
+
To download and install Node.js, refer to the [Node.js](https://nodejs.org/en/download/) documentation.\
To check the version of node, use the following command:
@@ -44,7 +43,8 @@ To develop Node.js applications for YugabyteDB, you need the following:
node -v
```
-- **Create a node.js project**\
+- **Create a node.js project**
+
Create a file with the `.js` extension (for example `app.js`), which can be run using the following command:
```sh
@@ -52,9 +52,10 @@ To develop Node.js applications for YugabyteDB, you need the following:
```
- **YugabyteDB cluster**
+
- Create a free cluster on YugabyteDB Aeon. Refer to [Use a cloud cluster](/preview/quick-start-yugabytedb-managed/). Note that YugabyteDB Aeon requires SSL.
- Alternatively, set up a standalone YugabyteDB cluster by following the steps in [Install YugabyteDB](/preview/quick-start/).
## Next step
-- [Connect an app](yugabyte-node-driver/)
+[Connect an app](yugabyte-node-driver/)
diff --git a/docs/content/stable/drivers-orms/nodejs/postgres-node-driver.md b/docs/content/stable/drivers-orms/nodejs/postgres-node-driver.md
index 9fec1e7bd5dc..882123bc2178 100644
--- a/docs/content/stable/drivers-orms/nodejs/postgres-node-driver.md
+++ b/docs/content/stable/drivers-orms/nodejs/postgres-node-driver.md
@@ -5,9 +5,9 @@ linkTitle: Connect an app
description: Connect a node.js application using node-postgres Driver
menu:
stable:
- identifier: postgres-node-driver
+ identifier: node-driver-2-postgres
parent: nodejs-drivers
- weight: 600
+ weight: 500
type: docs
---
@@ -117,7 +117,7 @@ const config = {
If you created a cluster on YugabyteDB Aeon, use the cluster credentials and [download the SSL Root certificate](../../../yugabyte-cloud/cloud-connect/connect-applications/).
-Refer to [Configure SSL/TLS](../../../reference/drivers/nodejs/postgres-pg-reference/#configure-ssl-tls) for more information on node-postgresql default and supported SSL modes, and other examples for setting up your connection strings when using SSL.
+Refer to [Configure SSL/TLS](../postgres-pg-reference/#configure-ssl-tls) for more information on node-postgresql default and supported SSL modes, and other examples for setting up your connection strings when using SSL.
### Step 3: Write your application
@@ -275,7 +275,4 @@ If there is no output or you get an error, verify the parameters included in the
## Learn more
-- [PostgreSQL node-postgres driver reference](../../../reference/drivers/nodejs/postgres-pg-reference/)
-- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
-- Build Node.js applications using [Sequelize ORM](../sequelize/)
-- Build Node.js applications using [Prisma ORM](../prisma/)
+[YugabyteDB smart drivers for YSQL](../../smart-drivers/)
diff --git a/docs/content/stable/reference/drivers/nodejs/postgres-pg-reference.md b/docs/content/stable/drivers-orms/nodejs/postgres-pg-reference.md
similarity index 91%
rename from docs/content/stable/reference/drivers/nodejs/postgres-pg-reference.md
rename to docs/content/stable/drivers-orms/nodejs/postgres-pg-reference.md
index 1ad79eda86fa..6bc51af72cb5 100644
--- a/docs/content/stable/reference/drivers/nodejs/postgres-pg-reference.md
+++ b/docs/content/stable/drivers-orms/nodejs/postgres-pg-reference.md
@@ -3,13 +3,13 @@ title: PostgreSQL node-postgres Driver
headerTitle: Node.js Drivers
linkTitle: Node.js Drivers
description: PostgreSQL node-postgres Driver for YSQL
-headcontent: Node.js Drivers for YSQL
+badges: ysql
menu:
stable:
name: Node.js Drivers
- identifier: ref-postgres-pg-driver
- parent: drivers
- weight: 600
+ identifier: ref-2-postgres-pg-driver
+ parent: nodejs-drivers
+ weight: 100
type: docs
---
@@ -28,11 +28,11 @@ type: docs
-The [PostgreSQL node-postgres driver](https://node-postgres.com/) is the official Node.js driver for PostgreSQL. The YSQL API is fully compatible with the PostgreSQL node-postgres (pg) driver, so you can connect to the YugabyteDB database to execute DMLs and DDLs using the node-postgres APIs. The driver supports the [SCRAM-SHA-256 authentication method](../../../../secure/authentication/password-authentication/#scram-sha-256).
+The [PostgreSQL node-postgres driver](https://node-postgres.com/) is the official Node.js driver for PostgreSQL. The YSQL API is fully compatible with the PostgreSQL node-postgres (pg) driver, so you can connect to the YugabyteDB database to execute DMLs and DDLs using the node-postgres APIs. The driver supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
For details on installing and using node-postgres, see the [node-postgres documentation](https://node-postgres.com/).
-For a tutorial on building a Node.js application with node-postgres, see [Connect an application](../../../../drivers-orms/nodejs/postgres-node-driver/).
+For a tutorial on building a Node.js application with node-postgres, see [Connect an application](../postgres-node-driver/).
## Fundamentals
@@ -93,7 +93,7 @@ client
})
```
-Read more on designing [Database schemas and tables](../../../../explore/ysql-language-features/databases-schemas-tables/).
+Read more on designing [Database schemas and tables](../../../explore/ysql-language-features/databases-schemas-tables/).
### Read and write data
@@ -140,9 +140,9 @@ client
## Configure SSL/TLS
-To build a Node.js application that communicates securely over SSL, get the root certificate (`ca.crt`) of the YugabyteDB Cluster. If certificates are not generated yet, follow the instructions in [Create server certificates](../../../../secure/tls-encryption/server-certificates/).
+To build a Node.js application that communicates securely over SSL, get the root certificate (`ca.crt`) of the YugabyteDB Cluster. If certificates are not generated yet, follow the instructions in [Create server certificates](../../../secure/tls-encryption/server-certificates/).
-Because a YugabyteDB Aeon cluster is always configured with SSL/TLS, you don't have to generate any certificate but only set the client-side SSL configuration. To fetch your root certificate, refer to [Download your cluster certificate](../../../../yugabyte-cloud/cloud-secure-clusters/cloud-authentication/#download-your-cluster-certificate).
+Because a YugabyteDB Aeon cluster is always configured with SSL/TLS, you don't have to generate any certificate but only set the client-side SSL configuration. To fetch your root certificate, refer to [Download your cluster certificate](../../../yugabyte-cloud/cloud-secure-clusters/cloud-authentication/#download-your-cluster-certificate).
The node-postgres driver allows you to avoid including the parameters like `sslcert`, `sslkey`, `sslrootcert`, or `sslmode` in the connection string. You can pass the object which includes `connectionString` and `ssl` object which has various fields including the following:
@@ -239,7 +239,7 @@ client.connect()
## Transaction and isolation levels
-YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access.
+YugabyteDB supports transactions for inserting and querying data from the tables. YugabyteDB supports different [isolation levels](../../../architecture/transactions/isolation-levels/) for maintaining strong consistency for concurrent data access.
Node-postgres driver allows transaction using the queries, executed using `client.query()`.
diff --git a/docs/content/stable/drivers-orms/nodejs/sequelize.md b/docs/content/stable/drivers-orms/nodejs/sequelize.md
index e659a035cc84..cc3a7a5e83a8 100644
--- a/docs/content/stable/drivers-orms/nodejs/sequelize.md
+++ b/docs/content/stable/drivers-orms/nodejs/sequelize.md
@@ -8,7 +8,7 @@ menu:
stable:
identifier: sequelize-1
parent: nodejs-drivers
- weight: 500
+ weight: 600
type: docs
---
diff --git a/docs/content/stable/drivers-orms/nodejs/ycql.md b/docs/content/stable/drivers-orms/nodejs/ycql.md
index ed16186a2922..b2df65b07b32 100644
--- a/docs/content/stable/drivers-orms/nodejs/ycql.md
+++ b/docs/content/stable/drivers-orms/nodejs/ycql.md
@@ -5,9 +5,9 @@ linkTitle: Connect an app
description: Connect an application using YugabyteDB Node.js driver for YCQL
menu:
stable:
- identifier: ycql-node-driver
+ identifier: node-driver-3-ycql
parent: nodejs-drivers
- weight: 600
+ weight: 500
type: docs
---
diff --git a/docs/content/stable/drivers-orms/nodejs/yugabyte-node-driver.md b/docs/content/stable/drivers-orms/nodejs/yugabyte-node-driver.md
index 35da9a937b49..ae630204082c 100644
--- a/docs/content/stable/drivers-orms/nodejs/yugabyte-node-driver.md
+++ b/docs/content/stable/drivers-orms/nodejs/yugabyte-node-driver.md
@@ -5,7 +5,7 @@ linkTitle: Connect an app
description: Connect an application using YugabyteDB Node.js smart driver for YSQL
menu:
stable:
- identifier: yugabyte-node-driver
+ identifier: node-driver-1-yugabyte
parent: nodejs-drivers
weight: 500
type: docs
@@ -105,7 +105,7 @@ postgresql://yugabyte:yugabyte@128.0.0.1:5433/yugabyte?loadBalance=true&ssl=true
sslmode=verify-full&sslrootcert=~/.postgresql/root.crt
```
-Refer to [Configure SSL/TLS](../../../reference/drivers/nodejs/postgres-pg-reference/#configure-ssl-tls) for more information on default and supported SSL modes, and examples for setting up your connection strings when using SSL.
+Refer to [Configure SSL/TLS](../postgres-pg-reference/#configure-ssl-tls) for more information on default and supported SSL modes, and examples for setting up your connection strings when using SSL.
#### Use SSL with YugabyteDB Aeon
@@ -220,7 +220,4 @@ If there is no output or you get an error, verify the parameters included in the
## Learn more
-- Refer to [YugabyteDB node-postgres smart driver reference](../../../reference/drivers/nodejs/yugabyte-pg-reference/) and [Try it out](../../../reference/drivers/nodejs/yugabyte-pg-reference/#try-it-out) for detailed smart driver examples.
-- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
-- Build Node.js applications using [Sequelize ORM](../sequelize/)
-- Build Node.js applications using [Prisma ORM](../prisma/)
+[YugabyteDB smart drivers for YSQL](../../smart-drivers/)
diff --git a/docs/content/stable/reference/drivers/nodejs/yugabyte-pg-reference.md b/docs/content/stable/drivers-orms/nodejs/yugabyte-pg-reference.md
similarity index 93%
rename from docs/content/stable/reference/drivers/nodejs/yugabyte-pg-reference.md
rename to docs/content/stable/drivers-orms/nodejs/yugabyte-pg-reference.md
index 8bf5d0a85c90..189ac7d10956 100644
--- a/docs/content/stable/reference/drivers/nodejs/yugabyte-pg-reference.md
+++ b/docs/content/stable/drivers-orms/nodejs/yugabyte-pg-reference.md
@@ -3,13 +3,13 @@ title: YugabyteDB node-postgres Smart Driver reference
headerTitle: Node.js Drivers
linkTitle: Node.js Drivers
description: YugabyteDB node-postgres smart driver for YSQL
-headcontent: Node.js Drivers for YSQL
+badges: ysql
menu:
stable:
name: Node.js Drivers
- identifier: ref-yugabyte-pg-driver
- parent: drivers
- weight: 500
+ identifier: ref-1-yugabyte-pg-driver
+ parent: nodejs-drivers
+ weight: 100
type: docs
---
@@ -30,12 +30,12 @@ type: docs
-YugabyteDB node-postgres smart driver is a Node.js driver for [YSQL](../../../../api/ysql/) built on the [PostgreSQL node-postgres driver](https://github.com/brianc/node-postgres), with additional connection load balancing features.
+YugabyteDB node-postgres smart driver is a Node.js driver for [YSQL](../../../api/ysql/) built on the [PostgreSQL node-postgres driver](https://github.com/brianc/node-postgres), with additional connection load balancing features.
For more information on the YugabyteDB node-postgres smart driver, see the following:
-- [YugabyteDB smart drivers for YSQL](../../../../drivers-orms/smart-drivers/)
-- [CRUD operations](../../../../drivers-orms/nodejs/yugabyte-node-driver)
+- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
+- [CRUD operations](../yugabyte-node-driver)
- [GitHub repository](https://github.com/yugabyte/node-postgres)
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
@@ -104,7 +104,7 @@ To use the driver, do the following:
## Try it out
-This tutorial shows how to use the YugabyteDB node-postgres smart driver with YugabyteDB. It starts by creating a three-node cluster with a [replication factor](../../../../architecture/docdb-replication/replication/#replication-factor) of 3. This tutorial uses the [yb-ctl](../../../../admin/yb-ctl/#root) utility.
+This tutorial shows how to use the YugabyteDB node-postgres smart driver with YugabyteDB. It starts by creating a three-node cluster with a [replication factor](../../../architecture/docdb-replication/replication/#replication-factor) of 3. This tutorial uses the [yb-ctl](../../../admin/yb-ctl/#root) utility.
Next, you use a Node.js application to demonstrate the driver's load balancing features.
diff --git a/docs/content/stable/drivers-orms/orms/rust/ysql-diesel.md b/docs/content/stable/drivers-orms/orms/rust/ysql-diesel.md
index 2d15de3f6602..b4e0b212538c 100644
--- a/docs/content/stable/drivers-orms/orms/rust/ysql-diesel.md
+++ b/docs/content/stable/drivers-orms/orms/rust/ysql-diesel.md
@@ -45,7 +45,7 @@ Build the REST API server (written using Diesel and Rocket) as follows:
$ cargo build --release
```
-If you encounter a build failure, install [libpq](../../../../reference/drivers/ysql-client-drivers/#libpq) and try again.
+If you encounter a build failure, install [libpq](../../ysql-client-drivers/#libpq) and try again.
## Set up the database connection
diff --git a/docs/content/stable/drivers-orms/php/_index.md b/docs/content/stable/drivers-orms/php/_index.md
index 77ab38e64308..b4bece59bf25 100644
--- a/docs/content/stable/drivers-orms/php/_index.md
+++ b/docs/content/stable/drivers-orms/php/_index.md
@@ -34,3 +34,7 @@ To develop PHP applications for YugabyteDB, you need:
- **a YugabyteDB cluster**
- Create a free cluster on YugabyteDB Aeon. Refer to [Use a cloud cluster](/preview/quick-start-yugabytedb-managed/). Note that YugabyteDB Aeon requires SSL.
- Alternatively, set up a standalone YugabyteDB cluster by following the steps in [Install YugabyteDB](/preview/quick-start/).
+
+## Next step
+
+[Connect an app](ysql/)
diff --git a/docs/content/stable/drivers-orms/python/_index.md b/docs/content/stable/drivers-orms/python/_index.md
index b8c1b7256c9f..e55853118629 100644
--- a/docs/content/stable/drivers-orms/python/_index.md
+++ b/docs/content/stable/drivers-orms/python/_index.md
@@ -18,8 +18,8 @@ The following projects can be used to implement Python applications using the Yu
| Project | Documentation and Guides | Latest Driver Version | Supported YugabyteDB Version |
| ------- | ------------------------ | ------------------------ | ---------------------|
-| Yugabyte Psycopg2 Smart Driver [Recommended] | [Documentation](yugabyte-psycopg2/) [Reference](../../reference/drivers/python/yugabyte-psycopg2-reference/)| 2.9.3 | 2.8 and above |
-| PostgreSQL Psycopg2 Driver | [Documentation](postgres-psycopg2/) [Reference](../../reference/drivers/python/postgres-psycopg2-reference/) | 2.9.3 | 2.8 and above |
+| Yugabyte Psycopg2 Smart Driver [Recommended] | [Documentation](yugabyte-psycopg2/) [Reference](yugabyte-psycopg2-reference/)| 2.9.3 | 2.8 and above |
+| PostgreSQL Psycopg2 Driver | [Documentation](postgres-psycopg2/) [Reference](postgres-psycopg2-reference/) | 2.9.3 | 2.8 and above |
| aiopg | [Documentation](aiopg/) | 1.4 | 2.8 and above |
| YugabyteDB Python Driver for YCQL | [Documentation](ycql/) | [3.25.0](https://github.com/yugabyte/cassandra-python-driver/tree/master) | |
@@ -30,13 +30,12 @@ The following projects can be used to implement Python applications using the Yu
Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations by referring to [Connect an app](yugabyte-psycopg2/) or [Use an ORM](sqlalchemy/).
-For reference documentation, including using projects with SSL, refer to the [drivers and ORMs reference](../../reference/drivers/python/yugabyte-psycopg2-reference/) pages.
-
## Prerequisites
To develop Python applications for YugabyteDB, you need the following:
- **Python**
+
Ensure your system has Python3 installed. To check the version of Python installed, use the following command:
```sh
@@ -46,9 +45,10 @@ To develop Python applications for YugabyteDB, you need the following:
If not already installed, download and install it from the [Python Downloads](https://www.python.org/downloads/) page.
- **YugabyteDB cluster**
+
- Create a free cluster on YugabyteDB Aeon. Refer to [Use a cloud cluster](/preview/quick-start-yugabytedb-managed/). Note that YugabyteDB Aeon requires SSL.
- Alternatively, set up a standalone YugabyteDB cluster by following the steps in [Install YugabyteDB](/preview/quick-start/).
## Next step
-- [Connect an app](yugabyte-psycopg2/)
+[Connect an app](yugabyte-psycopg2/)
diff --git a/docs/content/stable/drivers-orms/python/aiopg.md b/docs/content/stable/drivers-orms/python/aiopg.md
index ebef97993f96..17c7df18d6b2 100644
--- a/docs/content/stable/drivers-orms/python/aiopg.md
+++ b/docs/content/stable/drivers-orms/python/aiopg.md
@@ -7,7 +7,7 @@ menu:
stable:
identifier: ysql-aiopg
parent: python-drivers
- weight: 571
+ weight: 520
type: docs
---
diff --git a/docs/content/stable/drivers-orms/python/django.md b/docs/content/stable/drivers-orms/python/django.md
index 545ea87e9473..2db6ee2ef32f 100644
--- a/docs/content/stable/drivers-orms/python/django.md
+++ b/docs/content/stable/drivers-orms/python/django.md
@@ -7,7 +7,7 @@ menu:
stable:
identifier: django-orm
parent: python-drivers
- weight: 700
+ weight: 600
type: docs
---
-Psycopg is the most popular PostgreSQL database adapter for the Python programming language. Its main features are the complete implementation of the Python DB API 2.0 specification and the thread safety (several threads can share the same connection). YugabyteDB has full support for [Psycopg2](https://www.psycopg.org/). psycopg2 is based on libpq and supports the [SCRAM-SHA-256 authentication method](../../../../secure/authentication/password-authentication/#scram-sha-256).
+Psycopg is the most popular PostgreSQL database adapter for the Python programming language. Its main features are the complete implementation of the Python DB API 2.0 specification and the thread safety (several threads can share the same connection). YugabyteDB has full support for [Psycopg2](https://www.psycopg.org/). psycopg2 is based on libpq and supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
For details on using psycopg2, see [Psycopg documentation](https://www.psycopg.org/docs/).
-For a tutorial on building a sample Python application that uses psycopg2, see [Connect an application](../../../../drivers-orms/python/postgres-psycopg2/).
+For a tutorial on building a sample Python application that uses psycopg2, see [Connect an application](../postgres-psycopg2/).
## Fundamentals
diff --git a/docs/content/stable/drivers-orms/python/postgres-psycopg2.md b/docs/content/stable/drivers-orms/python/postgres-psycopg2.md
index a12ec93e6226..030d474b2e0b 100644
--- a/docs/content/stable/drivers-orms/python/postgres-psycopg2.md
+++ b/docs/content/stable/drivers-orms/python/postgres-psycopg2.md
@@ -7,7 +7,7 @@ menu:
stable:
identifier: postgres-psycopg2-driver
parent: python-drivers
- weight: 500
+ weight: 510
type: docs
---
@@ -215,8 +215,4 @@ Currently, [PostgreSQL psycopg2 driver](https://github.com/psycopg/psycopg2) and
## Learn more
-- [PostgreSQL Psycopg2 driver reference](../../../reference/drivers/python/postgres-psycopg2-reference/)
-- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
-- Build Python applications using [YugabyteDB Psycopg2 smart driver](../yugabyte-psycopg2/)
-- Build Python applications using [Django](../django/)
-- Build Python applications using [SQLAlchemy](../sqlalchemy/)
+[YugabyteDB smart drivers for YSQL](../../smart-drivers/)
diff --git a/docs/content/stable/drivers-orms/python/sqlalchemy.md b/docs/content/stable/drivers-orms/python/sqlalchemy.md
index 77c8a3721796..a72553d666a2 100644
--- a/docs/content/stable/drivers-orms/python/sqlalchemy.md
+++ b/docs/content/stable/drivers-orms/python/sqlalchemy.md
@@ -7,7 +7,7 @@ menu:
stable:
identifier: sqlalchemy-orm
parent: python-drivers
- weight: 600
+ weight: 610
type: docs
---
diff --git a/docs/content/stable/drivers-orms/python/ycql.md b/docs/content/stable/drivers-orms/python/ycql.md
index 708ee4f1e628..a15d0622182f 100644
--- a/docs/content/stable/drivers-orms/python/ycql.md
+++ b/docs/content/stable/drivers-orms/python/ycql.md
@@ -7,7 +7,7 @@ menu:
stable:
identifier: ycql-python-driver
parent: python-drivers
- weight: 600
+ weight: 530
type: docs
---
diff --git a/docs/content/stable/reference/drivers/python/yugabyte-psycopg2-reference.md b/docs/content/stable/drivers-orms/python/yugabyte-psycopg2-reference.md
similarity index 91%
rename from docs/content/stable/reference/drivers/python/yugabyte-psycopg2-reference.md
rename to docs/content/stable/drivers-orms/python/yugabyte-psycopg2-reference.md
index 8e2412dcb6f6..7aa8e531bb46 100644
--- a/docs/content/stable/reference/drivers/python/yugabyte-psycopg2-reference.md
+++ b/docs/content/stable/drivers-orms/python/yugabyte-psycopg2-reference.md
@@ -3,13 +3,13 @@ title: YugabyteDB Psycopg2 Smart Driver
headerTitle: Python Drivers
linkTitle: Python Drivers
description: YugabyteDB Psycopg2 Smart Driver for YSQL
-headcontent: Python Drivers for YSQL
+badges: ysql
menu:
stable:
name: Python Drivers
identifier: ref-yugabyte-psycopg2-driver
- parent: drivers
- weight: 650
+ parent: python-drivers
+ weight: 100
type: docs
---
@@ -28,12 +28,12 @@ type: docs
-Yugabyte Psycopg2 smart driver is a Python driver for [YSQL](../../../../api/ysql/) built on the [PostgreSQL psycopg2 driver](https://github.com/psycopg/psycopg2), with additional connection load balancing features.
+Yugabyte Psycopg2 smart driver is a Python driver for [YSQL](../../../api/ysql/) built on the [PostgreSQL psycopg2 driver](https://github.com/psycopg/psycopg2), with additional connection load balancing features.
For more information on the YugabyteDB node-postgres smart driver, see the following:
-- [YugabyteDB smart drivers for YSQL](../../../../drivers-orms/smart-drivers/)
-- [CRUD operations](../../../../drivers-orms/python/yugabyte-psycopg2/)
+- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
+- [CRUD operations](../yugabyte-psycopg2/)
- [GitHub repository](https://github.com/yugabyte/psycopg2)
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
@@ -85,7 +85,7 @@ To enable uniform load balancing across all servers, you set the `load-balance`
conn = psycopg2.connect(user = 'username', password='password', host = 'hostname', port = '5433', dbname = 'database_name', load_balance='True')
```
-You can specify [multiple hosts](../../../../drivers-orms/go/yb-pgx/#use-multiple-addresses) in the connection string in case the primary address fails. After the driver establishes the initial connection, it fetches the list of available servers from the cluster, and load-balances subsequent connection requests across these servers.
+You can specify [multiple hosts](../yugabyte-psycopg2/#use-multiple-addresses) in the connection string in case the primary address fails. After the driver establishes the initial connection, it fetches the list of available servers from the cluster, and load-balances subsequent connection requests across these servers.
To specify topology keys, you set the `topology_keys` property to comma-separated values in the Connection string or dictionary, as per the following examples:
@@ -115,7 +115,7 @@ conn = yb_pool.getconn()
## Try it out
-This tutorial shows how to use the Yugabyte Psycopg2 driver with YugabyteDB. It starts by creating a 3 node cluster with a replication factor of 3. This tutorial uses the [yb-ctl](../../../../admin/yb-ctl/) utility.
+This tutorial shows how to use the Yugabyte Psycopg2 driver with YugabyteDB. It starts by creating a 3 node cluster with a replication factor of 3. This tutorial uses the [yb-ctl](../../../admin/yb-ctl/) utility.
Next, you use a Python shell terminal to demonstrate the driver's load balancing features by running a few python scripts.
diff --git a/docs/content/stable/drivers-orms/python/yugabyte-psycopg2.md b/docs/content/stable/drivers-orms/python/yugabyte-psycopg2.md
index 63289b57180e..09d6068a2109 100644
--- a/docs/content/stable/drivers-orms/python/yugabyte-psycopg2.md
+++ b/docs/content/stable/drivers-orms/python/yugabyte-psycopg2.md
@@ -7,7 +7,7 @@ menu:
stable:
identifier: yugabyte-psycopg2-driver
parent: python-drivers
- weight: 400
+ weight: 500
type: docs
---
@@ -272,8 +272,4 @@ Currently, [PostgreSQL psycopg2 driver](https://github.com/psycopg/psycopg2) and
## Learn more
-- Refer to [YugabyteDB Psycopg2 driver reference](../../../reference/drivers/python/yugabyte-psycopg2-reference/) and [Try it out](../../../reference/drivers/python/yugabyte-psycopg2-reference/#try-it-out) for detailed smart driver examples.
-- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
-- Build Python applications using [PostgreSQL Psycopg2 smart driver](../postgres-psycopg2/)
-- Build Python applications using [Django](../django/)
-- Build Python applications using [SQLAlchemy](../sqlalchemy/)
+[YugabyteDB smart drivers for YSQL](../../smart-drivers/)
diff --git a/docs/content/stable/drivers-orms/ruby/_index.md b/docs/content/stable/drivers-orms/ruby/_index.md
index b1e8c2f56675..94716b64b034 100644
--- a/docs/content/stable/drivers-orms/ruby/_index.md
+++ b/docs/content/stable/drivers-orms/ruby/_index.md
@@ -41,4 +41,4 @@ To develop Ruby applications for YugabyteDB, you need the following:
## Next step
-- [Connect an app](ysql-pg)
+[Connect an app](ysql-pg)
diff --git a/docs/content/stable/drivers-orms/rust/_index.md b/docs/content/stable/drivers-orms/rust/_index.md
index 3b052e1c0675..c60c410d685c 100644
--- a/docs/content/stable/drivers-orms/rust/_index.md
+++ b/docs/content/stable/drivers-orms/rust/_index.md
@@ -19,7 +19,7 @@ The following project is recommended for implementing Rust applications using th
| Project | Documentation and Guides | Latest Driver Version | Supported YugabyteDB Version | Example Apps |
| ------- | ------------------------ | --------------------- | ---------------------------- | ------------ |
-| YugabyteDB Rust-Postgres Smart Driver [Recommended] | [Documentation](yb-rust-postgres/) [Reference](../../reference/drivers/rust/rust-postgres-reference/) | [yb-postgres](https://crates.io/crates/yb-postgres) (synchronous YSQL client): v0.19.7-yb-1-beta [yb-tokio-postgres](https://crates.io/crates/yb-tokio-postgres) (asynchronous YSQL client): v0.7.10-yb-1-beta | 2.19 and later
+| YugabyteDB Rust-Postgres Smart Driver [Recommended] | [Documentation](yb-rust-postgres/) [Reference](rust-postgres-reference/) | [yb-postgres](https://crates.io/crates/yb-postgres) (synchronous YSQL client): v0.19.7-yb-1-beta [yb-tokio-postgres](https://crates.io/crates/yb-tokio-postgres) (asynchronous YSQL client): v0.7.10-yb-1-beta | 2.19 and later | |
| Diesel | [Documentation](diesel/) [Hello World](../orms/rust/ysql-diesel/) | | |[Diesel app](https://github.com/YugabyteDB-Samples/orm-examples/tree/master/rust/diesel) |
Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations using the **Hello World** examples.
@@ -30,15 +30,18 @@ For fully-runnable code snippets and explanations of common operations, see the
To develop Rust applications for YugabyteDB, you need the following:
-- **Rust**\
+- **Rust**
+
To download and install Rust, refer to the [Rust](https://doc.rust-lang.org/cargo/getting-started/installation.html) documentation.\
+
To check the version of Rust, use the following command:
```sh
$ rustc --version
```
-- **Create a Rust project**\
+- **Create a Rust project**
+
To create a new Rust project, run the following command:
```sh
@@ -48,9 +51,10 @@ To develop Rust applications for YugabyteDB, you need the following:
This creates the project as `HelloWorld-rust` which consists of a `Cargo.toml` file (project metadata) and a `src` directory containing the main code file, `main.rs`.
- **YugabyteDB cluster**
+
- Create a free cluster on YugabyteDB Aeon. Refer to [Use a cloud cluster](/preview/quick-start-yugabytedb-managed/). Note that YugabyteDB Aeon requires SSL.
- Alternatively, set up a standalone YugabyteDB cluster by following the steps in [Install YugabyteDB](/preview/quick-start/).
## Next step
-- [Connect an app](yb-rust-postgres/)
+[Connect an app](yb-rust-postgres/)
diff --git a/docs/content/stable/reference/drivers/rust/rust-postgres-reference.md b/docs/content/stable/drivers-orms/rust/rust-postgres-reference.md
similarity index 87%
rename from docs/content/stable/reference/drivers/rust/rust-postgres-reference.md
rename to docs/content/stable/drivers-orms/rust/rust-postgres-reference.md
index 05a8a3271faf..c0709579435e 100644
--- a/docs/content/stable/reference/drivers/rust/rust-postgres-reference.md
+++ b/docs/content/stable/drivers-orms/rust/rust-postgres-reference.md
@@ -3,17 +3,17 @@ title: YugabyteDB Rust Smart Driver
headerTitle: Rust Drivers
linkTitle: Rust Drivers
description: Rust postgres Smart Driver for YSQL
-headcontent: Rust Smart Driver for YSQL
+badges: ysql
menu:
stable:
name: Rust Drivers
identifier: ref-rust-postgres-driver
- parent: drivers
- weight: 800
+ parent: rust-drivers
+ weight: 100
type: docs
---
-YugabyteDB Rust smart driver is a Rust driver for [YSQL](../../../../api/ysql/) based on [rust-postgres](https://github.com/sfackler/rust-postgres), with additional connection load balancing features.
+YugabyteDB Rust smart driver is a Rust driver for [YSQL](../../../api/ysql/) based on [rust-postgres](https://github.com/sfackler/rust-postgres), with additional connection load balancing features.
Rust smart drivers offers two different clients similar to rust-postgres:
@@ -22,8 +22,8 @@ Rust smart drivers offers two different clients similar to rust-postgres:
For more information on the YugabyteDB Rust smart driver, see the following:
-- [YugabyteDB smart drivers for YSQL](../../../../drivers-orms/smart-drivers/)
-- [CRUD operations](../../../../drivers-orms/rust/yb-rust-postgres/#crud-operations)
+- [YugabyteDB smart drivers for YSQL](../../smart-drivers/)
+- [CRUD operations](../yb-rust-postgres/#crud-operations)
- [GitHub repository](https://github.com/yugabyte/rust-postgres)
- [Smart Driver architecture](https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/smart-driver.md)
@@ -57,8 +57,8 @@ Learn how to perform common tasks required for Rust application development usin
The following connection properties need to be added to enable load balancing:
-- `load_balance` - enable [cluster-aware load balancing](../../../../drivers-orms/smart-drivers/#cluster-aware-connection-load-balancing) by setting this property to true; disabled by default.
-- `topology_keys` - provide comma-separated geo-location values to enable [topology-aware load balancing](../../../../drivers-orms/smart-drivers/#topology-aware-connection-load-balancing). Geo-locations can be provided as `cloud.region.zone`. Specify all zones in a region as `cloud.region.*`. To designate fallback locations for when the primary location is unreachable, specify a priority in the form `:n`, where `n` is the order of precedence. For example, `cloud1.datacenter1.rack1:1,cloud1.datacenter1.rack2:2`.
+- `load_balance` - enable [cluster-aware load balancing](../../smart-drivers/#cluster-aware-connection-load-balancing) by setting this property to true; disabled by default.
+- `topology_keys` - provide comma-separated geo-location values to enable [topology-aware load balancing](../../smart-drivers/#topology-aware-connection-load-balancing). Geo-locations can be provided as `cloud.region.zone`. Specify all zones in a region as `cloud.region.*`. To designate fallback locations for when the primary location is unreachable, specify a priority in the form `:n`, where `n` is the order of precedence. For example, `cloud1.datacenter1.rack1:1,cloud1.datacenter1.rack2:2`.
By default, the driver refreshes the list of nodes every 300 seconds (5 minutes). You can change this value by including the `yb_servers_refresh_interval` parameter.
@@ -79,7 +79,7 @@ let url: String = String::from( "postgresql://localhost:5434/yugabyte?user=yugab
let conn = yb_postgres::Client::connect(&connection_url,NoTls,)?;
```
-You can specify [multiple hosts](../../../../drivers-orms/rust/yb-rust-postgres/#use-multiple-addresses) in the connection string to use as fallbacks in case the primary address fails during the initial connection attempt. After the driver establishes the initial connection, it fetches the list of available servers from the cluster, and load-balances subsequent connection requests across those servers.
+You can specify [multiple hosts](../yb-rust-postgres/#use-multiple-addresses) in the connection string to use as fallbacks in case the primary address fails during the initial connection attempt. After the driver establishes the initial connection, it fetches the list of available servers from the cluster, and load-balances subsequent connection requests across those servers.
To specify topology keys, you set the `topology_keys` property to comma-separated values in the connection string or dictionary, as per the following example:
@@ -90,11 +90,11 @@ let conn = yb_postgres::Client::connect(&connection_url,NoTls,)?;
## Try it out
-This tutorial shows how to use the asynchronous yb-tokio-postgres client with YugabyteDB. It starts by creating a three-node cluster with a [replication factor](../../../../architecture/docdb-replication/replication/#replication-factor) of 3. This tutorial uses the [yugabyted](../../../configuration/yugabyted/) utility.
+This tutorial shows how to use the asynchronous yb-tokio-postgres client with YugabyteDB. It starts by creating a three-node cluster with a [replication factor](../../../architecture/docdb-replication/replication/#replication-factor) of 3. This tutorial uses the [yugabyted](../../../reference/configuration/yugabyted/) utility.
Next, you use a Rust application to demonstrate the driver's load balancing features.
-For an example using the synchronous yb-postgres client, see [Connect an application](../../../../drivers-orms/rust/yb-rust-postgres).
+For an example using the synchronous yb-postgres client, see [Connect an application](../yb-rust-postgres).
### Create a local cluster
@@ -353,7 +353,7 @@ The following is an example connection URL for connecting to a YugabyteDB cluste
"postgresql://127.0.0.1:5434/yugabyte?user=yugabyte&password=yugabyte&load_balance=true&sslmode=require"
```
-If you created a cluster on [YugabyteDB Aeon](../../../../yugabyte-cloud/), use the cluster credentials and download the [SSL Root certificate](../../../../yugabyte-cloud/cloud-secure-clusters/cloud-authentication/#download-your-cluster-certificate).
+If you created a cluster on [YugabyteDB Aeon](../../../yugabyte-cloud/), use the cluster credentials and download the [SSL Root certificate](../../../yugabyte-cloud/cloud-secure-clusters/cloud-authentication/#download-your-cluster-certificate).
The following is an example application for connecting to a YugabyteDB cluster with SSL enabled:
diff --git a/docs/content/stable/drivers-orms/rust/yb-rust-postgres.md b/docs/content/stable/drivers-orms/rust/yb-rust-postgres.md
index 98ae4b6ab360..9412292a224a 100644
--- a/docs/content/stable/drivers-orms/rust/yb-rust-postgres.md
+++ b/docs/content/stable/drivers-orms/rust/yb-rust-postgres.md
@@ -8,7 +8,7 @@ menu:
stable:
identifier: rust-postgres-driver
parent: rust-drivers
- weight: 600
+ weight: 500
type: docs
---
diff --git a/docs/content/stable/reference/drivers/ycql-client-drivers.md b/docs/content/stable/drivers-orms/ycql-client-drivers.md
similarity index 86%
rename from docs/content/stable/reference/drivers/ycql-client-drivers.md
rename to docs/content/stable/drivers-orms/ycql-client-drivers.md
index 0b5103096701..e071793499df 100644
--- a/docs/content/stable/reference/drivers/ycql-client-drivers.md
+++ b/docs/content/stable/drivers-orms/ycql-client-drivers.md
@@ -1,17 +1,23 @@
---
title: Client drivers for YCQL API
headerTitle: Client drivers for YCQL
-linkTitle: Client drivers for YCQL
+linkTitle: Additional drivers
description: Lists the client drivers that you can use to build and access YCQL applications.
+badges: ycql
menu:
stable:
identifier: ycql-client-libraries
- parent: drivers
- weight: 2942
+ parent: drivers-orms
+ weight: 2001
type: docs
---
-The following client drivers are supported for use with the [YugabyteDB Cloud Query Language (YCQL) API](../../../api/ycql/), a SQL-based, semi-relational API, with roots in the Apache Cassandra Query Language (CQL).
+{{}}
+{{}}
+{{}}
+{{}}
+
+The following client drivers are supported for use with the [YugabyteDB Cloud Query Language (YCQL) API](../../api/ycql/), a SQL-based, semi-relational API, with roots in the Apache Cassandra Query Language (CQL).
For tutorials on building a sample application with the following client drivers, click the relevant link included below for each driver.
@@ -27,7 +33,7 @@ The [YugabyteDB C++ Driver for YCQL](https://github.com/yugabyte/cassandra-cpp-d
For details, see the [README](https://github.com/yugabyte/cassandra-cpp-driver) in our GitHub repository.
-For a tutorial on building a sample C++ application with this driver, see [Build a C++ application](../../../drivers-orms/cpp/ycql/).
+For a tutorial on building a sample C++ application with this driver, see [Build a C++ application](../cpp/ycql/).
## C\#
@@ -37,7 +43,7 @@ The [YugabyteDB C# Driver for YCQL](https://github.com/yugabyte/cassandra-csharp
For details, see the [README](https://github.com/yugabyte/cassandra-csharp-driver) in our GitHub repository.
-For a tutorial on building a sample C# application with this driver, see [Connect an application](../../../drivers-orms/csharp/ycql/).
+For a tutorial on building a sample C# application with this driver, see [Connect an application](../csharp/ycql/).
## Go
@@ -47,7 +53,7 @@ The [YugabyteDB Go Driver for YCQL](https://github.com/yugabyte/gocql) is based
For details, see the [README](https://github.com/yugabyte/gocql/blob/master/README.md) in our GitHub repository.
-For a tutorial on building a sample Go application with this driver, see [Connect an application](../../../drivers-orms/go/ycql/).
+For a tutorial on building a sample Go application with this driver, see [Connect an application](../go/ycql/).
## Java
@@ -57,7 +63,7 @@ The [YugabyteDB Java Driver for YCQL](https://github.com/yugabyte/cassandra-java
For details, see the [v3.10 README](https://github.com/yugabyte/cassandra-java-driver/blob/3.10.0-yb-x/README.md) in our GitHub repository.
-For a tutorial on building a sample Java application with this driver, see [Connect an application](../../../drivers-orms/java/ycql/).
+For a tutorial on building a sample Java application with this driver, see [Connect an application](../java/ycql/).
To build Java applications with this driver, you must add the following Maven dependency to your application:
@@ -77,7 +83,7 @@ The [YugabyteDB Java Driver for YCQL](https://github.com/yugabyte/cassandra-java
For details, see the [v4.15 README](https://github.com/yugabyte/cassandra-java-driver/blob/4.15.x/README.md) in our GitHub repository.
-For a tutorial on building a sample Java application with this driver, see [Connect an application](../../../drivers-orms/java/ycql-4.x/).
+For a tutorial on building a sample Java application with this driver, see [Connect an application](../java/ycql-4.x/).
To build Java applications with this driver, you must add the following Maven dependency to your application:
@@ -99,7 +105,7 @@ The [YugabyteDB Node.js driver for YCQL](https://github.com/yugabyte/cassandra-n
For details, see the [README](https://github.com/datastax/cpp-driver/blob/master/README.md) in our GitHub repository.
-For a tutorial on building a sample Node.js application with this driver, see [Connect an application](../../../drivers-orms/nodejs/ycql/).
+For a tutorial on building a sample Node.js application with this driver, see [Connect an application](../nodejs/ycql/).
## Python
@@ -109,7 +115,7 @@ The [YugabyteDB Python Driver for YCQL](https://github.com/yugabyte/cassandra-py
For details, see the [README](https://github.com/yugabyte/cassandra-python-driver) in our GitHub repository.
-For a tutorial on building a sample Python application with this driver, see [Connect an application](../../../drivers-orms/python/ycql/).
+For a tutorial on building a sample Python application with this driver, see [Connect an application](../python/ycql/).
## Ruby
@@ -119,7 +125,7 @@ The [YugabyteDB Ruby Driver for YCQL](https://github.com/yugabyte/cassandra-ruby
For details, see the [README](https://github.com/yugabyte/cassandra-ruby-driver/blob/v3.2.3.x-yb/README.md) in our GitHub repository.
-For a tutorial on building a sample Ruby application with this driver, see [Connect an application](../../../drivers-orms/ruby/ycql/).
+For a tutorial on building a sample Ruby application with this driver, see [Connect an application](../ruby/ycql/).
## Scala
@@ -135,4 +141,4 @@ To build a Scala application with the YugabyteDB Java Driver for YCQL, you must
libraryDependencies += "com.yugabyte" % "cassandra-driver-core" % "3.8.0-yb-5"
```
-For a tutorial on building a sample Scala application with this driver, see [Connect an application](../../../drivers-orms/scala/ycql/).
+For a tutorial on building a sample Scala application with this driver, see [Connect an application](../scala/ycql/).
diff --git a/docs/content/stable/reference/drivers/ysql-client-drivers.md b/docs/content/stable/drivers-orms/ysql-client-drivers.md
similarity index 78%
rename from docs/content/stable/reference/drivers/ysql-client-drivers.md
rename to docs/content/stable/drivers-orms/ysql-client-drivers.md
index 3418b8a22d7e..7877db23523e 100644
--- a/docs/content/stable/reference/drivers/ysql-client-drivers.md
+++ b/docs/content/stable/drivers-orms/ysql-client-drivers.md
@@ -1,23 +1,29 @@
---
title: Client drivers for YSQL
headerTitle: Additional client drivers for YSQL
-linkTitle: Client drivers for YSQL
+linkTitle: Additional drivers
description: Lists the client drivers that you can use to connect to and interact with the YSQL API.
+badges: ysql
menu:
stable:
identifier: ysql-client-libraries
- parent: drivers
- weight: 2940
+ parent: drivers-orms
+ weight: 2000
type: docs
rightNav:
hideH4: true
---
-The [Yugabyte Structured Query Language (YSQL) API](../../../api/ysql/) builds upon and extends a fork of the query layer from PostgreSQL 11.2, with the intent of supporting most PostgreSQL functionality and adding new functionality to supported distributed SQL databases.
+{{}}
+{{}}
+{{}}
+{{}}
-For details on PostgreSQL feature support in YSQL, refer to [SQL feature support](../../../explore/ysql-language-features/sql-feature-support/).
+The [Yugabyte Structured Query Language (YSQL) API](../../api/ysql/) builds upon and extends a fork of the query layer from PostgreSQL 11.2, with the intent of supporting most PostgreSQL functionality and adding new functionality to supported distributed SQL databases.
-Client drivers listed below are supported for developing applications that connect to and interact with the YSQL API. Most of the drivers use [libpq](#libpq) and support the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
+For details on PostgreSQL feature support in YSQL, refer to [SQL feature support](../../explore/ysql-language-features/sql-feature-support/).
+
+Client drivers listed below are supported for developing applications that connect to and interact with the YSQL API. Most of the drivers use [libpq](#libpq) and support the [SCRAM-SHA-256 authentication method](../../secure/authentication/password-authentication/#scram-sha-256).
For help using these drivers with YSQL, ask your questions in the [Slack community]({{}}).
@@ -27,11 +33,11 @@ If you encounter an issue or have an enhancement request, [file a GitHub issue](
### libpq
-[libpq](https://www.postgresql.org/docs/11/libpq.html) is the C client library for connecting to and interacting with PostgreSQL databases. libpq is also the underlying engine used in other PostgreSQL application interfaces. The libpq client library supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
+[libpq](https://www.postgresql.org/docs/11/libpq.html) is the C client library for connecting to and interacting with PostgreSQL databases. libpq is also the underlying engine used in other PostgreSQL application interfaces. The libpq client library supports the [SCRAM-SHA-256 authentication method](../../secure/authentication/password-authentication/#scram-sha-256).
For details and documentation, refer to [libpq - C Library](https://www.postgresql.org/docs/11/libpq.html) for PostgreSQL 11 (on which YugabyteDB is based).
-For a tutorial on building a sample C application with libpq, refer to [Connect an application](../../../drivers-orms/c/ysql/).
+For a tutorial on building a sample C application with libpq, refer to [Connect an application](../c/ysql/).
#### Install the libpq client library
@@ -47,11 +53,11 @@ Homebrew users on macOS can install libpq using `brew install libpq`. You can do
### libpqxx
-The [libpqxx](http://pqxx.org/development/libpqxx/) driver is the official C++ client API for PostgreSQL. libpqxx is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
+The [libpqxx](http://pqxx.org/development/libpqxx/) driver is the official C++ client API for PostgreSQL. libpqxx is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../secure/authentication/password-authentication/#scram-sha-256).
For details and documentation, refer to the [libpqxx README](https://github.com/jtv/libpqxx#readme) and [libpqxx documentation](https://libpqxx.readthedocs.io/en/latest/).
-For a tutorial on building a sample C++ application with libpqxx, refer to [Connect an application](../../../drivers-orms/cpp/ysql/).
+For a tutorial on building a sample C++ application with libpqxx, refer to [Connect an application](../cpp/ysql/).
#### Install the libpqxx driver
@@ -82,7 +88,7 @@ $ make install
[Vert.x PG Client](https://vertx.io/docs/vertx-pg-client/java/) is the client for PostgreSQL with basic APIs to communicate with the database. It is a reactive and non-blocking client for handling the database connections with a single threaded API.
-For a tutorial on building a sample Java application with the Vert.x PG Client, see [Connect an application](../../../drivers-orms/java/ysql-vertx-pg-client/).
+For a tutorial on building a sample Java application with the Vert.x PG Client, see [Connect an application](../java/ysql-vertx-pg-client/).
To get the latest versions for projects using [Apache Maven](https://maven.apache.org), see [Maven Central Repository of Vert.x PG Client](https://mvnrepository.com/artifact/io.vertx/vertx-pg-client).
@@ -90,11 +96,11 @@ To get the latest versions for projects using [Apache Maven](https://maven.apach
### php-pgsql
-The [php-pgsql](https://www.php.net/manual/en/book.pgsql.php) driver is a collection of the official PostgreSQL module for PHP. php-pgsql is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
+The [php-pgsql](https://www.php.net/manual/en/book.pgsql.php) driver is a collection of the official PostgreSQL module for PHP. php-pgsql is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../secure/authentication/password-authentication/#scram-sha-256).
For details on installing and using php-pgsql, see the [php-pgsql documentation](https://www.php.net/manual/en/book.pgsql.php).
-For a tutorial on building a sample PHP application with php-pgsql, see [Connect an application](../../../drivers-orms/php/ysql/).
+For a tutorial on building a sample PHP application with php-pgsql, see [Connect an application](../php/ysql/).
#### Install the php-pgsql driver
@@ -112,7 +118,7 @@ CentOS users can install the driver using the `sudo yum install php-pgsql` comma
[aiopg](https://aiopg.readthedocs.io/en/stable/) is a library for accessing a PostgreSQL database using the asyncio (PEP-3156/tulip) framework. It wraps asynchronous features of the [Psycopg](https://www.psycopg.org/) database driver. For details on using aiopg, see [aiopg documentation](https://aiopg.readthedocs.io/en/stable/).
-For a tutorial on building a sample Python application that uses aiopg, see [YSQL Aiopg](../../../drivers-orms/python/aiopg/).
+For a tutorial on building a sample Python application that uses aiopg, see [YSQL Aiopg](../python/aiopg/).
#### Install
@@ -126,9 +132,9 @@ pip3 install aiopg
### pg
-[pg](https://github.com/ged/ruby-pg) is the Ruby interface for PostgreSQL databases. pg is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
+[pg](https://github.com/ged/ruby-pg) is the Ruby interface for PostgreSQL databases. pg is based on [libpq](#libpq) and supports the [SCRAM-SHA-256 authentication method](../../secure/authentication/password-authentication/#scram-sha-256).
-For a tutorial on building a sample Ruby application with pg, see [Connect an application](../../../drivers-orms/ruby/ysql-pg/).
+For a tutorial on building a sample Ruby application with pg, see [Connect an application](../ruby/ysql-pg/).
#### Install the pg driver
@@ -150,9 +156,9 @@ Replace `` with the path to the libpq installation; for example,
### Rust-Postgres
-[Rust-Postgres](https://github.com/sfackler/rust-postgres) is the Rust interface for PostgreSQL databases. Rust-Postgres is not based on libpq, but supports the [SCRAM-SHA-256 authentication method](../../../secure/authentication/password-authentication/#scram-sha-256).
+[Rust-Postgres](https://github.com/sfackler/rust-postgres) is the Rust interface for PostgreSQL databases. Rust-Postgres is not based on libpq, but supports the [SCRAM-SHA-256 authentication method](../../secure/authentication/password-authentication/#scram-sha-256).
-For a tutorial on building a sample Ruby application with Rust-Postgres, see [Build a Rust application](/preview/tutorials/build-apps/rust/cloud-ysql-rust/).
+For a tutorial on building a sample Ruby application with Rust-Postgres, see [Build a Rust application](../../tutorials/build-apps/rust/cloud-ysql-rust/).
#### Install the Rust-Postgres driver
diff --git a/docs/content/stable/explore/change-data-capture/using-logical-replication/yugabytedb-connector.md b/docs/content/stable/explore/change-data-capture/using-logical-replication/yugabytedb-connector.md
index b120352505df..650e6eb15928 100644
--- a/docs/content/stable/explore/change-data-capture/using-logical-replication/yugabytedb-connector.md
+++ b/docs/content/stable/explore/change-data-capture/using-logical-replication/yugabytedb-connector.md
@@ -1364,7 +1364,7 @@ Procedure
### Supported YugabyteDB topologies
-As mentioned in the beginning, YugabyteDB (for all versions > 2024.1.1) supports logical replication slots. The YugabyteDB connector can communicate with the server by connecting to any node using the [YugabyteDB Java driver](../../../../reference/drivers/java/yugabyte-jdbc-reference). Should any node fail, the connector receives an error and restarts. Upon restart, the connector connects to any available node and continues streaming from that node.
+As mentioned, YugabyteDB (for all versions > 2024.1.1) supports logical replication slots. The YugabyteDB connector can communicate with the server by connecting to any node using the [YugabyteDB Java driver](../../../../drivers-orms/java/yugabyte-jdbc-reference/). Should any node fail, the connector receives an error and restarts. Upon restart, the connector connects to any available node and continues streaming from that node.
### Setting up multiple connectors for same database server
diff --git a/docs/content/stable/develop/learn/sql-nosql.md b/docs/content/stable/explore/sql-nosql.md
similarity index 70%
rename from docs/content/stable/develop/learn/sql-nosql.md
rename to docs/content/stable/explore/sql-nosql.md
index 0ce0923c4697..340b647c015b 100644
--- a/docs/content/stable/develop/learn/sql-nosql.md
+++ b/docs/content/stable/explore/sql-nosql.md
@@ -6,22 +6,22 @@ description: Learn how YugabyteDB brings the best of SQL and NoSQL together into
menu:
stable:
identifier: sql-nosql
- parent: learn
- weight: 130
+ parent: explore
+ weight: 10
type: docs
---
Most application developers have used SQL, and possibly some NoSQL databases, to build applications. YugabyteDB brings the best of these two databases together into one unified platform to simplify development of scalable cloud services.
-Very often, today's cloud services and applications will start out with just a few requests and a very small amount of data. These can be served by just a few nodes. But if the application becomes popular, they would have to scale out rapidly in order to handle millions of requests and many terabytes of data. YugabyteDB is well suited for these kinds of workloads.
+Very often, cloud services and applications start out with just a few requests and a very small amount of data. These can be served by just a few nodes. But if the application becomes popular, they would have to scale out rapidly to handle millions of requests and many terabytes of data. YugabyteDB is well suited for these kinds of workloads.
## Unifying SQL and NoSQL
-Here are a few different criteria where YugabyteDB brings the best of SQL and NoSQL together into a single database platform.
+YugabyteDB combines database and operational characteristics of SQL and NoSQL together in a single database platform.
### Database characteristics
-These can be loosely defined as the high-level concerns when choosing a database to build an application or a cloud service - such as its data model, the API it supports, its consistency semantics, and so on. The following table contrasts what YugabyteDB offers with SQL and NoSQL databases in general. Note that there are a number of different NoSQL databases each with their own nuanced behavior, and the table is not accurate for all NoSQL databases - it is just meant to give an idea.
+These can be loosely defined as the high-level concerns when choosing a database to build an application or a cloud service - such as its data model, the API it supports, its consistency semantics, and so on. The following table contrasts what YugabyteDB offers with SQL and NoSQL databases in general. Note that there are a number of different NoSQL databases each with their own nuanced behavior, and the table is not accurate for all NoSQL databases - it's just meant to give an idea.
| Characteristic | SQL | NoSQL | YugabyteDB |
| --------------- | ---------------- | ------------------ | ------------------ |
@@ -29,35 +29,35 @@ These can be loosely defined as the high-level concerns when choosing a database
| API | SQL | Various | Fully-relational SQL + Semi-relational SQL |
| Consistency | Strong | Eventual | Strong |
| Transactions | ACID | None | ACID |
-| High write throughput | No | Sometimes | Yes
-| Tunable read latency | No | Yes | Yes
+| High write throughput | No | Sometimes | Yes |
+| Tunable read latency | No | Yes | Yes |
### Operational characteristics
-Operational characteristics can be defined as the runtime concerns that arise when a database is deployed, run, and managed in production. When running a database in production in a cloud-like architecture, a number of operational characteristics become essential. The following table compares the capabilities of YugabyteDB to SQL and NoSQL databases. As with the preceding section, there are a number of NoSQL databases which are different in their own ways and the following table is meant to give a broad idea.
+Operational characteristics are the runtime concerns that arise when a database is deployed, run, and managed in production. When running a database in production in a cloud-like architecture, a number of operational characteristics become essential. The following table compares the capabilities of YugabyteDB to SQL and NoSQL databases. As with the preceding section, there are a number of NoSQL databases which are different in their own ways and the following table is meant to give a broad idea.
-The following table lists some of the important features that YugabyteDB supports, and the API to use to leverage the feature. Note that typically, multiple databases are deployed to achieve the same functionality.
+The following table lists some of the important features that YugabyteDB supports. Note that typically multiple databases are deployed to achieve the same functionality.
| Operational characteristics | SQL | NoSQL | YugabyteDB |
| --------------- | ---------------- | ------------------ | ------------------ |
-| Automatic sharding | No | Sometimes | Yes
-| Linear scalability | No | Yes | Yes
-| Fault tolerance | No - manual setup | Yes - smart client detects failed nodes | Yes - smart client detects failed nodes
-| Data resilience | No | Yes - but rebuilds cause high latencies | Yes - automatic, efficient data rebuilds
-| Geo-distributed | No - manual setup | Sometimes | Yes
-| Low latency reads | No | Yes | Yes
-| Predictable p99 read latency | Yes | No | Yes
-| High data density | No | Sometimes - latencies suffer when densities increase | Yes - predictable latencies at high data densities
-| Tunable reads with timeline consistency | No - manual setup | Sometimes | Yes
-| Read replica support | No - manual setup | No - no asynchronous replication | Yes - synchronous and asynchronous replication options
+| Automatic sharding | No | Sometimes | Yes |
+| Linear scalability | No | Yes | Yes |
+| Fault tolerance | No - manual setup | Yes - smart client detects failed nodes | Yes - smart client detects failed nodes |
+| Data resilience | No | Yes - but rebuilds cause high latencies | Yes - automatic, efficient data rebuilds |
+| Geo-distributed | No - manual setup | Sometimes | Yes |
+| Low latency reads | No | Yes | Yes |
+| Predictable p99 read latency | Yes | No | Yes |
+| High data density | No | Sometimes - latencies suffer when densities increase | Yes - predictable latencies at high data densities |
+| Tunable reads with timeline consistency | No - manual setup | Sometimes | Yes |
+| Read replica support | No - manual setup | No - no asynchronous replication | Yes - synchronous and asynchronous replication options |
## Core features
-Applications and cloud services depend on databases for a variety of built-in features. These can include the ability to perform multi-row transactions, JSON or document support, secondary indexes, automatic data expiration with TTLs, and so on.
+Applications and cloud services depend on databases for a variety of built-in features. These can include the ability to perform multi-row transactions, JSON or document support, secondary indexes, automatic data expiration with time to live (TTL), and so on.
-Here is a table that lists some of the important features that YugabyteDB supports, and which of YugabyteDB's APIs to use in order to achieve these features. Note that typically, multiple databases are deployed in order to achieve these features.
+The following table lists some of the important features that YugabyteDB supports, and which YugabyteDB APIs support these features. Note that typically multiple databases are deployed to achieve these features.
-| Database features | [Yugabyte SQL API](../../../api/ysql/) | [Yugabyte Cloud QL API](../../../api/ycql/) |
+| Database features | [Yugabyte SQL API](../../api/ysql/) | [Yugabyte Cloud QL API](../../api/ycql/) |
| --------------- | ---------------- | ------------------ |
| Multi-row transactions | Yes | Yes |
| Consistent secondary indexes | Yes | Yes |
@@ -65,7 +65,7 @@ Here is a table that lists some of the important features that YugabyteDB suppor
| Secondary Indexes | Yes | Yes |
| Foreign keys | Yes | No |
| JOINs | Yes | No |
-| Automatic data expiry with TTL | No | Yes - table and column level TTL |
+| Automatic data expiry with TTL | No | Yes - table- and column-level TTL |
| Run Apache Spark for AI/ML | No | Yes |
## Linear scalability
diff --git a/docs/content/stable/reference/configuration/all-flags-yb-master.md b/docs/content/stable/reference/configuration/all-flags-yb-master.md
index fff8164ba7dd..e402279d0049 100644
--- a/docs/content/stable/reference/configuration/all-flags-yb-master.md
+++ b/docs/content/stable/reference/configuration/all-flags-yb-master.md
@@ -9,7 +9,7 @@ menu:
type: indexpage
---
-Use the yb-master binary and its flags to configure the [YB-Master](../../../architecture/concepts/yb-master/) server. The yb-master executable file is located in the `bin` directory of YugabyteDB home. For more detailed information about flags commonly used for production deployments and instructions on using yb-master, refer to the [yb-master](../yb-master/) documentation.
+Use the yb-master binary and its flags to configure the [YB-Master](../../../architecture/yb-master/) server. The yb-master executable file is located in the `bin` directory of YugabyteDB home. For more detailed information about flags commonly used for production deployments and instructions on using yb-master, refer to the [yb-master](../yb-master/) documentation.
For a list of all YB-TServer flags, see [All YB-TServer flags](../all-flags-yb-tserver/).
diff --git a/docs/content/stable/reference/configuration/all-flags-yb-tserver.md b/docs/content/stable/reference/configuration/all-flags-yb-tserver.md
index 758ed5a3d0fb..abd987f40ace 100644
--- a/docs/content/stable/reference/configuration/all-flags-yb-tserver.md
+++ b/docs/content/stable/reference/configuration/all-flags-yb-tserver.md
@@ -9,7 +9,7 @@ menu:
type: indexpage
---
-Use the yb-tserver binary and its flags to configure the [YB-TServer](../../../architecture/concepts/yb-tserver/) server. The yb-tserver executable file is located in the `bin` directory of YugabyteDB home. For more detailed information about flags commonly used for production deployments and instructions on using yb-tserver, refer to the [yb-tserver](../yb-tserver/) documentation.
+Use the yb-tserver binary and its flags to configure the [YB-TServer](../../../architecture/yb-tserver/) server. The yb-tserver executable file is located in the `bin` directory of YugabyteDB home. For more detailed information about flags commonly used for production deployments and instructions on using yb-tserver, refer to the [yb-tserver](../yb-tserver/) documentation.
For a list of all YB-Master flags, see [All YB-Master flags](../all-flags-yb-master/).
diff --git a/docs/content/stable/reference/configuration/yb-master.md b/docs/content/stable/reference/configuration/yb-master.md
index cf20e58fd162..aad8ba56d9e8 100644
--- a/docs/content/stable/reference/configuration/yb-master.md
+++ b/docs/content/stable/reference/configuration/yb-master.md
@@ -983,6 +983,16 @@ expensive when the number of yb-tservers, or the number of databases goes up.
## Advanced flags
+##### --allowed_preview_flags_csv
+
+This is a comma-separated values (CSV) formatted catalogue of [preview feature](/preview/releases/versioning/#tech-preview-tp) flag names. Preview flags represent experimental or in-development features that are not yet fully supported. Flags that are tagged as "preview" cannot be modified or configured unless they are included in this list.
+
+By adding a flag to this list, you explicitly acknowledge and accept any potential risks or instability that may arise from modifying these preview features. This process serves as a safeguard, ensuring that you are fully aware of the experimental nature of the flags you are working with.
+
+{{}}
+Inclusion in this list doesn't automatically change any settings. It only grants permission for the flag to be modified. You'll still need to configure the flag separately after adding it to this list.
+{{}}
+
##### --ysql_index_backfill_rpc_timeout_ms
Deadline (in milliseconds) for each internal YB-Master to YB-TServer RPC for backfilling a chunk of the index.
diff --git a/docs/content/stable/reference/drivers/_index.md b/docs/content/stable/reference/drivers/_index.md
deleted file mode 100644
index 335a32fbfed5..000000000000
--- a/docs/content/stable/reference/drivers/_index.md
+++ /dev/null
@@ -1,92 +0,0 @@
----
-title: YugabyteDB Drivers and ORMs
-headerTitle: Drivers and ORMs
-linkTitle: Drivers and ORMs
-description: Use drivers to power applications with YugabyteDB.
-headcontent: Drivers and ORMs reference
-image: /images/section_icons/sample-data/s_s1-sampledata-3x.png
-menu:
- stable:
- identifier: drivers
- parent: reference
- weight: 2750
-type: indexpage
----
-
-### YSQL driver reference
-
-