January 30, 2014

PostgreSQL | Quick'n'dirty ERD generation with pgAdmin

Recently I needed to put together some simple design diagrams in a hurry and it occurred to me that pgAdmin's Graphical Query Builder would be just the thing. Admittedly its layout functionality is limited to creating boxes with tablename and columns, and drawing lines without fancy arrows between columns on different tables, but it's enough to sketch out basic entity relationships.

pgAdmin Graphical Query Builder

The completed diagram can be exported as a BMP, JPG or PNG file via FileSave asGraphical Query (image):

Simple ERD diagram created with pgAdmin's Graphical Query Builder

However, it doesn't seem possible to re-generate a saved query in the query builder for further manipulation so it's definitely more of a one-off tool. Nevertheless it's a viable alternative to sketching something out on a piece of paper and taking a photo of it (on a wooden table for maximum effect), which is something I've ended up doing on at least one occasion.

Posted at 11:44 AM