Using SQL Server 2008, I have a database that has over 250 tables. Each table represents a electrical model with a different schema. There are about six different types of models, and when I want to display my data, I join the model with a "mapping table" of its type. In this case, should I be creating a view or sp for each table (via a trigger?), or should I be using dynamic SQL? Right now, I am using inline sql statements in my c# code since I recently ported from SQLCe. I try to use parameters as much as possible, but I'm also passing some column names or table names which cant be parametized. In this case, with so many differing tables, should I just stick to inline sql? Also, how difficult would it be to Insert/Update if I move away from inline Sql, as right now I can just pass in an array of columns I want to update.
Any thoughts appreciated.
Also, I am not too concerned with how long it would take to switch, if it is clearly better.
View Complete Post