Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Thoughts on searching

 
Frans Janssen
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have the B&S assignment. The interface I am given contains a search method that returns an array of record numbers that presumably match the search criteria.

The records as found by a search action are of course not locked, so when I read the records, they might have been changed by another client in the meantime and possibly do not match the search criteria anymore.

I have thought of three possible solutions:

1. just ignore this; if all that the clients can do is book a record, then at most the customer field is changed and since this is not a searchable field, it does not affect search results.

2. read in the records and do a second check to test if the read records still match the search criteria (remove records that don't from the search results).

3. read all records from the server (use search method with null search criteria) and do matching with the criteria client-side. This solution of course loads the network quite heavily, so I assume I won't please my assessor with this one. For thin client architectures this might be an option though.

Currently I am leaning towards solution 2, because that one will continue to work correctly if changes other than booking are made concurrently to the database. Do you think this solution is overkill or maybe someone found a better solution?

Thanks for your thoughts,

Frans.
 
Paul Bourdeaux
Ranch Hand
Posts: 783
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm, I am actually leaning toward solution number one. I think that as long as you document this as a known limitation that does not affect the overall functionality of the application, you should be fine.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic