Add some useful db resources
Fix join bugs. #310
Don't try and print empty results. Closes #310