Skip to content
المشاريع

حول

قاعدة بيانات للتحليلات تتعامل مع JSON والجداول العلائقية على قدم المساواة.

البيانات والتحليلات

كيف تُقاس هذه الأرقام

1,578 نجمة84 التفرعات +1 خلال 24 ساعة

النمو المقاس للنجوم

خلال 24 ساعة
+١
خلال 7 أيام
+٢
خلال 15 يومًا
٠
خلال شهر
٠

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

README.md

الأصل

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!

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…