On the road to better database query system
Re-implementation of db-based sample annotation. Still with lots of TODO