
After you have created the database project you get a new folder in the solution explorer. The “Data Generation Plans” folder is cable of holding different kind of data generations setups, so it possible to create one for scalability test of you database, one for unittest or another reason.

When you open one of these files it is opened in a Visual Studio designer, where it is possible to do a number of different stuff. It is possible to select which tables to generate data for, how many rows are going to be inserted and if the number of rows should be related to another table and what the relation there is between the two tables. The bottom part of the designer gives you the option to specify for each field in the selected table how data should be generated. This can be completely random based on a base datatype (it is possible for each datatype to limit the random to a limit range), based on a SQL query or a regular expression. It is also possible to create custom data generators, if you want data generated based on some kind of business logic.

A “Data Generation Preview” window can give you a preview of the data that is generated from the configuration that is done in the designer.

When you are ready to fill the database it can be done in the “Data” menu in Visual Studio “Data à Data Generator à Generate Data”.
I have looked at one of the new cool features in Rosario, the next release of Visual Studio after Visual Studio 2008.
One of these new features in the Rosario release of Visual Studio Team System is (most likely) going to be the data generator tool. This tool will (most likely) be available in the Database Edition version of Visual Studio and the Team Suite edition.
The tool will is able to generate random data to your tables in the database, which is very usable in test situations and if you want to get a database of a certain size to verify that you logic is scalable.
The first thing to do is to create a database project. Use the “File à New project” to get the following dialog box: