Tuesday, June 6, 2006

Column Description in SQL Server

The biggest challenge for me to learn de the business is to figure out how it hasbeen translated into a database. The more information I get out of the databasethe more familiar I feel myself with the business.
For applications living or quite some times and evolved by several developers, thisbecomes difficault if you can’t find out what those columns meant to keep. Speciallywhen they are keeping codes and flags which has not direct meaning for the businessbut rather they are stored as a meta data.
One of the handy implementation for such an information is the database itself.Lots of database administrators (and also developers) choose to keep the descriptionof a column somewhere reserved by the database. SQL-Server is not so convinientin this matter. Or maybe the system is while the user interface is not so open forit.
There is a so called undocumented stored procedure in the SQL-Server called sp_columns_rowset which shows you al you need and even more about atable. I am not going to talk about my experience with this undocumented storedprocedure which you can search the net and find some examples about it. Just mentioningit that it givs you something it calls DESCRIPTION of the field.
The question I have is where is this DESCRIPTION maintained? or even better, Howcan I fill this attribute? What should I do to get the descriptions of the columnsupdated with meaningfull sentence?