Certifications / Microsoft

How to Generate Dummy Data for Your Database

by Team Nuggets
How to Generate Dummy Data for Your Database picture: A
Published on September 6, 2011

Hi everyone. This tip is focused squarely at my DBA students, regardless of whether your platform if SQL Server, Oracle, MySQL, or Access.

Here's the situation: you are designing a database and need to perform tests in your development environment using live data. Well, where in the world are you going to get that live data? You can't very well invest half a workday typing fictitious records, right? Using a copy of your organization's production data is a possibility, but this isn't always feasible due to legal and/or ethical considerations.

I found this awesome Web site called generatedata.com/ that totally solves this "dummy data" conundrum. The site owner, evidently out of the kindness of his or her heart, created a script (written in JavaScript, PHP, and MySQL) that enables folks like you and me to produce potentially large amounts of sample data.

Here's how it works: Navigate to the Generator page, and select your output file format. You have a choice of HTML, native Microsoft Excel, XML, Comma-Separated Value (CSV), or native SQL.

Next, determine your target country for data fields such as addresses, and specify the number of results. Finally, fill in your column names and data types, being careful to mirror the schema of your development database tables. Click Generate to product the data set.

Caption: Specifying dummy data parameters

Caption: The resultant dummy data

Isn't that awesome! This Web site has saved my bacon quite a bit over the past several months, let me tell you. Some final points: the site owner offers the generatedata.com/ source code for free download, bound only by the GNU license. Also, site users who donate $20 or more to the site are given a user account at generatedata.com/ and are allowed to run much larger record batches than the non-paying public (the free online tool can generate only up to 200 records at a time).

I hope that you found this tip helpful. Happy studying!


Download

Download

Ultimate Networking Cert Guide

A 97-page guide to every Cisco, Juniper, F5, and NetApp certification, and how they fit into your career.

By submitting this form you agree that you have read, understood, and are able to consent to our privacy policy.


Don't Miss Out

Get great content delivered to your inbox.

I have read and understood the privacy policy, and am able to consent to it.

Recommended Articles

Get CBT Nuggets IT training news and resources

I have read and understood the privacy policy and am able to consent to it.

© 2022 CBT Nuggets. All rights reserved.Terms | Privacy Policy | Accessibility | Sitemap | 2850 Crescent Avenue, Eugene, OR 97408 | 541-284-5522