database PostgreSQL 的示例数据库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5363613/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Sample database for PostgreSQL
提问by H-H
I am looking for a sample database (schema+data) for PostgreSQL 9. Is there a repository somewhere for sample databases?
我正在寻找 PostgreSQL 9 的示例数据库(模式+数据)。是否有示例数据库的存储库?
采纳答案by intgr
There's a PgFoundry projectthat contains several example PostgreSQL databases. Most of these haven't been updated for a while, but will still work with recent PostgreSQL versions.
有一个PgFoundry 项目,其中包含几个示例 PostgreSQL 数据库。其中大部分已经有一段时间没有更新了,但仍然适用于最近的 PostgreSQL 版本。
If you need a bigger database, the MusicBrainz music metadata databasehas full database dumps available for download.
如果您需要更大的数据库,MusicBrainz 音乐元数据数据库有完整的数据库转储可供下载。
回答by Catherine Devlin
I just published a PostgreSQL port of the Open Source Shakespeare database: https://github.com/catherinedevlin/opensourceshakespeare. It's much more fun than all those other sample databases.
我刚刚发布了开源莎士比亚数据库的 PostgreSQL 端口:https: //github.com/catherinedevlin/opensourceshakespeare。它比所有其他示例数据库有趣得多。
回答by Frank Heikens
You can find some in the PostgreSQL wiki: http://wiki.postgresql.org/wiki/Sample_Databases
您可以在 PostgreSQL wiki 中找到一些:http: //wiki.postgresql.org/wiki/Sample_Databases
回答by 42n4
I have found: http://www.postgression.com/
我发现:http: //www.postgression.com/
But the dbsamples main page from pgfoundry disappeared... I have rediscovered http://pgfoundry.org/frs/?group_id=1000150
但是 pgfoundry 的 dbsamples 主页消失了......我重新发现了http://pgfoundry.org/frs/?group_id=1000150
回答by Saad Saadi
I also made a sample PostgreSQL database based on IMDb. I also tried to update the sample exercises, so that a beginner can learn from it and practice on it.
我还制作了一个基于IMDb的示例 PostgreSQL 数据库。我还尝试更新示例练习,以便初学者可以从中学习并练习。
Link: PostgreSQL Sample Database.
链接:PostgreSQL 示例数据库。
回答by Josh Diehl
Many of the examples referenced here or in other places are defunct or require a good number of hoops to jump through to get working (more than I was willing to jump).
这里或其他地方引用的许多示例已经不复存在,或者需要大量的箍才能开始工作(比我愿意跳的要多)。
I finally discovered that the DBeaverSQL client has a "Generate Mock Data" tool that can fill in tables with sample data. It can handle various data types, you can give it strings to use for text, and it handles foreign keys. You can configure large numbers of rows (e.g. 900,000) for insert, and it is also DB agnostic so it should work for mySQL, SQL Server, etc.
我终于发现DBeaverSQL 客户端有一个“生成模拟数据”工具,可以用示例数据填充表格。它可以处理各种数据类型,您可以为其提供用于文本的字符串,并处理外键。您可以为插入配置大量行(例如 900,000),并且它也与数据库无关,因此它应该适用于 mySQL、SQL Server 等。


