This project is not covered by Drupal’s security advisory policy.

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.

Drupal 7 status

A version of this module exists for Drupal 7 and is available in the git repository.

Drupal 8 status

There is not a Drupal 8 port of this module. It is possible in Drupal 8 to write a bit of custom code to use base fields which will store more fields in a single table in a manner similar to this Per Bundle Storage module. For more details see this discussion of PBS for Drupal 8 on Drupal.stackexchange.

Description

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.

Project information

  • caution Unsupported
    Not supported (i.e. abandoned), and no longer being developed. Learn more about dealing with unsupported (abandoned) projects
  • caution No further development
    No longer developed by its maintainers.
  • Created by bjaspan on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases