• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

URLyBird Wording of search requirements

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..)
 
CLUCK LIKE A CHICKEN! Now look at this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic