Drupal database schema

Posted under » Drupal on 04 December 2023

Drupal's database schema is more complicated because it has revisions. Drupal is a CMS that was designed as a news or publishing platform. So the editor can keep track of the changes to the article and have several layers of approval process before the content is published.

I will not cover all the tables but only regarding content.

Node table is the heart of it all. A node has nid, vid, type, uuid, langcode where v stands for version.

UUID or Universally Unique IDentifier, makes it possible to maintain connections between different entities. It is another version of node id. You can have 1 but there could be another version of 1. So 1 is not unique but UUID is.

node_revision table refer to revision data which I will not be elaborate.

node_field_data table shows the nid, vid, uid, type, title, sticky, status, promote, langcode, created and changed. Title is the most important part of a node.

node__body shows the bundle (type), deleted, delta(order), entity_id (node), revision_id, langcode, node__body (contents), body_summary(empty mostly) and body_format(html).

Note that there are many node__tablename. These are the fields similar to node__body. For example. node__field_image

node__field_image have bundle, deleted, delta, entity_id, langcode, revision_id and image specific data like field_image_alt, field_image_height, field_image_target_id, field_image_title and field_image_width.

web security linux ubuntu python django git Raspberry apache mysql php drupal cake javascript css AWS data