Thursday, May 15, 2003
Databases, Xml, and painful mistakes
However, there are times in life when you face the results of choices you've made, you don't like what you see, you suddenly know you made the wrong decisions. [ Frans Bouma]
Isn't that the truth? I wasted a month working on code to support import/export for a complex database schema because I was sure the DataSet wouldn't be able to handle the data. Boy was I wrong.
Using DataSets I now have a solution that is 95% automatic. I generate a schema DataSet based on a bit of metadata stored in the database - basically just the names of the tables to export and the relationships between them. During an export I use the schema DataSet to generate the SELECT statements. Then I use the generated SELECT statements to fill the DataSet. During imports the DataSet is used to generate the INSERTS. The DataSet's relationships help me make sure the tables are loaded in the correct order. They also handle updating foreign keys as parent records are inserted.
I can't wait for the Xml data type in Yukon. It will be easier to do what Brad describes because you'll always be able to reach into the Xml from a query for reporting purposes. You will also be able to use the DataSet to get a relational view of the data when you want one.
11:56:58 PMSQL Buddy
I stumbled across SQL Buddy today. It looks promising. I wonder what they have planned for SourceSafe integration...
7:27:35 PMWinter
Just miserablly cold weather for far too much of the year, and yes, I am allowed to complain, since I did do something about it. I moved to North Carolina. [Joe Gregorio]
I hear you Joe. But I can't complain until I move south. Know of anyone hiring in your neck of the woods? ;-)
7:10:51 PMWhat happened to the Microsoft XQuery demo?
The Microsoft XQuery demo is gone. Anyone know where it went?
6:16:47 PM
