File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URLyBird Wording of search requirements

 
William Smith II
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My assignment states "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. "

When it says "search the data for all records", does it mean that the user can search by all *fields* in the database? Or just city and hotel name?

I was going to only have two searchable fields being city and hotel name. The user can search based on:
(1) City only
(2) Hotel Name Only
(3) Both City and Hotel Name
If both city and hotel name are populated, then #3 is assumed.

Does this sound correct?

Also, I don't really have a primary key defined as I don't see a need for one. The search characteristics are pretty simple and the data file itself allows for multiple values. Is this a good assumption?
 
Jason Moors
Ranch Hand
Posts: 188
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Yes, I think your are making the right assumption, this was also my view on the requirements,

Implementing 'AND' and 'OR' logic in Find method
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.

The distinction I made was that the two requirements are to be implemented in different layers of the application.

i.e You must implement the Data interface and therefore the find method should return the records that start with the search criteria supporting the ability to search EVERY field. Thereby keeping the data layer generic and not linked to search for location etc.

However in your business layer you need to implement the business requirement and perform additional filtering of the returned records to ensure they exactly match name/location fields.

Hope it helps

Jason
[ September 12, 2007: Message edited by: Jason Moors ]
 
Joe Richard
Ranch Hand
Posts: 76
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

It was my understanding that all non deleted records would be searched. Any records matching the search criteria will have the record number returned in the array.

1) name
2) location
3) name and location

The key is the make the search function scalable for future enhancements.

 
Ken Boyd
Ranch Hand
Posts: 329
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Joe Richard:
Hi,

It was my understanding that all non deleted records would be searched. Any records matching the search criteria will have the record number returned in the array.

1) name
2) location
3) name and location

The key is the make the search function scalable for future enhancements.



Joe is right.. don't display deleted record and search method should allow more than two fields for future enhancement. most of the guys lost point because of this reason (includes me as well..)
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic