whatisgithub

What is db?

upper/db — explained in plain English

Analysis updated 2026-05-18

3,659GoAudience · developerComplexity · 3/5LicenseSetup · easy

In one sentence

A Go data access layer that lets apps work with Postgres, MySQL, MongoDB, and more through one consistent interface.

Mindmap

mindmap
  root((upper/db))
    What it does
      Data access layer for Go
      Works across databases
      ORM like features
    Tech stack
      Go
      PostgreSQL
      MySQL
      MongoDB
    Use cases
      Swap databases easily
      Reduce raw SQL code
      Try live browser tour
    Audience
      Go developers
      Backend engineers
    Licensing
      MIT license
      Free for commercial use

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Switch a Go app between different databases without rewriting query code.

USE CASE 2

Use ORM-like objects instead of raw SQL strings in a Go application.

USE CASE 3

Try live code examples in the browser via the interactive tour before installing.

What is it built with?

GoPostgreSQLMySQLMongoDBSQLiteCockroachDB

How does it compare?

upper/dbalexflint/galliumdoitintl/kube-no-trouble
Stars3,6593,6593,662
LanguageGoGoGo
Setup difficultyeasyhardeasy
Complexity3/54/52/5
Audiencedeveloperdeveloperops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min
MIT license: free to use in personal and commercial projects with attribution preserved.

So what is it?

upper/db is a Go library that helps application code talk to databases without being tied to any specific one. It works with PostgreSQL, MySQL, Microsoft SQL Server, CockroachDB, MongoDB, SQLite, and a smaller database called QL. Rather than writing raw database queries for each project, developers use upper/db's shared interface and switch the underlying database by changing a single configuration detail. The library is described as a data access layer, which means it sits between the application and the database and handles the translation between Go data structures and database records. It includes features similar to what is often called an ORM (object-relational mapping), a style of database library that lets you work with records as plain objects in code rather than writing query strings manually. This approach can reduce the amount of repetitive database code a team needs to maintain. The README for this project is minimal and points readers to the project website at upper.io/v4 for full documentation and examples. There is also an interactive tour at tour.upper.io where visitors can run live code samples in the browser without installing anything. The library is released under the MIT license, which allows it to be used freely in both personal and commercial projects. This tool is aimed at Go developers who build applications that store and retrieve data from relational or document databases and want a consistent programming interface across those different systems.

Copy-paste prompts

Prompt 1
Show me how to connect to PostgreSQL using upper/db and run a basic query.
Prompt 2
Explain what a data access layer is and how upper/db implements one for Go.
Prompt 3
Help me migrate a Go project from raw SQL queries to upper/db.
Prompt 4
Compare upper/db's ORM-like features to writing manual SQL in Go.

Frequently asked questions

What is db?

A Go data access layer that lets apps work with Postgres, MySQL, MongoDB, and more through one consistent interface.

What language is db written in?

Mainly Go. The stack also includes Go, PostgreSQL, MySQL.

What license does db use?

MIT license: free to use in personal and commercial projects with attribution preserved.

How hard is db to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is db for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.