Posted in Database


I recently wrote some python (and Django) utilities for working with pgcrypto. Includes a fun pure python implementation of ASCII Armor format –

Read more…

Many-To-Many Subsets

I'm modeling game results in a Django app I'm working on. A team consists of one or more players, and players may be on multiple teams – a ManyToManyField in Django. Then there are locations that maintain a list of players (not teams) who are authorized to play there, and players may be authorized for multiple locations – another ManyToManyField. What I wanted to find was, given a location, a list of teams whose players are all authorized to play at that location.

Read more…

Fun with counting

This entry is more of a note to myself, as any SQL guru will probably read it and think less of me for just now realizing it. My problem was as follows.

Read more…