Skip to content

Philosophy

The Zen of SQL

Introduction

Inspired by the Python equivalent (PEP20 - The Zen of Python), and also using it as a starting point, the TFSQL101 are the core guiding principles which are central to writing clean, clear, well-structured and easy to maintain data transformations in SQL. These are the guiding principles for all SQL code written by our functions and humans.

TFSQL10

  • Readability counts.
  • Explicit is better than implicit.
  • Simple is better than complex.
  • Complex is better than complicated.
  • Flat is better than nested.
  • Errors should never pass silently.
  • Unless explicitly silenced.
  • Predictable is better than flexible.
  • Modular is better than monolithic.
  • Common Table Expressions are a seriously great idea - let's do more of those!

  1. Whilst the Python PEP20 actually only contains 19 aphorisms, the Transformation Flow SQL 10 (TFSQL10) contains exactly 10. 

Back to top