Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Generating Dummy Data Expand / Collapse
Author
Message
Posted Wednesday, August 28, 2013 12:15 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, December 18, 2014 12:46 AM
Points: 9, Visits: 250
Nice article. A quick and simple way to get lots of data into tables.
Post #1489022
Posted Wednesday, August 28, 2013 7:45 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 1:33 PM
Points: 2,432, Visits: 2,868
Yes, that is usually the challenge. Especially a lot of repeats of the same dummy data.

Perhaps an idea would be to have a framework, and depending on what data needs to be tested, have different, customizable scripts for it.

So, if you want to test addresses, have a script that generates dummy, but realistic addresses, and so on. I'm thinking a "dummy data" generation database of its own that would house lookup tables to serve as the basis for the different types of dummy data that is needed. I'd think that for most cases, a set of common data would suffice (names, phones, emails, addresses). But the basic idea could be tailored for different uses.

Not the whole answer, I know, but maybe it's a start.

- webrunner


-------------------
"Operator! Give me the number for 911!" - Homer Simpson

"A SQL query walks into a bar and sees two tables. He walks up to them and says 'Can I join you?'"
Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
Post #1489221
Posted Wednesday, August 28, 2013 9:01 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, December 18, 2014 10:14 PM
Points: 210, Visits: 310
That's sort of what I was aiming at.
You can populate as many tables as you want with data and just use cartesian joins to give the bulk.
I have reused last names as street names.

The keyword here is bulk.

I'm happy to work with people on this framework.

Cheers

Jamie


We are the pilgrims, master.
We shall go always, a little further.
Post #1489502
Posted Thursday, August 29, 2013 8:40 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 1:33 PM
Points: 2,432, Visits: 2,868
Jamie Ingram-729524 (8/28/2013)
That's sort of what I was aiming at.
You can populate as many tables as you want with data and just use cartesian joins to give the bulk.
I have reused last names as street names.

The keyword here is bulk.

I'm happy to work with people on this framework.

Cheers

Jamie


Oh, sorry! I hadn't looked at the code details, was just commenting on the general idea. I will take a closer look and test it out to see if I can offer further feedback.

- webrunner


-------------------
"Operator! Give me the number for 911!" - Homer Simpson

"A SQL query walks into a bar and sees two tables. He walks up to them and says 'Can I join you?'"
Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
Post #1489755
Posted Sunday, September 8, 2013 9:06 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, September 9, 2013 5:26 AM
Points: 1, Visits: 2
Greetings Jamie and anyone on this string -

I'm hoping to create dummy data for use in some health examples. This article look is great in getting me started that direction! However, I'm getting an error when I use the CREATE SEQUENCE that states 'Unknown object type 'sequence' used in a CREATE, DROP, or ALTER statement'. I am using SQL 2012, which I understand is the only version the SEQUENCE statement works.

Forgive me, as I'm a GIS guy and not a SQL guy! So maybe I'm missing something pretty simple?

Thanks!
Kenny
Post #1492602
Posted Sunday, September 8, 2013 4:55 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: 2 days ago @ 7:27 AM
Points: 35,769, Visits: 32,437
kenny.ratliff1 (9/8/2013)
Greetings Jamie and anyone on this string -

I'm hoping to create dummy data for use in some health examples. This article look is great in getting me started that direction! However, I'm getting an error when I use the CREATE SEQUENCE that states 'Unknown object type 'sequence' used in a CREATE, DROP, or ALTER statement'. I am using SQL 2012, which I understand is the only version the SEQUENCE statement works.

Forgive me, as I'm a GIS guy and not a SQL guy! So maybe I'm missing something pretty simple?

Thanks!
Kenny


Hi Kenny,

Welcome Aboard!

I recommend that you start a new thread on the SQL Server 2012 forum of this site and include the code that you're having problems with.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1492630
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse