Search algorithm question

Discussion in 'Java' started by ortoped, Aug 19, 2003.

  1. ortoped

    ortoped Guest

    <h1>Hello to all of you!</h1>
    <h1>Scenario:</h1> I need to develop a webpage which contains a number
    of fields SSN, Id, First Name, Last Name, Date of Birth, Status,
    Group, etc...

    Page displays initially all fields empty. User can populate one, two ,
    three or more fields and click search. Based upon the data user enters
    the database lookup gets performed and another page displays a number
    of records that fits the criteria.

    <h1>Question:</h1> What is the best way to implement the search? Do I
    need to pass one field or more or all of them to my SearchDAO? SQL
    will need to change upon different parameters passed for lookup. Any
    best practices for this type of scenario?
    Thanks!
     
    ortoped, Aug 19, 2003
    #1
    1. Advertising

  2. "ortoped" <> wrote in message
    news:...
    > <h1>Hello to all of you!</h1>
    > <h1>Scenario:</h1> I need to develop a webpage which contains a number
    > of fields SSN, Id, First Name, Last Name, Date of Birth, Status,
    > Group, etc...
    >
    > Page displays initially all fields empty. User can populate one, two ,
    > three or more fields and click search. Based upon the data user enters
    > the database lookup gets performed and another page displays a number
    > of records that fits the criteria.
    >
    > <h1>Question:</h1> What is the best way to implement the search? Do I
    > need to pass one field or more or all of them to my SearchDAO? SQL
    > will need to change upon different parameters passed for lookup. Any
    > best practices for this type of scenario?
    > Thanks!



    First of all, this isn't a webpage so don't use html.

    Anyways, its probably better if you pass the search criteria to the dbms
    since it can do the search faster than you can in java or whatever. It also
    makes it easier to display the data since you only have to worry about
    displaying what's in the recordset, rather than scanning each record as you
    display it.
     
    Miguel De Anda, Aug 19, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Johann Blake
    Replies:
    0
    Views:
    331
    Johann Blake
    Jan 21, 2004
  2. Ben Fidge
    Replies:
    8
    Views:
    446
    Ben Fidge
    May 2, 2005
  3. Ahmed Moustafa
    Replies:
    0
    Views:
    782
    Ahmed Moustafa
    Nov 15, 2003
  4. Bapaiah Katepalli
    Replies:
    1
    Views:
    1,498
    Mike Treseler
    Jun 23, 2006
  5. Abby Lee
    Replies:
    5
    Views:
    426
    Abby Lee
    Aug 2, 2004
Loading...

Share This Page