Data Dictionary


I have a uni project due, a interactive SQL processor...
what i want to know is how i can generate a data dictionary given a database
alias (table, fields, indexes)
can anyone point me to some code examples?

my lecturer gave us this example
but i cant make any sense of it! it doesnt even work for starters... my
lecturer is a huge ego maniac, and thinks his code rocks, but it sucks! so
confusing! if you are bored, check it out :)

thanks in advance!

ps please email a reply as well as post here! thanks!