LoginSignup
1
0

More than 3 years have passed since last update.

Cosmos DBを使ってみた

Last updated at Posted at 2019-11-28

Cosmos DBは新規作成時にSQL API, Table APIなどDBの種類を指定します。
指定した種類によって、使い方が変化します。

SQL APIで作成した場合

category 列で検索して3レコードヒット
1.png

タイムスタンプ列でレンジ検索してソート
2.png

列のSelect。その列がないレコードはブランクになる。
スクリーンショット 2019-11-29 1.19.23.png

SumしてSelect
スクリーンショット 2019-11-29 1.19.04.png

Table APIで作成した場合

Table Storageと同じイメージ。Partition KeyとRow Keyをキーとしたキーバリューストア。

Partition KeyやRow Keyで絞り込み。
3.png

任意の列を条件に指定して絞り込み。Table Storageと違い、すべての列にインデックスが作成されるとのこと。
4.png

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0