要約 STI(単一テーブル継承)を使う model に type field を追加する STI(単一テーブル継承)を使う STI とは Single Table Inheritance の略で単一テーブル継承の略だそうです。 もともとは、一つのテーブルから複数種類のクラスを扱うために ActiveRecord で用意されていた仕組みですが、Dynamoid でも同じ仕組みが用意されています。 model に type field を追加する 使い方は単純に model に type フィールドを追加するだけです。 class User include Dynamoid::Document table name: :user, key: :pk, read_capacity: 5, write_capacity: 5 range :sk, :string field :type # <-