First of all, I know that my database design is far from perfect, but it is working right now and I will not change it until website become very popular (if at all). And even then I may not change it, instead using caching methods to lower server load.
What we need: table for users, table for programs, table for tags.
I could have made separate table for programs and table for user-program pairs, but I did it simpler and made one table for programs which contains also user who added this program. That means that program name field is not unique value and I have to use GROUP BY a lot, which is a little slow, but right now it’s working good. The same thing is for tags table - tag name is not unique there. I’ll post here if there will be any changes in database structure.
Meanwhile this is it:
Members table
id MEDIUMINT(8) autoincrement, primary key
username VARCHAR(25)
mail VARCHAR(250)
password VARCHAR(32) = hash of password
registered INT(10) = time()
Programs table
id INT(10) autoincrement, primary key
user MEDIUMINT(8) = members.id
program VARCHAR(250) = program name
description VARCHAR(250)
version VARCHAR(30)
link VARCHAR(250)
created INT(10) = time()
Tags table
id INT(10) autoincrement, primary key
user MEDIUMINT(8) = member.id
program INT(10) = program.id
tag VARCHAR(30) = tag name