diff --git a/versioned_docs/version-3.12/develop-run-non-transactional-operations-overview.mdx b/versioned_docs/version-3.12/develop-run-non-transactional-operations-overview.mdx index a4c22448..c8f543a6 100644 --- a/versioned_docs/version-3.12/develop-run-non-transactional-operations-overview.mdx +++ b/versioned_docs/version-3.12/develop-run-non-transactional-operations-overview.mdx @@ -14,8 +14,4 @@ ScalarDB can be configured to provide only the unified abstraction, without tran In this sub-category, you can learn how to run such non-transactional storage operations. -- Run Through the CRUD Interface - - [Use the ScalarDB Core Library](run-non-transactional-storage-operations-through-library.mdx) - - [Use ScalarDB Cluster](scalardb-cluster/run-non-transactional-storage-operations-through-scalardb-cluster.mdx) -- [Run Through the SQL Interface](scalardb-cluster/run-non-transactional-storage-operations-through-sql-interface.mdx) - [Run Through the Primitive CRUD Interface](run-non-transactional-storage-operations-through-primitive-crud-interface.mdx) diff --git a/versioned_docs/version-3.12/run-non-transactional-storage-operations-through-library.mdx b/versioned_docs/version-3.12/run-non-transactional-storage-operations-through-library.mdx deleted file mode 100644 index 49807f8d..00000000 --- a/versioned_docs/version-3.12/run-non-transactional-storage-operations-through-library.mdx +++ /dev/null @@ -1,271 +0,0 @@ ---- -tags: - - Community - - Enterprise Standard - - Enterprise Premium ---- - -# Run Non-Transactional Storage Operations Through the Core Library - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -This guide explains how to run non-transactional storage operations through the ScalarDB Core library. - -## Preparation - -For the purpose of this guide, you will set up a database and ScalarDB by using a sample in the ScalarDB samples repository. - -### Clone the ScalarDB samples repository - -Open **Terminal**, then clone the ScalarDB samples repository by running the following command: - -```console -git clone https://github.com/scalar-labs/scalardb-samples -``` - -Then, go to the directory that contains the necessary files by running the following command: - -```console -cd scalardb-samples/scalardb-sample -``` - -## Set up a database - -Select your database, and follow the instructions to configure it for ScalarDB. - -For a list of databases that ScalarDB supports, see [Databases](requirements.mdx#databases). - - - -

Run MySQL locally

- - You can run MySQL in Docker Compose by using the `docker-compose.yml` file in the `scalardb-samples/scalardb-sample` directory. - - To start MySQL, run the following command: - - ```console - docker compose up -d mysql - ``` - -

Configure ScalarDB

- - The **database.properties** file in the `scalardb-samples/scalardb-sample` directory contains database configurations for ScalarDB. Please uncomment the properties for MySQL in the **database.properties** file so that the configuration looks as follows: - - ```properties - # For MySQL - scalar.db.storage=jdbc - scalar.db.contact_points=jdbc:mysql://localhost:3306/ - scalar.db.username=root - scalar.db.password=mysql - ``` -
- -

Run PostgreSQL locally

- - You can run PostgreSQL in Docker Compose by using the `docker-compose.yml` file in the `scalardb-samples/scalardb-sample` directory. - - To start PostgreSQL, run the following command: - - ```console - docker compose up -d postgres - ``` - -

Configure ScalarDB

- - The **database.properties** file in the `scalardb-samples/scalardb-sample` directory contains database configurations for ScalarDB. Please uncomment the properties for PostgreSQL in the **database.properties** file so that the configuration looks as follows: - - ```properties - # For PostgreSQL - scalar.db.storage=jdbc - scalar.db.contact_points=jdbc:postgresql://localhost:5432/ - scalar.db.username=postgres - scalar.db.password=postgres - ``` -
- -

Run Oracle Database locally

- - You can run Oracle Database in Docker Compose by using the `docker-compose.yml` file in the `scalardb-samples/scalardb-sample` directory. - - To start Oracle Database, run the following command: - - ```console - docker compose up -d oracle - ``` - -

Configure ScalarDB

