lab_code: demo_701
title_en: Working with TiDB Cloud Using JDBC
title_zh: 通过 JDBC 使用 TiDB Cloud
title_ja: JDBC で TiDB Cloud を活用する
title_ko: JDBC를 사용하여 TiDB Cloud 활용
description_en:
  "In this lab, you will learn how to: Connect to, access and modify
  data in TiDB Cloud Starter cluster by Java; Use prepared statements and batch
  inserts to improve the performance of your application; Use AUTO_RANDOM instead
  of AUTO_INCREMENT to avoid hotspots; Use online DDL to perform online schema changes;
  Use and compare pessimistic and optimistic modes for transaction concurrency control."
description_zh:
  在本实验中，您将学习如何：通过 Java 代码连接、访问和修改 TiDB Cloud Starter 集群中的数据；使用预准备语句和批量插入来提高应用程序的性能；使用
  AUTO_RANDOM 代替 AUTO_INCREMENT 以避免热点；使用在线 DDL 执行在线架构更改；使用并比较悲观和乐观模式进行事务并发控制。
description_ja:
  "この演習では、次のことを学びます: Java コードを使用して、TiDB Cloud Starter クラスタに接続し、データにアクセスして変更する方法;
  プリペアドステートメントとバッチ挿入を使用して、アプリケーションのパフォーマンスを向上させる方法; ホットスポットを回避するためにAUTO_INCREMENTの代わりにAUTO_RANDOMを使用する方法;
  オンラインDDLを使用してオンラインスキーマ変更を実行する方法; トランザクションの同時実行制御のために悲観的モードと楽観的モードを使用して比較する方法。"
description_ko:
  "이 실습에서는 다음을 배우게 됩니다: Java 코드를 사용하여 TiDB Cloud Starter 클러스터에 연결하고
  데이터에 액세스하고 수정하는 방법; 애플리케이션의 성능을 향상시키기 위해 준비된 문장과 배치 삽입을 사용하는 방법; AUTO_INCREMENT
  대신 AUTO_RANDOM을 사용하여 화염 지점을 피하는 방법; 온라인 DDL을 사용하여 온라인 스키마 변경을 수행하는 방법; 트랜잭션 동시성
  제어를 위해 비관적 모드와 낙관적 모드를 사용하고 비교하는 방법。"
splash_image_en: https://lab-static.pingcap.com/quick-demo/demo_201_en.png
splash_image_zh: https://lab-static.pingcap.com/quick-demo/demo_201_en.png
splash_image_ja: https://lab-static.pingcap.com/quick-demo/demo_201_en.png
splash_image_ko: https://lab-static.pingcap.com/quick-demo/demo_201_en.png
lab_level: Beginner
category_en:
  - TiDB Cloud
  - Java
category_zh:
  - TiDB Cloud
  - Java
category_ja:
  - TiDB Cloud
  - Java
category_ko:
  - TiDB Cloud
  - Java
authors:
  - Cheese Wong (CEG)
  - Chenhao Huang (CEG)
delivery_type: Self-Paced
tidb_environments:
  - TiDB Cloud Starter
tidb_versions: []
target_audience:
  - Developer
  - DevOps
regions:
  aws:
    - tokyo
    - oregon
    - singapore
    - frankfurt
  #alicloud:
  #  - singapore
credits: 1
credit_redeemable: true
employee_only: false
estimated_duration_minutes: 120

requirements:
  - type: CloudStack
  - type: TiDBServerlessCluster

topology:
  - role: monitor
    node_count: 1
    ssh_user: ubuntu
    https_reverse_proxy: true

bootstrap:
  - name: "prepare monitor"
    type: "ShellScript"
    target:
      - monitor1
    script: ./scripts/prepare-monitor.sh

features:
  enable_content_explain: false
