3

I would like to understand the database architecture of Drupal 8. I noticed that Drupal 8 has two separate tables (node and node_field_data) which include almost the same columns. Can anyone give some clarification on this?

1 Answer 1

0

To add additional information to @jaypan's answer following are my observations

node_field_data contains 6 fields

nid     int(10) unsigned
vid     int(10) unsigned
type    varchar(32) The ID of the target entity.
status  tinyint(4)
title   varchar(255)
uid     int(10) unsigned    The ID of the target entity.
revision_translation_affected   tinyint(4)NULL

the nid is primary key in this table and referred by node and other fields as target id. The type attribute tells what kind of content it is referring to, like posts, article or custom. In case of custom, it will store the name of the content type.

1
  • 1
    For me there are more fields, and the primary key contains node nid + langcode.
    – donquixote
    Jul 6, 2020 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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