liveBook · Manning

Naming standard

As explained in Grokking Relational Database Design

A naming convention is a consistent set of rules for naming database objects and their components.

A naming standard is a consistent set of rules for naming database objects and their components. Consistency makes databases easier to understand, query, and maintain. section 3.4

Choose the rules first, then apply them everywhere:

  • Use either singular or plural names consistently for tables; examples include employee and employees. section 4.2
  • Choose one attribute style, such as snake_case, camelCase, PascalCase, uppercase, Hungarian notation, or semantic naming. section 4.2
  • Check column-name length limits before finalizing names; MariaDB, for example, allows up to 64 characters. section 4.2

Avoid mixed names

A database becomes harder to use when the same primary-key idea appears as id, Id, and identifier. Applying one convention to entities and attributes prevents such confusion and reduces query-writing and maintenance errors. A consistent design might use employee for an entity and first_name for an attribute. section 3.4 section 4.2

How Grokking Relational Database Design covers it

How deep it goes
Defines table and attribute naming choices, compares common styles, and checks column-length limits.
Examples
Uses id, Id, identifier, employee, employees, first_name, and other casing styles as naming examples.
What you can do after
Apply it by selecting consistent table and attribute conventions and checking names against database length limits.
How it connects
Connects database design with entities, attributes, primary keys, query writing, and database maintenance.

Also explained in

Compare how 8 books explain naming standard →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Relational Database Design. The section links point to the parts of the book it draws on.