It's the abstract way of referring to the node table in the database. This notation is converted by Drupal to the real name of the table right before the query is executed (in most cases, for most configurations, {node} will simply become node
at execution time). Using this notation allows an instance of Drupal to use table prefixes without the code generating the queries having to know anything about those details.
The table name has the appearance of being repeated ({node} node
) so that the table name {node}
gets mapped to an alias node
that can be used elsewhere in the query. Consider if you have configured your site to use a table prefix of "dev_" then SELECT node.status FROM {node} node...
would get translated to SELECT node.status FROM dev_node node...
, thus allowing your node.status field to refer to the correct table without the code generating the query having to know anything about the fact that there's a table prefix configured for the site. For this simple example it's silly because you could just write {node}.status, but for more complex examples, particularly with multiple joins it can be useful to set up the alias.
{node} n
or similar