HUB
Sign inSign up
db-nge-medium logo

baseshift/db-nge-medium

By baseshift

•Updated 19 days ago

Nick's Gaming Emporium (medium) sample database on PostgreSQL 17, ready to query. CC BY-SA 4.0.

Image
Data science
Databases & storage
0

238

baseshift/db-nge-medium repository overview

⁠Nick's Gaming Emporium (medium) — PostgreSQL, ready to query

Data: Nick's Gaming Emporium⁠ (NGE) by ukhype83-dev, licensed under CC BY-SA 4.0⁠. This image redistributes the official nge_medium PostgreSQL database, restored unchanged from the published dump, under the same license. Baseshift is not affiliated with the NGE project. Attribution for the sources NGE builds on is below.

Packaged by Baseshift⁠: database clones for developers that start in seconds.

NGE is a deterministic synthetic database: the 30-year sales history (1986–2016) of a fictional video-game retailer, built around a real game catalogue. Shops, customers, staff, transactions, trade-ins, an online store and a full analytics warehouse, all generated from a fixed seed. This is the medium tier: a 278.6 GB database in a 36.9 GB download.

⁠Quick start

docker run -d -p 127.0.0.1:5432:5432 baseshift/db-nge-medium:pg17-dc1
psql -h localhost -U postgres -d nge_medium
  • No password is needed. Binding to 127.0.0.1 keeps the database reachable only from your own machine.
  • It's ready about 10–20 seconds after start.
  • You need about 38 GB of free disk (about 75 GB with Docker's containerd image store, which keeps both the download and the unpacked copy).

Example: the best-selling games of December 1998.

SELECT product_title, platform_name, round(sum(line_total_usd)) AS revenue_usd
FROM dw.sales_wide
WHERE occurred_at >= '1998-12-01' AND occurred_at < '1999-01-01'
  AND product_kind = 'game' AND NOT is_return
GROUP BY 1, 2 ORDER BY 3 DESC LIMIT 5;

Parallel query is off by default in this image. For large scans, run SET max_parallel_workers_per_gather = 4; first (about 4× faster in our tests).

⁠What's inside

  • Data: NGE nge_medium.dump from nge-data.com⁠, archive created 2026-09-10.
    • sha256 394554bfe7469aed8b863f6b62fd1c2e8ff469c3990128b1bc554a52c99e01e4
    • Restored with pg_restore into PostgreSQL 17.11, then ANALYZE.
  • Schemas: public (shops, catalogue, customers, staff, transactions, payments, trade-ins), hr, finance, web (accounts, reviews, clickstream), dw (star schema and the wide dw.sales_wide fact table), batch, plus the rpt reporting functions and the loadgen workload generator. 68 tables in all. See the NGE documentation⁠ for the full model.
  • Software: PostgreSQL 17.11 on the official postgres:17.11 image. Both linux/amd64 and linux/arm64 (Apple Silicon) are supported.
  • Storage: Baseshift dc1 compression.
    • Each 8 KB page is compressed on its own and decompressed when PostgreSQL reads it, so nothing is unpacked to disk.
    • Lossless: every page has been verified byte-identical to the original.
    • Reads cost some CPU: index lookups feel normal, but large sequential scans are slower than on an uncompressed database.
    • CREATE EXTENSION baseshift_storage; shows raw and compressed sizes per table and index.

⁠Tiers

ImageDatabase sizeDownload
baseshift/db-nge-tiny5.5 GB0.90 GB
baseshift/db-nge-small29.8 GB3.96 GB
baseshift/db-nge-medium278.6 GB36.9 GB

⁠Tags

TagMeaning
pg17-dc1-20260910PostgreSQL 17, dc1 compression, NGE data as of 2026-09-10 (pinned)
pg17-dc1latest data vintage on PostgreSQL 17 with dc1
pg17, latestlatest overall

⁠Rebuild it yourself

Download https://downloads.nge-data.com/nge_medium.dump, check its sha256 against nge-pg-SHA256SUMS.txt⁠, and restore it with pg_restore into PostgreSQL 17. NGE is deterministic, so the same tier always produces the same rows.

⁠Licenses and attribution

The NGE data is licensed under CC BY-SA 4.0⁠. NGE's code is MIT. Per the NGE license⁠:

Portions of this database are derived from Wikipedia articles under the Creative Commons Attribution-ShareAlike 4.0 License. Source article URLs are preserved in the source_url column of each release row.

Hardware-catalog data is derived from Wikipedia articles under the Creative Commons Attribution-ShareAlike 4.0 License. Source article URLs are preserved in the source_url column of each hardware row.

Geographic data (postal codes and city populations) from GeoNames.org (https://www.geonames.org/⁠), licensed under CC BY 4.0.

Street-name data derived from OpenStreetMap. © OpenStreetMap contributors. Available under the Open Database License: https://www.openstreetmap.org/copyright⁠

Game metadata enrichment derived from Wikidata (https://www.wikidata.org/⁠), released into the public domain under CC0 1.0.

NGE's companies, shops, customers and staff are fictional and not affiliated with or endorsed by any real company.

⁠About Baseshift

Baseshift⁠ builds database clones for development and testing. These images run on our clone engine with dc1, a new compression mode we're developing: every 8 KB page is compressed on its own and decompressed as PostgreSQL reads it.

Tag summary

Content type

Image

Digest

sha256:2e588184f…

Size

34.4 GB

Last updated

19 days ago

docker pull baseshift/db-nge-medium