Help with a coding question

Discussion in 'Java' started by DanBedlin92, Apr 29, 2012.

  1. DanBedlin92

    DanBedlin92 New Member

    Joined:
    Apr 29, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    I am wondering what type of code I would need or if it is possible to create a code that will put random words together that search in a database for an answering involving say 3 key words that connect to a database such as 3 recipe ingredients being entered and the result being a recipe involving all 3?!
    I am currently a sophomore in college and still havent cracked into major coding yet and had an idea for a website that would need this type of code so any help would be great, just trying to make something happen!
     
  2. pein87

    pein87 Active Member

    Joined:
    Aug 6, 2010
    Messages:
    173
    Likes Received:
    47
    Trophy Points:
    28
    Occupation:
    Web Dev
    Location:
    Limbo
    You could use just SQL for that. You'd have to have either a file full of words that the code would load and parse and pick three random(could involve categories so the words would actually go together) or a database that holds the words which would then be selected at random using a number generator for each random id of the table. Then you'd query another database using those words. The hard part would be adding words that each one would be used under. For example lets say your asking for three words for a car.

    blue, manual, honda

    those words picked at random would work but in this case if it were completely random

    meteorite pearl ostrich

    you wouldn't find a car with those key words unless it was a custom car with ostrich seats, a pearl family color, and a meteorite painted on it or designed into it some how.

    You'd need a way to group them so that the target words would reference something similar. It would be a complex task to say the least but certainly nothing to hard. Probably a list for the categories to tell which ones would go together.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice