By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,375 Members | 1,116 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,375 IT Pros & Developers. It's quick & easy.

[CMS] Storing rates in the database

P: n/a
I'm looking for a good method of securing ratings. Cookies lock isn't
sufficient. In addition to cookies I would need something else. I'm
introducing some ways.

-= Storing rates inside seperate tables =-

Seperate tables (artrates, filerates, imgrates) will contain:
ID of item | rate | user | IP

1 rate = 1 record. Field USER will filled if only registered users can
rote. Otherwise - if guests can send their rate - IP address.

This table can even contain a lot of rows.
1000 rates * 100 articles = 100 000 records

ADV: Users can correct their rate.
-= Storing only last IP =-

Perhaps, Mambo does that (it results from rating table's structure).
Every item (e.g. article) = 1 record. Even 1 table can br used (but
1000 items = 1000 records). However, it's possible to create 3 tables
as in the previous way.

ID of item | avg | amount of rates | lastIP

2 users with other IP can rate how many they want (even by changing
session ID).
-= Middle solution =-

Similar as the previous, but more than 1 IP or ID of user would be
stored in the last field of a table. Amount of rates could be set in
administration.
What do you think about it? Which solution is the best?

Jun 8 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
we******@gmail.com wrote:
I'm looking for a good method of securing ratings. Cookies lock isn't
sufficient. In addition to cookies I would need something else. I'm
introducing some ways.

-= Storing rates inside seperate tables =-

Seperate tables (artrates, filerates, imgrates) will contain:
ID of item | rate | user | IP

1 rate = 1 record. Field USER will filled if only registered users can
rote. Otherwise - if guests can send their rate - IP address.

This table can even contain a lot of rows.
1000 rates * 100 articles = 100 000 records

ADV: Users can correct their rate.
-= Storing only last IP =-

Perhaps, Mambo does that (it results from rating table's structure).
Every item (e.g. article) = 1 record. Even 1 table can br used (but
1000 items = 1000 records). However, it's possible to create 3 tables
as in the previous way.

ID of item | avg | amount of rates | lastIP

2 users with other IP can rate how many they want (even by changing
session ID).
-= Middle solution =-

Similar as the previous, but more than 1 IP or ID of user would be
stored in the last field of a table. Amount of rates could be set in
administration.
What do you think about it? Which solution is the best?
IP's are not unique to a user. Many users can share a single IP (i.e.
via corporate proxy), and one user may have multiple IP's in a session
(i.e. AOL users).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jun 9 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.