Bind parameters by name rather than position
Rename filesystem to file_store
Use dbid to mean database row IDs