Skip to content

Naming conventions

This page describes naming conventions for databases, tables, and columns.

Consistent naming improves readability, reduces confusion, and makes it easier to work across services and teams.


All database-related names should be:

  • Descriptive
  • Consistent
  • Easy to read
  • Predictable across services

Avoid abbreviations unless they are well-known and consistently used.


Database names must be:

  • Singular
  • Written in snake_case
  • Lowercase

Examples:

device_flow
device
device_data_flow
outage

Table names must be:

  • Singular
  • Written in snake_case
  • Lowercase

Examples:

organization
rule
notification

For relationship tables, include the names of both related tables.

Examples:

rule_notification
rule_operation
notification_sms

Column names must be:

  • Written in snake_case
  • Descriptive
  • Lowercase

Examples:

created_at
updated_at
name
description
  • Primary keys should be named id
  • Foreign keys should reference the related table name

Examples:

id
user_id
organization_id

Use the following timestamp columns where applicable:

created_at
updated_at

These columns should be:

  • Automatically set by the system
  • Stored in UTC

Avoid using reserved SQL keywords for database, table, or column names.

If unavoidable, choose a more descriptive alternative rather than relying on quoting.


  • Use snake_case for all database identifiers
  • Keep names singular and descriptive
  • Follow the same conventions across all services