Bob The Janitor Bob The Janitor - 1 year ago 108
SQL Question

Is Unit Testing your SQL taking TDD Too far?

There is an article out on about unit testing your SQL.

The TDD Guy in me said good, we can test the database stuff.

The System Architect in me said, what logic are we testing? There shouldn't be any logic in the database, the only thing you should be doing in the data base is selecting, updating, or inserting.

So if you feel the need to unit test your SQL, are you just being really thorough, being overly pragmatic, or is it a sign of design smell?

Answer Source

I agree with the System Architect, too much business logic is making its way into databases these days.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download