Is there a principal that requires this type of consistency in query results?

56 views Asked by At

I was testing a service response, (same service same operation different parameters).

When searched by birth date one of the returned results was let's say client id = "CID1234".

So I searched again but this time by client id = "CID1234", same service same operation but this returned no result.

When I raised the issue I was told that client search by Id only returns active clients and that is consistent with observed results.

Somehow I think there must be an equivalent to conservation of energy, there should be conservation of data/information. A record within a same service-operation can not both exist and not exist at the same time depending on the query parameter, as if it was a SQL query for sure it wouldn't make sense, it would break some rule that I can not think what it might be called.

I am including SQL tag because I know for sure if this was a sql query then this situation would not happen, but I do not know why, just that we have always taken it for granted with SQL, can SOA be different?

2

There are 2 answers

1
Sir Swears-a-lot On

As a dba i would describe as a flaw in the business logic. However it really depends upon how the developer intended the API to be used.

It may simply have been overlooked, or it could be intentional for privacy or security reasons. Or simply just wasnt required.

The scenario you describe sounds a bit inconsistent, but if that was the requirement given to the developer, and it meets the requirement they did thier job.

Just because you think it could or should work differently or better doesnt make it wrong.

2
Arnon Rotem-Gal-Oz On

It isn't a technical or architectural thing -it is a business decision whether a search can return results of inactive account and/or whether or not you can't retrieve an inactive account.

That said, you can get to such situation when an account was active at the time of request 1 and became inactive by the time of request 2. though I would expect a result from request 2 saying the account is inactive