----- Ursprüngliche Nachricht -----
 Von: Jonathan Leffler
 Gesendet: 11.08.12 02:27 Uhr
 An: José Diaz Seng
 Betreff: Re: Is DBIx::Table::Inflate a good name for a CPAN module?

 >As already mentioned, there is a module DBIx::Table::Dup; this module fits 
 >into the same general namespace reasonably sensibly. I'm not 
 >over-enthusiastic about the name 'Inflate', but at the moment I don't have a 
 >good alternative. I don't know whether a name such as 
 >DBIx::Table::DataGenerator would be better? 

 The name DBIx::Table::DataGenerator fits quite well, the only aspect that I 
think "Inflate" reflects better is the fact that all data comes from the target 
table and its referenced tables, the data is not generated from scratch (to 
keep data as meaningful as possible). But I am also not too happy with the name 
"Inflate". Tables squeeze out only at the bottom, not at the sides, when you 
pump them up that way...

 >Given that you have a database handle, I assume it actively loads the data, 
 >rather than generating a file for later loading. Thus, it is arguably a 
 >DBIx::Table::DataGeneratorAndLoader, or even 
 >DBIx::Table::TestDataGeneratorAndLoader, but that gets rather unwieldy. 
 >(OTOH, the ideas might set your thought processes in motion.) If the module 
 >is renamed, would you rename the method too?

 You are right, the data is loaded, I have not yet decided whether the results 
should be written back to the database or whether the insert statements should 
go to a file, I think that to get things started, I will dump to a file and in 
a later version let the user decide if it should be written back instead.

 >I'm not sure if you would want to allow the user to specify a seed (for the 
 >PRNG), so that they can get deterministic results, or provide a mechanism to 
 >allow them to retrieve the seed used (or both). 

 This is a very good idea, it makes sense to make the generation of test data 
reproducible, this should be available as an option.

 >Have you considered an option to specify the size of transaction (to avoid 
 >overwhelming the database and its logs)? 

 This should certainly be configurable as soon as writing back to the database 
(see above) is being implemented. 

 >Have you considered what information goes in the 'table name'? Does it allow 
 >for 'owner' or 'schema' or similar, or should that be specifiable separately?

 Right now you can write the table name with or without a schema prefix. 

 I plan to post a first version to CPAN in at most a month, of course I must be 
very sure about the module's name first. The focus will be first on Oracle 
(since I know how things work there) and a good amount of tests is important. 
The module will support other DBMSs too, so there is a need to cleanly separate 
DMBS-specific things from DBMS-unrelated once. Of course, DBI... / DBD... 
should help here a lot to cover most situations uniformly.

Reply via email to