Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7751041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:26:49+00:00 2026-06-01T11:26:49+00:00

I developed a java web application which contains Wallpapers, there is like button for

  • 0

I developed a java web application which contains Wallpapers, there is like button for each wallpaper, If a user clicks on like then I am storing userId,wallpaperId and like count in ‘User_Wallpaper’ table, and I have another table ‘wall_stats’ which contains statistics for wallpaers, i.e total liked wallpapers.
So,What I want…
If user clicks like button then I have to update in ‘User_Wallpaper’ and also increment the count in ‘wall_stats’….How can I do this?
I am using Hibernate 3.0.
Please help me…thanks in advance…. 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T11:26:51+00:00Added an answer on June 1, 2026 at 11:26 am

    I’m not sure why you are storing the “like count” in the User_Wallpaper table (can a user “like” a wallpaper more than once?) but rather than creating a new table for the wall_stats, I’d make wall_stats a view:

     CREATE TABLE User_Likes_Wallpaper (
         userId NUMBER(10) not null,
         wallpaperId NUMBER(10) not null);
    
     CREATE VIEW Wall_stats AS
         SELECT wallpaperId, count(*)
           FROM User_Likes_Wallpaper
          GROUP BY wallpaperId
    

    That way the wall_stats is always up-to-date… (though you probably want an indexes on User_Likes_Wallpaper)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a Java EE web application. This application allows a user to
Is there any web framework in C++ which is like Spring for Java, i
I have a web application which has several users and each user will have
I have developed a web based application which allows a client/user to upload a
I developed a web application Using java EE 6, its a very small web
I developed a Java desktop application in eclipse IDE.I need to include web view
I joined a project which has been already developed and its an Web Application
I am using a Java Web Service which is developed by one of our
I have developed a java 1.4 web application.Application is deployed on jboss(tomcat). suppose my
We have developed SOA architecure for our intranet application, so our web-start java applications

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.