从模式自动生成测试数据到数据库?

发布于 2024-08-02 04:05:15 字数 357 浏览 5 评论 0原文

我有一个讨论数据库,我需要大量的测试数据,用于不同大小的测试数据样品。 请参阅准备好的 SELECT、JOIN 和 CREATE 查询,请在链接中向下滚动。

  1. 如何自动生成测试数据到数据库?

  2. 如何在不同大小的样本中生成测试数据?

  3. 有现成的工具吗?

I have a discussion-db, and I need a great amount of test data, for different sized samples. Please, see the ready SELECT, JOIN and CREATE-queries, please scroll down in the link.

  1. How can I automatically generate test data to the db?

  2. How to generate test data in different sized samples?

  3. Is there some ready tool?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

菊凝晚露 2024-08-09 04:05:15

以下是一些生成测试数据的免费工具的建议:

  • Databene Benerator:支持许多支持 JDBC 的工具数据库品牌,使用与DbUnit兼容的XML格式,GPL许可证。

  • Super Smack:最初是 MySQL 的负载测试工具,它还支持 PostgreSQL包括模拟数据生成器。

我问了类似的 二月份在 StackOverflow 上提出的问题,上面的两个选择似乎是最好的选择。

Here are a couple of suggestions for free tools that generate test data:

  • Databene Benerator: supports many JDBC-capable database brands, uses XML format compatible with DbUnit, GPL license.

  • Super Smack: originally a load-test tool for MySQL, it also supports PostgreSQL and it includes a generator of mock data.

I asked a similar question here on StackOverflow in February, and the two choices above seemed like the best options.

眉黛浅 2024-08-09 04:05:15

我知道这个问题已经过时了,但我今天正在寻找这个确切问题的答案,我发现了这个:

http://wiki.postgresql.org/wiki/Sample_Databases

在列出的选项(包括 pgbench 等内置工具)中,pgFoundry 有几个引人注目的选项,它们非常适合我正在处理的测试用例。

我认为这可能对像我这样的人有帮助,所以就这样了。

I know this question is super dated, but I was looking for the answer to this exact question today and I came across this:

http://wiki.postgresql.org/wiki/Sample_Databases

Out of the options listed (including built in tools like pgbench), pgFoundry has several compelling options that works perfectly for the test cases I am working on.

I thought it might help someone like me, so there it is.

鸢与 2024-08-09 04:05:15

我不知道如何获取自动生成的数据并将其插入数据库(我确信你可以用 python 脚本或其他东西来完成它),但如果你只是在寻找无休止的喋喋不休地粘贴到数据库中,这个应该会有帮助。

I'm not sure how to get automatically generated data and insert it into the database (I'm sure you could pull it off with a python script or something), but if you're just looking for endless blabbering to stick into a db, this should be helpful.

遇见了你 2024-08-09 04:05:15

我不是一个postres人员,但在我使用过的许多其他数据库中,生成大量测试数据的一个简单机制是交叉连接。 该技术对于生成大量测试数据特别有用。

这是一篇关于它的不错的博客文章 (SQL Server虽然具体)。

I'm not a postres person, but in many other DBs I've used, a simple mechanism for generating large quantities of test data is a cross join. The technique is particularly useful for generating large quantities of test data.

Here's a nice blog post on it (SQL Server specific though).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文