大量のデータをリレーショナル DB に格納するシステムを実装しています。
データはカテゴリに分類され、作成者を持つことができます。
日付、カテゴリ、作成者でグループ化されたアイテムの数と、日付でグループ化された各カテゴリのすべてのアイテムの合計を取得したいと考えています。
システムはほぼリアルタイムである必要があります。
例 (3 つのカテゴリ、3 つの著者、2 つの日付)
item1 category1 author1 2015-04-23
item2 category1 author2 2015-04-23
item3 category2 author1 2015-04-23
item4 category1 author1 2015-04-23
item5 category2 author2 2015-04-23
item6 category2 author2 2015-04-24
item7 category3 author1 2015-04-24
item8 category2 author3 2015-04-24
item9 category2 author2 2015-04-24
結果:
2015-04-23:
category1 author1: 2
category1 author2: 1
category1 author3: 0
category2 author1: 1
category2 author2: 1
category2 author3: 0
category3 author1: 0
category3 author2: 0
category3 author3: 0
2015-04-24:
category1 author1: 0
category1 author2: 0
category1 author3: 0
category2 author1: 0
category2 author2: 2
category2 author3: 1
category3 author1: 1
category3 author2: 0
category3 author3: 0
約 50 のカテゴリと約 50 の著者があります。
この動作を redis でモデル化するにはどうすればよいでしょうか?