EN: |+| [Music] |+| Hello, welcome by the TiDB Specific Features and Transaction Control |+| training.
JA: |+| [音楽] |+| こんにちは、TiDB特別機能およびトランザクションコントロール |+| トレーニングへようこそ。

EN: I'm Daniel Van Eden and I will be your instructor today.
JA: 私はダニエル・バン・エイデンです。今日はあなたの講師をつとめます。

EN: |+| First off we will start with the data definition language.
JA: |+| 最初に、データ定義言語から始めます。

EN: |+| The objectives of this training are creating and dropping databases, describing database |+| character sets.
JA: |+| このトレーニングの目的は、データベースの作成と削除、|+| データベース文字セットの記述です。 

EN: Creating, modifying, deleting and flashback tables.
JA: テーブルの作成、変更、削除、フラッシュバック。

EN: |+| Use table and index related DDL.
JA: |+| テーブルとインデックスに関連するDDLを使用します。

EN: DDL here stands for data definition language as we said before.
JA: DDL は前に言ったようにデータ定義言語を意味します。

EN: |+| Describe and set column properties and table options.
JA: |+| カラムのプロパティとテーブルのオプションを説明し、設定します。

EN: |+| Creating indexes, primary keys, unique keys and other constraints.
JA: |+| インデックス、プライマリーキー、ユニークキー、およびその他の制約を作成します。

EN: |+| Working with cross geo location region placement rules.
JA: |+| クロスジオロケーションのリージョン配置ルールと一緒に作業します。

EN: Using cached tables.
JA: キャッシュされたテーブルを使用します。

EN: Using partition tables.
JA: パーティションテーブルを使用します。

EN: |+| And, last but not least, optimize analytical queries with TiFlash.
JA: |+| そして最後に、TiFlashを使用して解析クエリを最適化します。

EN: Let's start off with creating |+| database.
JA: データベースを |+| 作成してみましょいます。

EN: Database is usually a unique name and one database system like the TiDB can hold multiple |+| databases.
JA: データベースは通常、一意な名前であり、TiDBのような1つのデータベースシステムは、|+| 複数のデータベースを保持できます。 

EN: The syntax for creating a database is create database and then the database name.
JA: データベースを作成する構文は、 create database  であり、その後にデータベース名が続きます。

EN: |+| You can also exchange the word database for schema.
JA: |+| データベースという単語をスキーマという単語にも置き換えることができます。

EN: Both will work and give you the same result.
JA: 両方とも機能し、同じ結果を与えます。

EN: |+| The name schema and database in MySQL context usually referring to the same kind of object.
JA: |+| MySQLの文脈での名称スキーマとデータベースは通常、同じ種類のオブジェクトを指します。

EN: |+| Objects in the database can be named using regular English letters and underscores.
JA: |+| データベース内のオブジェクトには、通常の英字とアンダースコアを使って名前を付けることができます。

EN: The limit is 64 |+| characters.
JA: 制限は64 |+| 文字です。

EN: This is not only true for databases but for many other things.
JA: これはデータベースに限らず、多くの他のものにも当てはまります。

EN: There are some characters |+| you probably don't want to use in database names like ASCII 0, ASCII 255, slash, backslash, |+| etc.
JA: データベース名に |+| ASCII 0、ASCII 255、スラッシュ、バックスラッシュ、など、|+| 使用したくない文字がいくつかあります。 

EN: Well some of the other characters might be possible it's usually smarter to give the database |+| a short single name without spacesand without any special characters.
JA: 他の文字も可能ですが、通常はデータベースに特殊文字を含まない短い単一の |+| 名前をスペースなしで付けることが賢明です。

EN: |+| Because this is something you will be using over and over again.
JA: |+| これは何度も何度も使用することになるものなので、考える必要があります。

EN: TiDB stores |+| object names in case sensitive manner but compares them in a case insensitive manner.
JA: TiDBは |+| オブジェクト名を大文字小文字を区別して保存しますが、比較は大文字小文字を区別しない方法で行われます。

EN: |+| Dropping a database is simple just to drop database and then the database name here you can |+| also use drop schema which will also work.
JA: |+| データベースを削除するには、単にドロップデータベースを行い、ここにデータベース名を挿入するだけです。また、|+| ドロップスキーマを使用することもできます。

EN: There are some optional keywords that are available the |+| `IF EXISTS`, so you can say `DROP DATABASE IF EXISTS` and then the name of the database.
JA: オプションキーワード`IF EXISTS`が利用可能です。それにより、|+| `DROP DATABASE IF EXISTS`とデータベースの名前を指定できます。

