Creating an alphabetical index

I would like to be able to create an alphabetical index that accesses
words in the database and displays them for the user.
Can anyone please tell me how to go about it?