Database interface for Toople