add support for attaching a database