← back to the generator

Table names in the wild

Full example schemas showing the conventions applied — steal the structure, rename the nouns. All examples use plural snake_case, the most common convention.

E-commerce schema

Tables

users · products · categories · orders · order_items · payments · refunds · shipments · coupons · reviews · categories_products (join table, alphabetical) · price_history

Note the join table categories_products: alphabetical order makes it predictable, and the _history suffix marks the audit-style table. Foreign keys follow the singular_table_id pattern: order_items.order_id, order_items.product_id.

SaaS schema

Tables

accounts · users · account_users (join table) · subscriptions · invoices · plans · api_keys · webhook_events · audit_logs · feature_flags

Boolean columns use the is_/has_ prefix (is_active, has_trial), timestamps use _at (created_at, canceled_at), and the primary key is plain id — not user_id on the users table.

Blog / CMS schema

Tables

authors · posts · categories · tags · comments · categories_posts · posts_tags · media_files · post_revisions

post_revisions shows the descriptive-suffix pattern for versioned content — clearer than a generic history table shared across entities.

Join tables, both styles

Plural alphabetical (Rails-style)

categories_products · organization_users · roles_users — both sides plural, sorted A→Z.

Singular pivot style

category_product · role_user — singular model names, still alphabetical. Common in Laravel pivot tables.

Names to retire

The hall of shame

tbl_user (noisy prefix) · order (reserved word) · data (means nothing) · UserTable (mixed case) · users_orders_products_join_final (a cry for help — use orders_products)

Generate your own set with the table name generator — toggle join-table mode for the pair patterns. For the reasoning behind these, read the table naming guide.