Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Java Query help!!! Please help a beginner!!

  1. #1
    Junior Member
    Join Date
    Sep 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Java Query help!!! Please help a beginner!!

    I have a class project where I'm responsible for coming up with the following query and I'm not sure where to start... Type of... If/then statement, while loop and so on...

    "Write a query that finds users who are similar to a given user (target user), the id of the target user is an input parameter. Users are similar to the target user if they rate the same movies."

    There are 3 databases in the project, movies, ratings and tags..

    Need help!!

    Thanks,

    Sy


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: Java Query help!!! Please help a beginner!!

    Moved to database section.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Java Query help!!! Please help a beginner!!

    Welcome to the forum! Please read this topic to learn how to post code in code or highlight tags and other useful info for new members.

    Most will want to see what you've tried or what you think the query might be rather than just give you an answer. Please post your code or query correctly using code or highlight tags per the above link.

  4. #4
    Junior Member Angry-d's Avatar
    Join Date
    Oct 2014
    Posts
    1
    My Mood
    Angry
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Java Query help!!! Please help a beginner!!

    movies, rating and tags are tables or databases?! And from where are you getting the user names?! At least put your DB structure. But as I see, you'll need more than one query here:
    1- Get user name for the given id
    2- Get the movie name for the current user id
    3- Get user ids who's voted for the movie in step 2
    4- Get users using the ids that you got in step 3

  5. #5
    Member John Joe's Avatar
    Join Date
    Jun 2017
    Posts
    277
    My Mood
    Amused
    Thanks
    8
    Thanked 19 Times in 19 Posts

    Default Re: Java Query help!!! Please help a beginner!!

    What have you tried ?
    Whatever you are, be a good one

Similar Threads

  1. Query date using java
    By coderfast in forum What's Wrong With My Code?
    Replies: 0
    Last Post: March 18th, 2014, 11:11 AM
  2. Java Query
    By abhaygautam in forum The Cafe
    Replies: 0
    Last Post: February 1st, 2013, 08:38 AM
  3. query Google in Java
    By mimka15 in forum Java Theory & Questions
    Replies: 6
    Last Post: April 30th, 2012, 11:26 AM
  4. update query is firing first then insert query
    By salmondavid88 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 8th, 2011, 10:15 AM