havoc wrote:just add a table for comments with these columns:
comment id
map id
date/time
user id/name/whatever
comment text
type of comment
with type of comment being one of 3 - a pro, a con, or just comment
[...]
p.s. your primary in the maps table should be the map id
AFAIK, this won't work, as in your table, there is more than one row
for each map (because there can be more than one comment per
map). Therefore, the map id is not unique and thus cannot act
as a primary key.
Would should work, however, is using a composite primary key that
comprises all columns. I'll probably use such a key for all of my
tables except for my main table where the map name/id is the
primary key.
havoc wrote:type of comment
with type of comment being one of 3 - a pro, a con, or just comment
Ah, this let another idea pop up in my head ... thanks, havoc! :-)
havoc wrote:can u please paste your maps table?
I will do so today or -- at the latest -- tomorrow.
But some sparse info I can give you now:
Currently, I have one main table (urtmaps) with columns that
describe the non-list/unique data for each map (filename, filesize,
levelshot, homepage, release date, is installed on dswp, can be
voted for, etc.).
List data for the maps are stored in other tables, like urtmaptags,
urtmapauthors, urtmaplicenses (a map can be dual-licensed, for
instance), urtmapdownloads, etc.
Accusations of over-engineering this map list are automatically
redirected to /dev/null. ;-)
.