简体   繁体   English

有人知道可以立即使用sql-script的MySQL全面的伪造数据生成器吗?

[英]Does anybody know comprehensive fake data generator for MySQL that can be used right away from sql-script?

Yes, of course, I know, there are many different generators created on Javascipt, php, etc. and even applications and web-services that allow generating sql. 是的,当然,我知道,在Javascipt,php等上创建了许多不同的生成器,甚至允许生成sql的应用程序和Web服务也是如此。

But I'd like to have sql functions library which can be used during generating data right away from MySQL script and stored procedures. 但我想拥有sql函数库,该函数库可在生成数据时直接用于MySQL脚本和存储过程。

Now I'm creating my own helper functions (and it's quite tedious) that work roughly like bellow: (fl_* - are functions that return fake data of corresponding type and features.) 现在,我正在创建自己的辅助函数(非常繁琐),其工作原理大致类似于以下情况:(fl_ *-是返回相应类型和特征的伪数据的函数。)

-- create a fake user:
call sp_user_add(fl_login(), fl_email(), fl_gender(), @user_id);

-- add a fake post:
call sp_post_add(@user_id, fl_title(true, 1, 10), fl_body(true, 3, 20), @post_id);

See http://www.generatedata.com/ . 请参阅http://www.genicata.com/ Here you can select the SQL-Tab and select the number of rows you want to get created. 在这里,您可以选择SQL-Tab并选择要创建的行数。 The result is a SQL-script you can copy-paste. 结果是可以复制粘贴的SQL脚本。 I found this very handy... 我发现这非常方便...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM