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 9159391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:28:51+00:00 2026-06-17T13:28:51+00:00

We have a database, which keeps informations about music – we have e.g. table

  • 0

We have a database, which keeps informations about music – we have e.g. table for artists, bands, songs, albums etc. The next step is to allow users to rate those things, using 10-point grading scale.

What is the best way to remember all of users ratings? Surely I can create simple table, that contains user_id, rating_value and rated_thing_element, but obviously I can’t join it to EVERY table.

Is it better then, to create, for example, one table called ratings and few additional tables, like ratings_albums, ratings_songs, ratings_bands etc. to bind, or maybe just few ratingsXXX tables for each of elements I’ve mentioned above?

I’m not sure which way I should go… or does it really matter.=?

  • 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-17T13:28:52+00:00Added an answer on June 17, 2026 at 1:28 pm

    My personal preference is to go with a normalized table and strict foreign references. So I would use artist_ratings, album_ratings, and song_ratings tables. To make queries easier, I would create views to represent the most often joined tables.

    You can use a ratings table with no foreign keys (well except for the user reference), but you lose referential integrity enforcement. This table would be

    ratings {
      id integer,
      userId integer, -- FK to users table
      referenceId integer, -- This is not a FK, but will contain the ID of the artist/album/song
      type char, -- a = album, A = artist, s = song
      rating int
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database which has a table recording when a vehicle was last
Currently we have a table with a bunch of data from a database which
I have a table which dynamically reloads continually every 60 seconds. This keeps the
I have a database table in which I need to insert records. I'm using
On my MySQL database, I have a unsigned mediumint column, which I keep incrementing
I am creating a database that will help keep track of which employees have
I have a database which, simiplified, is as follows : ID | SecondID |
I have a database which is going to have UMT timestamps in standard sql
I have a database which contains the link to audio files. I am trying
i have a database which contains an arabic tables , i can read it

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.