• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

B&S Database file

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

name - location - specialties - size - rate - owner

1.Buonarotti & Company - Smallville - Air Conditioning, Painting, Painting - 10 - $40.00
2.Philharmonic Remodeling - Atlantis - Heating, Carpets, Carpets - 3 - $50.00
3.Buonarotti & Company - Bali Hai - Plumbing, Air Conditioning, Air Conditioning - 9 - $70.00

The specilaity of the particular contractor is repeated twice. Does this mean any thing special? Or Just I have to ignore this.

Sorry if it is going to be a very silly question.

Thanks,
Preethy Sekhar
 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No need to worry about it
 
preethy sekhar
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot! and one more clarification.

"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"

As per the above statement, if the customer asks for the service say Air Conditioning, then the system should display all the records where this service is the only speciality and also the records where this service is one of the speciality of the contractor.

Then which means the customer books a contractor (whose speciality is Painting and Air Conditioning) for Air Conditioning service actually blocks the other customer who is in need of Painting. Say Painting is not the speciality of any other contractors, then for the other customer, display will be empty when he searches for Painting.

Please clarify me on this.

Thanks,
Preethy Sekhar
 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Preethy,

I had issues with the same formulation as you. First of all, English ist not my first language. However, as I read it, you have to provide a search functionality in your GUI which allows to retrieve database records with given name and/or location. Additionally, it must be possible to load all database records into your JTable. There is no need to search for specialties, hourly rates or any other record entry.
Nevertheless, for meeting your database interface requirements, you will probably have to implement some sort of prefix search for all fields on the database server side. If you opt for implementing some kind of business layer in between, this will most likely be the place to convert the GUI's search request into a valid database search.

Thomas
 
preethy sekhar
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thanks for your replies.

"They take requests from home owners for a type of service, and offer the homeowner one or more contractors that can provide the required services"

According to this, I feel speciality field plays a role in this assignment.

"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"

I feel here the "data" mainly refers to the specialty field. (ie., type of service needed by the customer).

Suppose customer needs Painting service. And Painting service is provided by Contractors NameA, locA and NameB, locB. Then choosing any one of the contractors by specifying the name and location, in order to book.

Please confirm me whether my assumptions are right or not.

Thanks,
Preethy Sekhar
 
Thomas Thevis
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello again,

I think there are two challenging targets:
  • Improving usability, and on the other hand
  • keeping it simple ("A clear design, such as will be readiliy understood by junior programmers, will be preferred...").

  • I don't want to persuade you not to search for specialties, but in my understanding of the assignment, this is not a necessary feature. The CSRs are able to search for specialties in the provided JTable as well. If they wanted us to search for specialties, I would expect the "and/or" phrase would state "specialties" explicitly.

    One last thought:
    Suppose you have a similar assignment as me and you have to implement a prefix based search on the databse side. How do you convert your wanted specialty into a search query for your database. I think that is the really tough point where the simplicity restriction could be violated.

    Best Regards,
    Thomas
     
    preethy sekhar
    Greenhorn
    Posts: 17
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi,

    Fine. Thanks for clarifying. Your reply was clear.

    I need another different clarification which is regarding find method.

    Condition:
    'A non-null value in criteria[n] matches any field value that begins with criteria[n]'. (For example, "Fred" matches "Fred" or "Freddy")
    public int[] find(String[] criteria);

    fred
    freddy
    fred & company
    Jefreddy

    Here if the field value begins with 'fred' and followed by any letters/words, then that would be identified.

    But if the field value has fred but not in the beginning of the field, then would the find method identifies this record?

    Hope also in this, I will be get clarified.

    Thanks,
    Preethy Sekhar
     
    Thomas Thevis
    Ranch Hand
    Posts: 87
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Preethy,

    But if the field value has fred but not in the beginning of the field, then would the find method identifies this record?


    No.

    'A non-null value in criteria[n] matches any field value that begins with criteria[n]'


    The semantics should be the same as in String.startsWith().

    Regards,
    Thomas
     
    preethy sekhar
    Greenhorn
    Posts: 17
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi

    Thanks!

    Thanks for clearing my every doubts.

    when other doubts comes, I 'll ask you for sure.

    Thanks,
    Preethy Sekhar
     
    reply
      Bookmark Topic Watch Topic
    • New Topic