Issue 487 db

This is ready for initial review. Thanks. 
I think that makes sense.