Per-Bundle Storage (PBS) is a Field API contrib module that stores all values for all limited-value fields in a bundle in a single table row. Per-bundle storage is the analog of pre-Field API CCK's per-content-type storage and thus provides the same benefits (namely, loading all such fields in a single query). In fact, PBS stores more fields in its per-bundle tables than CCK did:
- With Field API, a field can be configured to store up to any specific number of values (1, 3, 17, etc.) or an unlimited number of values. PBS stores all limited-value fields in per-bundle tables, whereas CCK only stored single-value fields in per-content-type tables. For example, if the field 'foo' can have 3 values, each per-bundle table containing 'foo' has columns foo_value_0, foo_value_1, and foo_value_2.
- PBS stores shared fields in per-bundle tables in addition to non-shared fields, whereas CCK only stored non-shared fields in per-content-type tables. For example, if the field 'foo' is attached both to the Article and Page node types, the per-bundle tables field_bundle_article and field_bundle_page both contain columns foo_value_0, etc.
Both of these improvements allow a greater number of fields to be loaded in a single query than was possible with CCK.
Bundle tables are stored in addition to, not instead of, per-field tables. Thus, one extra insert per object save is required. Per-Bundle Storage module is useful when a site does more reads on objects with multiple limited-value fields than writes, in which case the extra insert is irrelevant.
The per-bundle tables are used by field_attach_load(). They are also available for custom queries and Views. Once the code to connect Field API tables to Views is written, this module will alter the Views tables to reference the bundle tables for limited-value fields.
See Per-bundle storage module for more details and design discussion.
- Maintenance status: Unknown
- Development status: Unknown
- Downloads: 394
- Last modified: November 27, 2014