You could convert just about any script ever made that interacts with a database to do this, it's all data in/data out, but you'd still need to know a few basics about programming and databases.
Go check out a few tutorials on these subjects; here are some listed here at
HotScripts
My favorite site for tutorials is
DevShed .
Also, you could study the workings of a hierarchical link script to get an idea of putting together a relationships database. Check out
PhpHoo3