If you are approaching this as a learning project I do not yet have the skills to advise you. But if you wish a quick ready made answer using MySQL try http://www.artronic.hr/mysql/index.htm for a MySQL database that does exactly what you describe -_-_-_-_-_-_-_-_-_-_-_- My memory concerns me - but I forget why !!!