Skip to content
プロジェクト

概要

JSONとリレーショナルテーブルを同等に扱う分析データベース

データ・分析

この数値の測り方

計測したスター増加

24時間
0
7日間
+1
15日間
-1
1か月
-1

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

SuperDB Tests GoPkg

SuperDB is an analytics database built on the algebraic data model, which unifies relational tables and JSON in a single type system.

A relational schema is a product type. JSON is one particular sum type. SuperDB has both, in the form of the records, unions, arrays, and maps found in languages like Rust and TypeScript, so tables and JSON are each just a special case. This means:

  • there are no "JSON columns" and no separate "JSON way to do things",
  • messy data is ingested as is, with no schema inference to fall over,
  • every value has a precise type whether or not anyone declared a schema, and
  • queries are type checked against those types.

The query language, SuperSQL, is (aspirationally) backward compatible with SQL and adds pipe syntax and lots of fun shortcuts.

Example

Here is some messy JSON in a file shapes.json:

{"id":1,"type":"Rectangle","dimensions":{"width":2,"height":1}}
{"id":2,"type":"Circle","dimensions":{"radius":3}}
{"id":3,"type":"Square","dimensions":{"side":5}}
{"id":4,"type":"Circle","dimensions":{"radius":7}}
{"id":5,"type":"Vector","dimensions":[1,2,3,2,1]}

Nobody wrote a schema, but the data has a type:

$ super -s -c 'from shapes.json | aggregate fuse(this)'
<{id:int64,type:string,dimensions:{width:int64|missing,height:int64|missing,radius:int64|missing,side:int64|missing}|[int64]}>

The types are stored with the data, so a query is checked before it runs:

$ super -o shapes.bsup shapes.json
$ super -s -c 'from shapes.bsup | values dimensions.radius'
no such field "radius": . applied to [int64] in {width:int64|missing,height:int64|missing,radius:int64|missing,side:int64|missing}|[int64] at line 1, column 38:
from shapes.bsup | values dimensions.radius
                                     ~~~~~~
field may be missing (consider ok() or ?.) at line 1, column 27:
from shapes.bsup | values dimensions.radius
                          ~~~~~~~~~~~~~~~~~

The checker knows that dimensions might be an array and that radius might be missing. Say that's expected and you get the answer:

$ super -s -c 'from shapes.bsup | values dimensions.radius.ok()'
3
7

With a JSON column in SQL, the first query would have quietly returned NULL for most of the shapes, and so would a misspelled radious.

What's Here

  • The super command, a dependency-free binary that queries files, HTTP endpoints, and S3 paths in JSON, CSV, Parquet, Arrow, and other common formats.
  • The self-describing super formats: SUP, a human-readable superset of JSON, and BSUP, its efficient binary form with both row and columnar layouts.
  • A database that lives at a path in cloud storage or a local file system, where a table can have a relational schema, any algebraic type, or no type at all, and every table has branches, atomic commits, and time travel.
  • An MCP server so AI agents can explore a database's types and run type-checked queries.

Project Status

Our long-term goal is for data to keep its types end to end, from the application through the wire format, storage, and queries and back again, with the relational model as a special case rather than the whole story.

In the meantime, SuperDB is stabilizing but still a bit of a moving target. We would love your engagement to evolve and fine tune its syntax and semantics.

Try It

Install the super command, drop some data into SuperLens in your browser, or read the docs.

Contributing

See the contributing guide on how you can help improve SuperDB!

Join the Community

Join our public Slack workspace for announcements, Q&A, and to trade tips!

関連プロジェクトを探す

読み込み中…