Database Column Naming FAQ
Short answers to the questions developers ask most about naming database columns.
Should column names be snake_case or camelCase?
snake_case (first_name). It is the SQL standard, survives every database's identifier handling, and avoids PostgreSQL's lowercase-folding trap with camelCase. Use camelCase only to match an existing schema or ORM convention you can't change.
Singular or plural column names?
Singular. A column holds one value per row, so email, phone_number, and order_id — not emails or order_ids. (Table names are the ones where plural is common.)
Should I prefix every column with the table name?
No — user_first_name inside users is noise. The exception is keys: a foreign key should match the referenced primary key name exactly (user_id in both tables), which makes joins self-documenting.
What are the worst reserved words to use as column names?
order, user, group, select, table, key, and index cause the most trouble. If the domain word is reserved, qualify it: order_id, user_name, sort_order.
How long can a column name be?
Most databases allow 63-128 characters, but older Oracle versions limit identifiers to 30. Keeping names under 30 characters stays portable everywhere.
How do I name boolean columns?
Prefix with is_, has_, or can_ so the name reads as a yes/no question: is_active, has_avatar, can_edit. Avoid bare adjectives like active or deleted.
What's the convention for timestamp columns?
The _at suffix for instants (created_at, deleted_at, last_login_at) and _date for calendar dates (birth_date). deleted_at with NULL meaning active is the standard soft-delete pattern.
How do I rename a column safely?
Treat it as a migration: add the new column, backfill data, switch application reads, then drop the old column. Renaming in place locks the table on large datasets in some databases.