1

When a content type is created, there is a new table for it. For example, there is a content_type_claim table, for content type claim. Content fields are defined within the table.

However, when a content field is shared (used more than once) in different content types, there will be another table created for this field. For example, there is a content_field_claim_no table for claim no, if claim no is also used in another content type.

My question is, in which table Drupal defines whether a content type field is stored inside the content_type_??? table (when used once), or in its own conten_field_??? table (when used more than once), for a particular content type.

2

You want the content_node_field_instance table. As that table defines each "instance" of a field on different content types. For the field configurations (global configs, independent of instance configs) you want the content_node_field table.

Similarly in Drupal 7 there's field_config table for global field configurations, and field_config_instance table for each instance of a field with content types.

  • 1
    Looks like the db_storage field in content_node_field is the hint. – ohho Jul 11 '12 at 10:43
0

In Drupal 7 it will create a new table for the field which is shared between two or more content type. the field "bundle" will store the content type "entity id" will store the node id of respected node "field_fieldname_value" will store the value of the filed..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.