Skip to content

Instantly share code, notes, and snippets.

@asears
Created May 7, 2022 12:29
Show Gist options
  • Select an option

  • Save asears/93b6e85d0efa14d75798f975db97b783 to your computer and use it in GitHub Desktop.

Select an option

Save asears/93b6e85d0efa14d75798f975db97b783 to your computer and use it in GitHub Desktop.

https://www.red-gate.com/simple-talk/blogs/sql-naming-conventions/

It helps greatly to start with a dictionary of the correct nouns and verbs associated with the application domain and use that.

If it proves inadequate, then the team can build on it.

If a data model has been created as part of the design phase, this dictionary should be an end-product of this work.

Don't tibble, no tbl_ or rpt_

Avoid, where possible, concatenating two table names together to create the name of a relationship table when there is already a word in the language to describe the relationship. e.g. use Client rather than EmployeeCustomer

https://steelkiwi.medium.com/best-practices-working-with-django-models-in-python-b17d98ab92b

https://books.agiliq.com/projects/django-orm-cookbook/en/latest/table_name.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment