[SD-1021] Implement Ingest Sequence Numbering

Given the fact that `db` is always passed as `None`, should we cache the value locally so we don't recreate the object in each call? Are there any cons to this?