Embedded database options

This page summarizes the projects mentioned and recommended in the original post on /r/golang

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • embedded-postgres

    Run a real Postgres database locally on Linux, OSX or Windows as part of another Go application or test

  • This is down to nuance, but all databases are "file based" as they all write to files. But most of them require a separate process with lock coordination to get away from writer lock delays and ensure ACID, which includes Postgresql. Calling any version of pgl "embedded" is confusing because I see that being used to describe pgl databases which are run in a localhost mode with a single reader/writer client. Regardless, those still require a postgres process and access it over IP. For simplicity, if one uses a database by touching its files directly from the process accessing the database, then it's "embedded"; but then again I guess that semantic ship has sailed: https://github.com/fergusstrange/embedded-postgres so the point may be moot.

  • awesome-go-storage

    A curated list of awesome Go storage projects and libraries

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • chai

    Modern embedded SQL database (by chaisql)

  • Another option could be also Genji - https://github.com/genjidb/genji

  • litestream

    Streaming replication for SQLite.

  • And with litestream.io/ you can have semi-non-blocking backups.

  • ObjectBox Go Database

    Embedded Go Database, the fast alternative to SQLite, gorm, etc.

  • You could try https://github.com/objectbox/objectbox-go. I have not used the go version, but a coworker is using it for dart and it made a good impression. I like that its type safe

  • badger

    Fast key-value DB in Go.

  • bytebase

    The GitLab/GitHub for database DevOps. World's most advanced database DevOps and CI/CD for Developer, DBA and Platform Engineering teams.

  • Bytebase embedds postgresql per platform. If it helps. https://github.com/bytebase/bytebase/tree/main/resources/postgres

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • migrate

    Database migrations. CLI and Golang library.

  • This is indeed a concern, but not one I've needed to care about (or the ordering of columns on disk in general). Using an intermediate table might be OK if you use it as part of automatic DB migrations. I use golang-migrate, YMMV.

  • badger

    Fast Key-Value DB in Go (by outcaste-io)

  • Just know that dgraph (which you also mentioned) appears to be in its death throws. The original developer has left, forked it and is working on starting a new company around it. I'm rooting for him because it's a great database.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • GORM

    16 projects | /r/golang | 16 Feb 2023
  • DB schema management strategy (migrations)

    4 projects | /r/golang | 25 Oct 2022
  • Best packages?

    11 projects | /r/golang | 16 Oct 2022
  • Github template for Golang services

    6 projects | dev.to | 19 Jun 2022
  • We Went All in on Sqlc/Pgx for Postgres and Go

    31 projects | news.ycombinator.com | 8 Sep 2021