Today when I was preparing one of my Microsoft SQL Server Virtual Machine for one of the Proof-of-Concept (POC) for one of our client, it came to my attention that I needed some test data so that it can facilitate in my POC. My whole POC is about generating beautiful graphs using tool-kits from Infragistics. Therefore, in order to make things look more realistic, I would need lots of data that will be eventually pumped into the UltraChart elements to populate my various graphs such as Bar Chart or Polar Chart.
So what are some of the quick and dirty ways to get test data loaded into the database?
I went to search online and found out solutions from Free and Not-So-User-Friendly ones and those that are Paid and Comprehensive ones and also Paid and Not-That-Comprehensive-Ones. So which would you get?
As previously I have been exposed to the whole suite of tools from Red-Gate known as the SQL Tool Belt (I may not have gotten the name correctly!). Thus, I head over to the Red-Gate website and took a look at what is their offerings! I downloaded the installer and installed not only the SQL Data Generator but also the other products along with the suite so that I can further perform testing. Here is how easy and comprehensive Red-Gate SQL Data Generator is!
-> After installation, it will appear in the Start Menu (unless otherwise you have chose not to add it into the Start Menu). Launch the program.
-> Notice the trial period stated, ignoring message for now since I will probably kill this Virtual Machine that I am using after 14 days. 😉
-> Select the target database server and database.
-> Notice how much details is being shown! It’s so clear-cut and easy to use!
-> Modify each database table column by simply clicking on the column that you intend to make changes and make the necessary changes using the available settings feature on the top. These settings simply are those that set the boundary of the data to be inserted.
-> Take for example, I am changing the minimum value for the “ProductPrice“. I am taking the assumption that my product would at least cost a dollar therefore putting 1 as the bottom-line is better in case the generator generates zero value into the field.
-> Same goes here, the value that is being pre-set is the upper limit of the data type being assigned to each column, however to be realistic, we know that I probably wouldn’t have stock level of more than 2 millions quantity thus I am limiting it down the upper limit.
-> When all the settings have been manipulated and reviewed, then hit on the “Generate Data” button located on the top menu bar to get things going.
-> One thing about tools that are payable, it will make life easy for you until the level it produces report on the data insertion although it is just test data.
-> Lastly, we will verify the data being added via SQL Server Management Studio (SSMS).
Of course, other than this paid tool from Red-Gate, there are others methods such as importing CSV into the database, however that way is much more manual and require more effort in manipulating the data to be inserted. So , to all my friends out there, if you need to do lots of POC or wanting to setup an environment with some pretty realistic data, please check out Red-Gate tools!