Whenever we make any database, tables for any thing, mostly we need some random data for testing purposes. So, if there is a feature which automatically inserts data into tables, respecting the constrains, foreign key relations, etc, that would be great!
Last edit: sriteja 2014-12-29
I like the idea. I feel, it will be nice to have.
Well just a quick idea for reference if anyone working on it, so mostly we might be doing something like, Generate random data of the type of respective columns and insert.
We can start with tables which is not dependent on any other table. After that then go for filling dependent tables. For table with foreign key, we do not generate random values for that key column instead take some of the values from parent table just for foreign key column and randomly generate for other remaining columns to insert.
improvement and suggestions are welcome here :-)
I am currently working on it. I have created button in insert page which has functionality of putting random values in all table that are selected.
Am i doing in correct way? Any suggestion or improvement are welcome
Do you mean "in all columns" instead of "in all table" ?
Sorry I meant in all columns. Once table is created and after clicking on insert button in upper navigation bar. User get a choice of filling random values and user can select number of row in which he wants to fill random values.
Hi Sneh,
If i get you right, you choose a table and fill the random data right?. What about when the table has foreign key relations with other table. How are you planning to take care of those constraints ?
Yeah, You got me right But I am not getting any problem handling with foreign key relations as in insert data form only available options are shown hence i can randomly select from that option only. My only concern is that so many data types are possible hence i am doing like hard coding for all data types . So if you have better option for dealing with different data types can you please enlighten me.
Last edit: Sneh 2015-03-09
I have an idea for implementing this feature. We can use the api from http://generatedata.com however it won't satisfy for all data types but still a wide range of frequently used data types can be fulfilled with this api. My idea is to add two sub tabs in Insert tab i.e Insert Data and Insert Random Data. Insert Data will be normal Insert and Insert Random Data will have the options to generate random data using the api. I am thinking to take this up as one of my idea for GSoC 2015. I want to know is anyone currently working on it?. Feedback appreciated.