EN: This changes |+| how the statement behaves case of failures so if you're trying to drop a database it doesn't |+| exist, normally you will get an error but with the `IF EXISTS` you won't get an error.
JA: これにより、|+| 文が失敗した場合の動作が変わるため、データベースを削除しようとしても存在しない場合、|+| 通常はエラーが発生しますが、`IF EXISTS`を使用するとエラーが発生しません。  

EN: This is usually |+| used to create databases or drop databases in a script or some other place that just wants to make |+| sure that database exists not create the database again if it already exists or have to deal with |+| errors.
JA: 通常、|+| これはスクリプトや他の場所で使用される、データベースが存在することを確認するだけで、|+| 再度データベースを作成したり、|+| エラーを対処したりする必要がないようにします。  

EN: A character set is a collection of symbols and encodings.
JA: 文字集合は、記号とエンコーディングのコレクションです。

EN: The default character |+| set in TiDB is utf8mb4 which matches the default character set in MySQL 8 and later.
JA: TiDBにおけるデフォルトの文字 |+| セットはutf8mb4で、これはMySQL 8以降のデフォルトの文字セットと一致します。

EN: |+| And it's also something we would definitely recommend you to use.
JA: |+| そして、それは私たちが間違いなくお使いいただくことをお勧めするものです。

EN: Collation is a rule |+| that compares characters in a character set and the sort of order of characters.
JA: コレーションは、|+| 文字セット内の文字を比較するルールであり、文字の並び順です。 

EN: |+| So, basically this defines two things.
JA: |+| そのため、基本的にはこれは2つのことを定義します。

EN: The first thing is the the set of characters you |+| can use if you restrict things to ASCII, for example you cannot use Chinese characters.
JA: ASCIIでの制限がある場合、使用できる文字のセットは最初のものです。|+| たとえば、中国語の文字を使用できません。が元の英語の文にある場合は、翻訳された結果にそれらを戻す必要があります。

EN: |+| With unicode you can use pretty much any kind of character that's defined in unicode.
JA: |+| Unicodeを使用すると、Unicodeで定義されたほとんどの種類の文字を実質的に使用できます。

EN: In MySQL |+| there is utf8 in their utf8mb4.
JA: MySQLには、|+| utf8mb4が含まれています。 

EN: We have the same in TiDB.
JA: TiDBにおいて、同じことがある」となります。

EN: We would definitely recommend you to |+| use utf8mb4 because it allows you to have four byte unicodes.
JA: utf8mb4を使うことを強くお勧めします。なぜなら、|+| 4バイトのユニコードを持つことができるためです。

EN: The utf8, that's |+| a an old Legacy encoding that only allows you to store up to three bytes of unicodes per character, |+| which restricts you in what you can do with the data.
JA: utf8は、|+| Unicodeの各文字に対し、最大3バイトのデータしか保存できない、|+| 古いレガシーエンコーディングであり、この制限によってデータの操作が制限されます。

EN: As you can see on the screen there are three |+| different correlations for utf8mb4.
JA: 画面上には、utf8mb4の3つの異なる |+| 相関関係があることがわかります。 

EN: This defines how characters are compared with each |+| other.
JA: この文は、どのように文字が互いに |+| 比較されるかを定義します。 

EN: And, this also defines the sorting order of the character.
JA: そして、これは文字の並べ替え順序も定義します。

EN: So, for example, if you want to |+| know if a lowercase a an uppercase a are the same character the database will use the rules defined |+| by the collation to do this.
JA: 小文字の「a」と大文字の「A」が同じ文字かどうか知りたい場合、|+| データベースは照合定義によって規定された |+| ルールを使用してこれを行います。  

EN: So, for `utf8mb4_bin`, lowercase a and uppercase A |+| are not considered to be the same.
JA: したがって、`utf8mb4_bin`において、小文字のaと大文字のA |+| は同じものとは見なされません。

EN: But for the case insensitive, collation is the one ending in CI, |+| these are considered to be the same.
JA: 大文字・小文字を区別しない場合、|+| 照合順序はCIで終わるものが同じものと見なされます。 

EN: And, then we have to collate clause.
JA: そして、次に私たちは節を照合しなければなりません。

EN: The collate |+| clause allows you to set the collation which is to be used for a specific comparison.
JA: COLLATE |+| 句は、特定の比較に使用されるコレーションを設定することができます。