my small contribution to the information flood
http://www.thefreecountry.com/sourcecode/database.shtml
I noticed there the LEAP RDBMS, a great tool recommended for courses. Back when I used to teach database courses I used LEAP to teach relational model and algebra, with great success. The LEAP RDBMS is now sourceforged for free.
This article about T-SQL Unit Testing, written by S.A. Miller shows the big picture. TSQLUnit is an open source unit testing framework for T-SQL written by Henrik Ekelund and available from http://sourceforge.net/projects/tsqlunit.