Dimitri Fontaine Avatar

Dimitri Fontaine

Dimitri Fontaine tapoueh.org

PostgreSQL data types – series recap

Dimitri Fontaine, a PostgreSQL major contributor, has written an awesome blog series on PostgreSQL data types to show how to benefit from the PostgreSQL concept of a data type.

The PostgreSQL concept of a data type is more than input validation, a PostgreSQL data type also implements expected behaviors and processing functions. This allows an application developer to rely on PostgreSQL for more complex queries, having the processing happen where the data is — for instance when implementing advanced JOIN operations, then retrieving only the data set that is interesting for the application.

The posts in this series were extracted from his book Mastering PostgreSQL in Application Development — which teaches SQL to developers so they can replace thousands of lines of code with very simple queries.

Dimitri Fontaine tapoueh.org

Database modeling anti-patterns 🙅‍♀️

Dimitri Fontaine shares 3 classic data-modeling anti-patterns. The UUID section lacks strong argumentation, but the real gem in this article is his advice at the end. A snippet:

My advice is to always normalize your database model first, and then only fix the problems you have with that when you actually have them. Well except in those 3% of cases where really, really, it should be done in the design phase of the project. It’s quite hard to recognize those 3% though, and that ability is hard gained with experience.

Experience is the ultimate teacher.

0:00 / 0:00