• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

It must allow the user to search the data for all records...

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

I'm having trouble interpreting what Sun is trying to say.
I have this: It must allow the user to search the data for all records.... One can interpret this as to have a button that will populate your JTable with all the data in the database (which might not be so efficient...).
I implemented the 48 hours rule - so when clicking on the search button only the rooms that have the start date within 48 hours will be retrieved from the DB. Do you think it's OK?

How did you interpret this phrase?

Regards,
Stefan
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Stefan,

My implementation of the search requirements:
  • 2 text fields (one for hotel name, one for location)
  • if you leave both fields empty and click the search-button, all valid (not deleted) records are shown in the JTable
  • no implementation of the 48 hours rule

  • If the database grows and grows, this approach is indeed not that efficient: a lot of redundant records will be loaded into your table. I used a record cache, so if the database is really huge I'll ran into memory problems. I addressed that in my choices.txt and one of the solutions I suggested was implementing the 48 hours rule (only loading the records in cache with an available night within 48 hours).

    So I think you'll be fine with your implementation/approach, certainly if you mention something about it in your decision document.

    Kind regards,
    Roel
     
    Stefan Taranu
    Greenhorn
    Posts: 22
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Roel,

    That was reaaaaally fast . Thanks a lot for your answer. I will justify my interpretation in choices.txt

    Regards,
    Stefan
     
    Roel De Nijs
    Sheriff
    Posts: 11604
    178
    Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Stefan Taranu wrote:
    That was reaaaaally fast .


    That's why my middle name is "The Fast and The Furious"
     
    You get good luck from rubbing the belly of a tiny ad:
    Gift giving made easy with the permaculture playing cards
    https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
    reply
      Bookmark Topic Watch Topic
    • New Topic