第 9 章: データ シェイプ

適用先: Access 2013、Office 2013

データ 整形 では、データ ソースに対してクエリを実行し、2 つ以上の論理エンティティ (階層) 間の親子関係を表す Recordset を返す方法が提供されます。

A classic example of a hierarchical relationship is customers and orders. For every customer in a database, there can be zero or more orders. Regular SQL provides a means of retrieving the data using JOIN syntax, but this can be inefficient and unwieldy because redundant parent data is repeated in each record returned for a given parent-child relationship. Data shaping can relate a single parent record in the parent Recordset to multiple child records in the child Recordset, avoiding the redundancy of a JOIN. Most people find the parent-child multiple Recordset programming model more natural and easier to work with than the single Recordset JOIN model.

データ シェイプの構文には、他の機能もあります。 親および子 Recordset のフィールドを記述する際に NEW キーワードを使用すると、基になるデータ ソースなしで新しい Recordset オブジェクトを作成することができます。 この新しい Recordset オブジェクトには、データを入力し、永続的に保存することができます。 また、開発者は、子フィールドでさまざまな計算や集計 (たとえば、SUM、AVG、および MAX) を実行できます。 さらにデータ シェイプでは、子のレコードをグループ化して、親に、子の各グループに対応する 1 つの行を置くことで、子の Recordset から親の Recordset を作成することもできます。

データ シェイプの詳細については、次のトピックを参照してください。