100000 of rows is not really large ammount for MySQL. I have no idea how Perlmonks does it but basic schema should be trivial. Something like:
create table vote (
/* primary key */
vote_id unsigned not null auto_increment,
primary key (vote_id),
/* reference on record in table which stores users */
user_id unsigned not null,
/* reference on record in table which stores nodes */
node_id unsigned not null,
/* vote value: adjust field type for your requirements */
value int not null,
)
It is very likely that also indexes for person_id and node_id fields are needed. It is very likely to have those fields in WHERE part of queries.
--
Ilya Martynov
(http://martynov.org/)
|