To primitive

split to_db (renamed to_primitive)

    to allow different behaviour depending on if we're serialising for the
    db or not