In your database you must create 2 fields, one to store the amount of votes and another to accumulate the amount of points.
Since the maximum value of the note is 5, then in the following situation:
200 votes the maximum score will be 1000; 201 votes will be 1005 and so on;
Ex:
CD 1 - received 2 votes
Vote 1 = 5.0
Vote 2 = 4.2
Final Note 4.6
CD 2 - received 3 votes
Vote 1 = 5.0
Vote 2 = 4.2
Vote 3 = 1.5
Final note 3.5
To do the calculations
Final Score: Total Score / Number of votes
The insertion of the points must have a conditional, the values must be between 0 and 5.
With this logic I believe you will be able to develop the steps.
If you would like a script ready and want to adapt to your system click here >, but it would be interesting to try to do it yourself.