pq is a client for an `implicit relational' database server. To set up the server, one lists attributes (`columns') and where they can be found (`this file at this address contains these attributes'). Indices may be generated for faster access to large files. The server is then capable of taking queries from pq and figuring out on-the-fly which files to consult to resolve the query.
The major outstanding defect is that real-time updates are not possible; the indices must be regenerated by hand periodically.
PQ is available from the Plan 9 Additional Software page and in /n/sources/extra.