[WIP] Improve Database testing

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | -
| Fixed tickets | partially #22 
| License       | MIT
| Doc PR        | [The reference to the documentation PR if any]