Agent Wranglers

Schema design Recommended

Name things the same way everywhere

Name tables, columns and constraints by one convention, so people and agents can guess a name without looking it up.

How to do it

Pick one style, such as lower case with underscores, plural table names and <table>_id for references. Name constraints too, such as orders_total_positive, so error messages say which rule broke. Avoid reserved words and abbreviations.

How to check

A script lists all table and column names. Every one matches the chosen pattern.

For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers data playbook: https://agentwranglers.se/playbook/data/schema-design/schema-names.