- - The **database.properties** file in the `scalardb-samples/scalardb-sample` directory contains database configurations for ScalarDB. Please uncomment the properties for Oracle Database in the **database.properties** file so that the configuration looks as follows: - - ```properties - # For Oracle - scalar.db.storage=jdbc - scalar.db.contact_points=jdbc:oracle:thin:@//localhost:1521/FREEPDB1 - scalar.db.username=SYSTEM - scalar.db.password=Oracle - ``` -
- -

Run SQL Server locally

- - You can run SQL Server in Docker Compose by using the `docker-compose.yml` file in the `scalardb-samples/scalardb-sample` directory. - - To start SQL Server, run the following command: - - ```console - docker compose up -d sqlserver - ``` - -

Configure ScalarDB

- - The **database.properties** file in the `scalardb-samples/scalardb-sample` directory contains database configurations for ScalarDB. Please uncomment the properties for SQL Server in the **database.properties** file so that the configuration looks as follows: - - ```properties - # For SQL Server - scalar.db.storage=jdbc - scalar.db.contact_points=jdbc:sqlserver://localhost:1433;encrypt=true;trustServerCertificate=true - scalar.db.username=sa - scalar.db.password=SqlServer22 - ``` -
- -

Run Amazon DynamoDB Local

- - You can run Amazon DynamoDB Local in Docker Compose by using the `docker-compose.yml` file in the `scalardb-samples/scalardb-sample` directory. - - To start Amazon DynamoDB Local, run the following command: - - ```console - docker compose up -d dynamodb - ``` - -

Configure ScalarDB

- - The **database.properties** file in the `scalardb-samples/scalardb-sample` directory contains database configurations for ScalarDB. Please uncomment the properties for Amazon DynamoDB Local in the **database.properties** file so that the configuration looks as follows: - - ```properties - # For DynamoDB Local - scalar.db.storage=dynamo - scalar.db.contact_points=sample - scalar.db.username=sample - scalar.db.password=sample - scalar.db.dynamo.endpoint_override=http://localhost:8000 - ``` -
- - To use Azure Cosmos DB for NoSQL, you must have an Azure account. If you don't have an Azure account, visit [Create an Azure Cosmos DB account](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/quickstart-portal#create-account). - -

Configure Cosmos DB for NoSQL

