Add unit-tests for database ordinal support