Store context menu entries for each database

Fixes #186