Factor/To do/DB

See Improve database library

i want these operations to be performed with a constant number of queries:

  1. get the most recent 20 posts, by date. Get the number of comments in each post.
  2. get the number of posts per month, in the last 12 months.
  3. delete all posts with uid=$1, delete all comments whose parent post has uid=$1, delete all comments with uid=$1
  4. delete all annotations with parent paste=$1, delete paste with id=$1.
  5. In a TV app, get the duration of each show that a user is subscribed to


  • problem with connection pooling and sqlite
  • compound primary keys
  • foreign keys
  • omitting certain columns from result tuples
  • finish advanced query stuff

This revision created on Fri, 13 Mar 2009 19:41:05 by littledan