Re: Generating fake databases

From: Derek Asirvadem <derek.asirvadem_at_gmail.com>
Date: Fri, 14 Oct 2011 02:01:10 -0700 (PDT)
Message-ID: <d8cf13b2-606c-47ed-93ae-443a7bf280ae_at_i19g2000yqa.googlegroups.com>


A tidbit !

On Oct 14, 6:40 pm, Roy Hann <specia..._at_processed.almost.meat> wrote:

>

> In some far future day I can see how it would be nice to have a tool
> that could extract the declared constraints from the database
> catalogues

No need to wait. We have had it since 1987. The ANSI/ISO/IEC SQL Standard requires a catalogue, that can be perused using SQL. Getting info out of the catalogue requires a few lines of SQL code. Generating scripts that populate tables can be done quite easily, not counting the varying number of lines of the varying columns, it takes about ten lines of SQL code. Adding the complexity of varying columns, datatypes, etc is another 12 lines, plus a vector of 35 lines, one per datatype. Now add your mythical table which "constraints" the "data" to "synthetic", four more lines, and you are done.

Silly me, I took for granted that you could do that. I dazzle myself so much, I just assumed other people would be just as dazzling. I should add:

7. If you were given full documentation of the catalogue, from the definitions in the catalogue, can you write SQL scripts, to generate SQL scripts which load tables ? We do not really want to write 200 scripts for 200 tables, do we, we want one script that generates 200 scripts.

> I would be content to specify the constraints "by hand"

Please do not duplicate the definitions in the catalogue, "by hand" or by ink or by LED. That will introduce errors, and the possibility of contradictory "constraints", where there were none. All of which can be easily avoided, as long as you refrain from the hand jobs, and just keep all your definitions in One Place. For the constraints that are not constraints, please put them all in one non-constraint or non-data- range table. I have enough trouble staying with this thread as it is.

We could design a GUI (Graphical User Interface) with buttons and slides, much like an audio synthesiser, then you could just slide the controls and synthesise any mix of "data" that you like, until the beast sounds plausible/realistic. You know, ease up on the bass, create a special mix for small speakers. We could have one for nospeakers.   But from the sound of it, that may be a bit of overengineering,  no need to break the crystalware when we have nothing to pour into it. Received on Fri Oct 14 2011 - 11:01:10 CEST

Original text of this message