This page is about SQL naming conventions.

First it provides an example:

SELECT r.rid, p.perm
  FROM {role} r
    LEFT JOIN {permission} p ON r.rid = p.rid   -- may be on one line with prev.
  ORDER BY name

Then in the next sentence it offers a tip:

Naming

* Use plural or collective nouns for table names since they are sets and not scalar values.

I may be wrong, but if you re-read the previous example, you see that the sample code does not follow this convention. Although the two were not directly associated, they are both on the same page attempting to illustrate good SQL naming conventions. I recommend changing the table name from {role} to {roles}.

Comments

karldied’s picture

The "role" table is named singularly, which is why it is singular in the example. I've changed the text to:

Use plural or collective nouns for table names since they are sets and not scalar values. (Others prefer that table names to match field name, so prefer singular table names. Drupal uses both: blocks, filters, users; but book, poll, role.)

There is a good discussion of three comments on this node about naming convetions, but it is 'best practices' thought.

betz’s picture

Component: Developer Guide » Correction/Clarification

Changed the component to reflect the new component categorization. See http://drupal.org/node/301443

heather’s picture

Status: Active » Fixed

Seems to have been fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.