- - Set the **default consistency level** to **Strong** according to the official document at [Configure the default consistency level](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/how-to-manage-consistency#configure-the-default-consistency-level). - -

Configure ScalarDB

- - The following instructions assume that you have properly installed and configured the JDK in your local environment and properly configured your Cosmos DB for NoSQL account in Azure. - - The **database.properties** file in the `scalardb-samples/scalardb-sample` directory contains database configurations for ScalarDB. Be sure to change the values for `scalar.db.contact_points` and `scalar.db.password` as described. - - ```properties - # For Cosmos DB - scalar.db.storage=cosmos - scalar.db.contact_points= - scalar.db.password= - ``` - -:::note - -You can use the primary key or the secondary key in your Azure Cosmos DB account as the value for `scalar.db.password`. - -::: -
- -

Run Cassandra locally

- - You can run Apache Cassandra in Docker Compose by using the `docker-compose.yml` file in the `scalardb-samples/scalardb-sample` directory. - - To start Apache Cassandra, run the following command: - ```console - docker compose up -d cassandra - ``` - -

Configure ScalarDB

- - The **database.properties** file in the `scalardb-samples/scalardb-sample` directory contains database configurations for ScalarDB. Please uncomment the properties for Cassandra in the **database.properties** file so that the configuration looks as follows: - - ```properties - # For Cassandra - scalar.db.storage=cassandra - scalar.db.contact_points=localhost - scalar.db.username=cassandra - scalar.db.password=cassandra - ``` -
-
- -For a comprehensive list of configurations for ScalarDB, see [ScalarDB Configurations](configurations.mdx). - -## Configure ScalarDB to run non-transactional storage operations - -To run non-transactional storage operations, you need to configure the `scalar.db.transaction_manager` property to `single-crud-operation` in the configuration file **database.properties**: - -```properties -scalar.db.transaction_manager=single-crud-operation -``` - -## Create or import a schema - -ScalarDB has its own data model and schema that maps to the implementation-specific data model and schema. - -- **Need to create a database schema?** See [ScalarDB Schema Loader](schema-loader.mdx). -- **Need to import an existing database?** See [Importing Existing Tables to ScalarDB by Using ScalarDB Schema Loader](schema-loader-import.mdx). - -## Create your Java application - -This section describes how to add the ScalarDB Core library to your project and how to configure it to run non-transactional storage operations by using Java. - -### Add ScalarDB to your project - -The ScalarDB library is available on the [Maven Central Repository](https://mvnrepository.com/artifact/com.scalar-labs/scalardb). You can add the library as a build dependency to your application by using Gradle or Maven. - -Select your build tool, and follow the instructions to add the build dependency for ScalarDB to your application. - - - - To add the build dependency for ScalarDB by using Gradle, add the following to `build.gradle` in your application: - - ```gradle - dependencies { - implementation 'com.scalar-labs:scalardb:3.12.5' - } - ``` - - - To add the build dependency for ScalarDB by using Maven, add the following to `pom.xml` in your application: - - ```xml - - com.scalar-labs - scalardb - 3.12.5 - - ``` - - - -### Use the Java API - -For details about the Java API, see [ScalarDB Java API Guide](api-guide.mdx). - -:::note - -The following limitations apply to non-transactional storage operations: - -- Beginning a transaction is not supported. For more details, see [Execute transactions without beginning or starting a transaction](api-guide.mdx#execute-transactions-without-beginning-or-starting-a-transaction). -- Executing multiple mutations in a single transaction is not supported. - -::: - -### Learn more - -- [Javadoc](https://javadoc.io/doc/com.scalar-labs/scalardb/3.12.5/index.html) diff --git a/versioned_docs/version-3.12/scalardb-cluster/run-non-transactional-storage-operations-through-scalardb-cluster.mdx b/versioned_docs/version-3.12/scalardb-cluster/run-non-transactional-storage-operations-through-scalardb-cluster.mdx deleted file mode 100644 index b4f6f689..00000000 --- a/versioned_docs/version-3.12/scalardb-cluster/run-non-transactional-storage-operations-through-scalardb-cluster.mdx +++ /dev/null @@ -1,310 +0,0 @@ ---- -tags: - - Enterprise Standard - - Enterprise Premium ---- - -# Run Non-Transactional Storage Operations Through ScalarDB Cluster - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -This guide explains how to run non-transactional storage operations through ScalarDB Cluster. - -:::warning - -You need to have a license key (trial license or commercial license) for ScalarDB Cluster. If you don't have a license key, please [contact us](https://www.scalar-labs.com/contact). - -::: - -## Preparation - -For the purpose of this guide, you will set up a database and ScalarDB Cluster in standalone mode by using a sample in the ScalarDB samples repository. - -:::note - -ScalarDB Cluster in standalone mode is primarily for development and testing purposes. - -::: - -### Clone the ScalarDB samples repository - -Open **Terminal**, then clone the ScalarDB samples repository by running the following command: - -```console -git clone https://github.com/scalar-labs/scalardb-samples -``` - -Then, go to the directory that contains the necessary files by running the following command: - -```console -cd scalardb-samples/scalardb-cluster-standalone-mode -``` - -## Set up a database - -Select your database, and follow the instructions to configure it for ScalarDB Cluster. - -For a list of databases that ScalarDB supports, see [Databases](../requirements.mdx#databases). - - - -

Run MySQL locally

- - You can run MySQL in Docker Compose by using the `docker-compose.yaml` file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory. - - To start MySQL, run the following command: - - ```console - docker compose up -d mysql - ``` - -

Configure ScalarDB Cluster

- - The **scalardb-cluster-node.properties** file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory contains database configurations for ScalarDB Cluster. Please uncomment the properties for MySQL in the **scalardb-cluster-node.properties** file so that the configuration looks as follows: - - ```properties - # For MySQL - scalar.db.storage=jdbc - scalar.db.contact_points=jdbc:mysql://mysql-1:3306/ - scalar.db.username=root - scalar.db.password=mysql - ``` -
- -

Run PostgreSQL locally

- - You can run PostgreSQL in Docker Compose by using the `docker-compose.yaml` file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory. - - To start PostgreSQL, run the following command: - - ```console - docker compose up -d postgres - ``` - -

Configure ScalarDB Cluster

- - The **scalardb-cluster-node.properties** file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory contains database configurations for ScalarDB Cluster. Please uncomment the properties for PostgreSQL in the **scalardb-cluster-node.properties** file so that the configuration looks as follows: - - ```properties - # For PostgreSQL - scalar.db.storage=jdbc - scalar.db.contact_points=jdbc:postgresql://postgres-1:5432/ - scalar.db.username=postgres - scalar.db.password=postgres - ``` -
- -

Run Oracle Database locally

- - You can run Oracle Database in Docker Compose by using the `docker-compose.yaml` file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory. - - To start Oracle Database, run the following command: - - ```console - docker compose up -d oracle - ``` - -

Configure ScalarDB Cluster

- - The **scalardb-cluster-node.properties** file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory contains database configurations for ScalarDB Cluster. Please uncomment the properties for Oracle Database in the **scalardb-cluster-node.properties** file so that the configuration looks as follows: - - ```properties - # For Oracle - scalar.db.storage=jdbc - scalar.db.contact_points=jdbc:oracle:thin:@//oracle-1:1521/FREEPDB1 - scalar.db.username=SYSTEM - scalar.db.password=Oracle - ``` -
- -

Run SQL Server locally

- - You can run SQL Server in Docker Compose by using the `docker-compose.yaml` file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory. - - To start SQL Server, run the following command: - - ```console - docker compose up -d sqlserver - ``` - -

Configure ScalarDB Cluster

- - The **scalardb-cluster-node.properties** file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory contains database configurations for ScalarDB Cluster. Please uncomment the properties for SQL Server in the **scalardb-cluster-node.properties** file so that the configuration looks as follows: - - ```properties - # For SQL Server - scalar.db.storage=jdbc - scalar.db.contact_points=jdbc:sqlserver://sqlserver-1:1433;encrypt=true;trustServerCertificate=true - scalar.db.username=sa - scalar.db.password=SqlServer22 - ``` -
- -

Run Amazon DynamoDB Local

- - You can run Amazon DynamoDB Local in Docker Compose by using the `docker-compose.yaml` file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory. - - To start Amazon DynamoDB Local, run the following command: - - ```console - docker compose up -d dynamodb - ``` - -

Configure ScalarDB Cluster

- - The **scalardb-cluster-node.properties** file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory contains database configurations for ScalarDB Cluster. Please uncomment the properties for Amazon DynamoDB Local in the **scalardb-cluster-node.properties** file so that the configuration looks as follows: - - ```properties - # For DynamoDB Local - scalar.db.storage=dynamo - scalar.db.contact_points=sample - scalar.db.username=sample - scalar.db.password=sample - scalar.db.dynamo.endpoint_override=http://dynamodb-1:8000 - ``` -
- - To use Azure Cosmos DB for NoSQL, you must have an Azure account. If you don't have an Azure account, visit [Create an Azure Cosmos DB account](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/quickstart-portal#create-account). - -

Configure Cosmos DB for NoSQL

- - Set the **default consistency level** to **Strong** according to the official document at [Configure the default consistency level](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/how-to-manage-consistency#configure-the-default-consistency-level). - -

Configure ScalarDB Cluster

- - The following instructions assume that you have properly installed and configured the JDK in your local environment and properly configured your Cosmos DB for NoSQL account in Azure. - - The **scalardb-cluster-node.properties** file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory contains database configurations for ScalarDB Cluster. Be sure to change the values for `scalar.db.contact_points` and `scalar.db.password` as described. - - ```properties - # For Cosmos DB - scalar.db.storage=cosmos - scalar.db.contact_points= - scalar.db.password= - ``` - -:::note - -You can use the primary key or the secondary key in your Azure Cosmos DB account as the value for `scalar.db.password`. - -::: -
- -

Run Cassandra locally

- - You can run Apache Cassandra in Docker Compose by using the `docker-compose.yaml` file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory. - - To start Apache Cassandra, run the following command: - - ```console - docker compose up -d cassandra - ``` - -

Configure ScalarDB Cluster

- - The **scalardb-cluster-node.properties** file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory contains database configurations for ScalarDB Cluster. Please uncomment the properties for Cassandra in the **scalardb-cluster-node.properties** file so that the configuration looks as follows: - - ```properties - # For Cassandra - scalar.db.storage=cassandra - scalar.db.contact_points=cassandra-1 - scalar.db.username=cassandra - scalar.db.password=cassandra - ``` -
-
- -For a comprehensive list of configurations for ScalarDB, see [ScalarDB Configurations](../configurations.mdx). - -## Set up ScalarDB Cluster in standalone mode - -To set up ScalarDB Cluster in standalone mode, you'll need to configure ScalarDB Cluster to run non-transactional storage operations, set a license key, and then start ScalarDB Cluster. - -### Configure ScalarDB Cluster to run non-transactional storage operations - -To run non-transactional storage operations, you need to configure the `scalar.db.transaction_manager` property to `single-crud-operation` in the configuration file `scalardb-cluster-node.properties`: - -```properties -scalar.db.transaction_manager=single-crud-operation -``` - -### Set the license key - -Set the license key (trial license or commercial license) for the ScalarDB Clusters in the properties file. For details, see [How to Configure a Product License Key](../scalar-licensing/index.mdx). - -### Start ScalarDB Cluster in standalone mode - -To start ScalarDB Cluster in standalone mode, run the following command: - -:::note - -If you want to change other configurations for ScalarDB Cluster, update the `scalardb-cluster-node.properties` file before running the command below. - -::: - -```console -docker compose up -d scalardb-cluster-node -``` - -## Create or import a schema - -ScalarDB has its own data model and schema that maps to the implementation-specific data model and schema. - -- **Need to create a database schema?** See [Schema Loader for Cluster](developer-guide-for-scalardb-cluster-with-java-api.mdx#schema-loader-for-cluster). -- **Need to import an existing database?** See [Importing Existing Tables to ScalarDB by Using ScalarDB Schema Loader](../schema-loader-import.mdx). - -## Create your Java application - -This section describes how to add the ScalarDB Cluster Java Client SDK to your project and how to configure it to run non-transactional storage operations by using Java. - -### Add the ScalarDB Cluster Java Client SDK to your build - -The ScalarDB Cluster Java Client SDK is available in the [Maven Central Repository](https://mvnrepository.com/artifact/com.scalar-labs/scalardb-cluster-java-client-sdk). You can add the SDK as a build dependency to your application by using Gradle or Maven. - -Select your build tool, and follow the instructions to add the build dependency for the ScalarDB Cluster Java Client SDK to your application. - - - - To add the build dependency for the ScalarDB Cluster Java Client SDK by using Gradle, add the following to `build.gradle` in your application: - - ```gradle - dependencies { - implementation 'com.scalar-labs:scalardb-cluster-java-client-sdk:3.12.5' - } - ``` - - - To add the build dependency for the ScalarDB Cluster Java Client SDK by using Maven, add the following to `pom.xml` in your application: - - ```xml - - com.scalar-labs - scalardb-cluster-java-client-sdk - 3.12.5 - - ``` - - - -### Configure the ScalarDB Cluster Java SDK - -For details about configuring the ScalarDB Cluster Java SDK, see [Client configurations](developer-guide-for-scalardb-cluster-with-java-api.mdx#client-configurations) - -### Use the Java API - -For details about the Java API, see [ScalarDB Java API Guide](../api-guide.mdx). - -:::note - -The following limitations apply to non-transactional storage operations: - -- Beginning a transaction is not supported. For more details, see [Execute transactions without beginning or starting a transaction](../api-guide.mdx#execute-transactions-without-beginning-or-starting-a-transaction). -- Executing multiple mutations in a single transaction is not supported. - -::: - -### Learn more - -- [Javadoc](https://javadoc.io/doc/com.scalar-labs/scalardb/3.12.5/index.html) -- [Developer Guide for ScalarDB Cluster with the Java API](developer-guide-for-scalardb-cluster-with-java-api.mdx) diff --git a/versioned_docs/version-3.12/scalardb-cluster/run-non-transactional-storage-operations-through-sql-interface.mdx b/versioned_docs/version-3.12/scalardb-cluster/run-non-transactional-storage-operations-through-sql-interface.mdx deleted file mode 100644 index c65dedb7..00000000 --- a/versioned_docs/version-3.12/scalardb-cluster/run-non-transactional-storage-operations-through-sql-interface.mdx +++ /dev/null @@ -1,392 +0,0 @@ ---- -tags: - - Enterprise Premium ---- - -# Run Non-Transactional Storage Operations Through the SQL Interface - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -This guide explains how to run non-transactional storage operations through the SQL interface for ScalarDB Cluster. - -:::warning - -You need to have a license key (trial license or commercial license) for ScalarDB Cluster. If you don't have a license key, please [contact us](https://www.scalar-labs.com/contact). - -::: - -## Preparation - -For the purpose of this guide, you will set up a database and ScalarDB Cluster in standalone mode by using a sample in the ScalarDB samples repository. - -:::note - -ScalarDB Cluster in standalone mode is primarily for development and testing purposes. - -::: - -### Clone the ScalarDB samples repository - -Open **Terminal**, then clone the ScalarDB samples repository by running the following command: - -```console -git clone https://github.com/scalar-labs/scalardb-samples -``` - -Then, go to the directory that contains the necessary files by running the following command: - -```console -cd scalardb-samples/scalardb-cluster-standalone-mode -``` - -## Set up a database - -Select your database, and follow the instructions to configure it for ScalarDB Cluster. - -For a list of databases that ScalarDB supports, see [Databases](../requirements.mdx#databases). - - - -

Run MySQL locally

- - You can run MySQL in Docker Compose by using the `docker-compose.yaml` file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory. - - To start MySQL, run the following command: - - ```console - docker compose up -d mysql - ``` - -

Configure ScalarDB Cluster

- - The **scalardb-cluster-node.properties** file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory contains database configurations for ScalarDB Cluster. Please uncomment the properties for MySQL in the **scalardb-cluster-node.properties** file so that the configuration looks as follows: - - ```properties - # For MySQL - scalar.db.storage=jdbc - scalar.db.contact_points=jdbc:mysql://mysql-1:3306/ - scalar.db.username=root - scalar.db.password=mysql - ``` -
- -

Run PostgreSQL locally

- - You can run PostgreSQL in Docker Compose by using the `docker-compose.yaml` file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory. - - To start PostgreSQL, run the following command: - - ```console - docker compose up -d postgres - ``` - -

Configure ScalarDB Cluster

- - The **scalardb-cluster-node.properties** file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory contains database configurations for ScalarDB Cluster. Please uncomment the properties for PostgreSQL in the **scalardb-cluster-node.properties** file so that the configuration looks as follows: - - ```properties - # For PostgreSQL - scalar.db.storage=jdbc - scalar.db.contact_points=jdbc:postgresql://postgres-1:5432/ - scalar.db.username=postgres - scalar.db.password=postgres - ``` -
- -

Run Oracle Database locally

- - You can run Oracle Database in Docker Compose by using the `docker-compose.yaml` file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory. - - To start Oracle Database, run the following command: - - ```console - docker compose up -d oracle - ``` - -

Configure ScalarDB Cluster

- - The **scalardb-cluster-node.properties** file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory contains database configurations for ScalarDB Cluster. Please uncomment the properties for Oracle Database in the **scalardb-cluster-node.properties** file so that the configuration looks as follows: - - ```properties - # For Oracle - scalar.db.storage=jdbc - scalar.db.contact_points=jdbc:oracle:thin:@//oracle-1:1521/FREEPDB1 - scalar.db.username=SYSTEM - scalar.db.password=Oracle - ``` -
- -

Run SQL Server locally

- - You can run SQL Server in Docker Compose by using the `docker-compose.yaml` file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory. - - To start SQL Server, run the following command: - - ```console - docker compose up -d sqlserver - ``` - -

Configure ScalarDB Cluster

- - The **scalardb-cluster-node.properties** file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory contains database configurations for ScalarDB Cluster. Please uncomment the properties for SQL Server in the **scalardb-cluster-node.properties** file so that the configuration looks as follows: - - ```properties - # For SQL Server - scalar.db.storage=jdbc - scalar.db.contact_points=jdbc:sqlserver://sqlserver-1:1433;encrypt=true;trustServerCertificate=true - scalar.db.username=sa - scalar.db.password=SqlServer22 - ``` -
- -

Run Amazon DynamoDB Local

- - You can run Amazon DynamoDB Local in Docker Compose by using the `docker-compose.yaml` file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory. - - To start Amazon DynamoDB Local, run the following command: - - ```console - docker compose up -d dynamodb - ``` - -

Configure ScalarDB Cluster

- - The **scalardb-cluster-node.properties** file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory contains database configurations for ScalarDB Cluster. Please uncomment the properties for Amazon DynamoDB Local in the **scalardb-cluster-node.properties** file so that the configuration looks as follows: - - ```properties - # For DynamoDB Local - scalar.db.storage=dynamo - scalar.db.contact_points=sample - scalar.db.username=sample - scalar.db.password=sample - scalar.db.dynamo.endpoint_override=http://dynamodb-1:8000 - ``` -
- - To use Azure Cosmos DB for NoSQL, you must have an Azure account. If you don't have an Azure account, visit [Create an Azure Cosmos DB account](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/quickstart-portal#create-account). - -

Configure Cosmos DB for NoSQL

- - Set the **default consistency level** to **Strong** according to the official document at [Configure the default consistency level](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/how-to-manage-consistency#configure-the-default-consistency-level). - -

Configure ScalarDB Cluster

- - The following instructions assume that you have properly installed and configured the JDK in your local environment and properly configured your Cosmos DB for NoSQL account in Azure. - - The **scalardb-cluster-node.properties** file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory contains database configurations for ScalarDB Cluster. Be sure to change the values for `scalar.db.contact_points` and `scalar.db.password` as described. - - ```properties - # For Cosmos DB - scalar.db.storage=cosmos - scalar.db.contact_points= - scalar.db.password= - ``` - -:::note - -You can use the primary key or the secondary key in your Azure Cosmos DB account as the value for `scalar.db.password`. - -::: -
- -

Run Cassandra locally

- - You can run Apache Cassandra in Docker Compose by using the `docker-compose.yaml` file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory. - - To start Apache Cassandra, run the following command: - - ```console - docker compose up -d cassandra - ``` - -

Configure ScalarDB Cluster

- - The **scalardb-cluster-node.properties** file in the `scalardb-samples/scalardb-cluster-standalone-mode` directory contains database configurations for ScalarDB Cluster. Please uncomment the properties for Cassandra in the **scalardb-cluster-node.properties** file so that the configuration looks as follows: - - ```properties - # For Cassandra - scalar.db.storage=cassandra - scalar.db.contact_points=cassandra-1 - scalar.db.username=cassandra - scalar.db.password=cassandra - ``` -
-
- -For a comprehensive list of configurations for ScalarDB, see [ScalarDB Configurations](../configurations.mdx). - -## Set up ScalarDB Cluster in standalone mode - -To set up ScalarDB Cluster in standalone mode, you'll need to configure ScalarDB Cluster to run non-transactional storage operations, set a license key, and then start ScalarDB Cluster. - -### Configure ScalarDB Cluster to run non-transactional storage operations - -To run non-transactional storage operations, you need to configure the `scalar.db.transaction_manager` property to `single-crud-operation` in the configuration file `scalardb-cluster-node.properties`: - -```properties -scalar.db.transaction_manager=single-crud-operation -``` - -### Set the license key - -Set the license key (trial license or commercial license) for the ScalarDB Clusters in the properties file. For details, see [How to Configure a Product License Key](../scalar-licensing/index.mdx). - -### Start ScalarDB Cluster in standalone mode - -To start ScalarDB Cluster in standalone mode, run the following command: - -:::note - -If you want to change other configurations for ScalarDB Cluster, update the `scalardb-cluster-node.properties` file before running the command below. - -::: - -```console -docker compose up -d scalardb-cluster-node -``` - -## Create or import a schema - -ScalarDB has its own data model and schema that maps to the implementation-specific data model and schema. - -- **Need to create a database schema?** See [SQL CLI](developer-guide-for-scalardb-cluster-with-java-api.mdx#sql-cli). -- **Need to import an existing database?** See [Importing Existing Tables to ScalarDB by Using ScalarDB Schema Loader](../schema-loader-import.mdx). - -Also, for a list of supported DDLs, see [ScalarDB SQL Grammar](../scalardb-sql/grammar.mdx). - -## Create your application - - - -

Configure your JDBC application

- - This section describes how to add the ScalarDB JDBC driver to your project and how to configure it to run non-transactional storage operations by using Java. - -

Add the ScalarDB JDBC driver to your project

- - You can add the ScalarDB JDBC driver as a build dependency to your application by using Gradle or Maven. - - Select your build tool, and follow the instructions to add the build dependency for the ScalarDB JDBC driver to your application. - - - - To add the build dependency for the ScalarDB JDBC driver by using Gradle, add the following to `build.gradle` in your application: - - ```gradle - dependencies { - implementation 'com.scalar-labs:scalardb-sql-jdbc:3.12.5' - implementation 'com.scalar-labs:scalardb-cluster-java-client-sdk:3.12.5' - } - ``` - - - To add the build dependency for the ScalarDB SQL API by using Maven, add the following to `pom.xml` in your application: - - ```xml - - - com.scalar-labs - scalardb-sql-jdbc - 3.12.5 - - - com.scalar-labs - scalardb-cluster-java-client-sdk - 3.12.5 - - - ``` - - - -

Configure the ScalarDB Cluster Java SDK for the SQL interface

- - For details about configuring the ScalarDB Cluster Java SDK for the SQL interface, see [ScalarDB Cluster SQL client configurations](developer-guide-for-scalardb-cluster-with-java-api.mdx#scalardb-cluster-sql-client-configurations). - -

Use the JDBC API

- - For details about the JDBC API, see [ScalarDB JDBC Guide](../scalardb-sql/jdbc-guide.mdx). - -:::note - -The following limitations apply to non-transactional storage operations: - -- Beginning a transaction is not supported. -- Executing multiple mutations in a single SQL statement is not supported. -- The isolation level is always `READ_COMMITTED`. - -::: - -

Learn more

- - - [Developer Guide for ScalarDB Cluster with the Java API](developer-guide-for-scalardb-cluster-with-java-api.mdx) - - [Java JDBC API](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) -
- -

Configure your Java application

- - This section describes how to add the ScalarDB SQL API to your project and how to configure it to run non-transactional storage operations by using Java. - -

Add ScalarDB SQL API to your project

- - You can add the ScalarDB SQL API as a build dependency to your application by using Gradle or Maven. - - Select your build tool, and follow the instructions to add the build dependency for the ScalarDB SQL API to your application. - - - - To add the build dependency for the ScalarDB SQL API by using Gradle, add the following to `build.gradle` in your application: - - ```gradle - dependencies { - implementation 'com.scalar-labs:scalardb-sql:3.12.5' - implementation 'com.scalar-labs:scalardb-cluster-java-client-sdk:3.12.5' - } - ``` - - - To add the build dependency for the ScalarDB SQL API by using Maven, add the following to `pom.xml` in your application: - - ```xml - - - com.scalar-labs - scalardb-sql - 3.12.5 - - - com.scalar-labs - scalardb-cluster-java-client-sdk - 3.12.5 - - - ``` - - - -

Configure the ScalarDB Cluster Java SDK for the SQL interface

- - For details about configuring the ScalarDB Cluster Java SDK for the SQL interface, see [ScalarDB Cluster SQL client configurations](developer-guide-for-scalardb-cluster-with-java-api.mdx#scalardb-cluster-sql-client-configurations). - -

Use the Java API

- - For details about the SQL API, see [ScalarDB SQL API Guide](../scalardb-sql/sql-api-guide.mdx). - -:::note - -The following limitations apply to non-transactional storage operations: - -- Beginning a transaction is not supported. -- Executing multiple mutations in a single SQL statement is not supported. -- The isolation level is always `READ_COMMITTED`. - -::: - - -

Learn more

- - - [Javadoc](https://javadoc.io/doc/com.scalar-labs/scalardb-sql/3.12.5/index.html) - -
-
diff --git a/versioned_sidebars/version-3.12-sidebars.json b/versioned_sidebars/version-3.12-sidebars.json index e194ef90..27a538fc 100644 --- a/versioned_sidebars/version-3.12-sidebars.json +++ b/versioned_sidebars/version-3.12-sidebars.json @@ -240,28 +240,6 @@ "id": "develop-run-non-transactional-operations-overview" }, "items": [ - { - "type": "category", - "label": "Run Through the CRUD Interface", - "collapsible": true, - "items": [ - { - "type": "doc", - "id": "run-non-transactional-storage-operations-through-library", - "label": "Use the ScalarDB Core Library" - }, - { - "type": "doc", - "id": "scalardb-cluster/run-non-transactional-storage-operations-through-scalardb-cluster", - "label": "Use ScalarDB Cluster" - } - ] - }, - { - "type": "doc", - "id": "scalardb-cluster/run-non-transactional-storage-operations-through-sql-interface", - "label": "Run Through the SQL Interface" - }, { "type": "doc", "id": "run-non-transactional-storage-operations-through-primitive-crud-interface",