• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX:Question about searching

 
HaoZhe Xu
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm still not clear with the searching requirement:
"It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user."
for the first sentence, does it mean the user doesn't input anything and the result is all records?
for the second case, does it mean the user can specify the name(Hotel Name) and location(City) fields? Only these two?
and for the "exactly match", does it mean case sensitive, and exact value like Fair does not match Fairfield? If it is, why is there in the other part of the instruction, above the find() method of the DBMain interface, there is an example: "Fred" matches "Fred" or "Freddy"?
 
Dave Knipp
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
for the first sentence, does it mean the user doesn't input anything and the result is all records?

Yes
for the second case, does it mean the user can specify the name(Hotel Name) and location(City) fields? Only these two?

This means that to successfully search and return any matches that the user must type in a query that exactly matches the hotel's name and city. So if they typed 'Billy's Hotel Chicago' only records with the name 'Billy's Hotel' and the city 'Chicago' would be shown to the user. The user could also search just on 'Billy's Hotel' or on 'Chicago' and return matching results as well.
and for the "exactly match", does it mean case sensitive, and exact value like Fair does not match Fairfield?

Correct. It would match on the server side though, but as far as the client is concerned it does not.
If it is, why is there in the other part of the instruction, above the find() method of the DBMain interface, there is an example: "Fred" matches "Fred" or "Freddy"?

I had the same question at first as well. I think that sun is just trying to make your server implementation flexible and then requiring you to do another level of filtering for the client side.
Regards,
Dave
[ December 22, 2003: Message edited by: Dave Knipp ]
 
Seid Myadiyev
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Dave,
Could you please explain a little more in details what you mean by this:
"Correct. It would match on the server side though, but as far as the client is concerned it does not."
Thank you!
Seid
 
HaoZhe Xu
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think he means if you compare "Fred" with "Freddy", the server will return an match signal, but you should avoid it (or filt it) on your client side. Am I right?
But there's a new problem: this is in networked mode, what about non-networked mode?
 
HaoZhe Xu
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't quite understand, forgive my English.
Do you mean the user can only specify the hotel's name and/or the location? (The user cannot specify any other field such like Smoking Size etc?)
Thank you!
 
Jim DiCesare
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I took exactly match to mean case sensitive, Fred matching Fred or Freddy to mean that the field starts with the criteria given..so "Fred" does not match "The Place of Fred" as far as I'm concerned. These were the specifications in the databse interface, so I implemented this server side in my database, and I do some basic input assistance in my GUI (like trim and some bad input handling).
Hope this helps
 
Jim DiCesare
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, and I only allowed searching by name and location to minimize the possibility of error, and amount of work. I think in general it is best to meet the minimum requirements, but fulfill them completely. I also only allow renting and returning from the GUI, even though create, update, etc are implemented in my database.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic