featurebase
FeatureBase, the crazy fast analytical database based on Roaring Bitmaps and B-trees.
513
This is FeatureBase, a crazy fast database/analytics engine based on B-trees and Roaring Bitmaps.
FeatureBase is written in Go and supports SQL.
FeatureBase is released under the Apache 2.0 Open Source license.
You need to have Docker and git installed to use this guide.
To build Featurebase from source with Docker, run the following from a prompt:
git clone https://github.com/FeatureBaseDB/featurebase.git
cd featurebase
docker build -t featurebasedb/featurebase:latest .
To run FeatureBase from Docker, enter the following from a prompt:
docker run -p 10101:10101 featurebasedb/featurebase:latest
To create a sample database, run the following:
curl -X POST http://0.0.0.0:10101/sql -d 'CREATE TABLE planets (_id id, planet_name string, moons stringset, diameter_in_km int);'
To insert data into the planets database, do the following:
curl -X POST http://0.0.0.0:10101/sql -d "INSERT INTO planets VALUES (1, 'Mercury', [''], 4879), (2, 'Venus', [''], 12104), (3, 'Earth', ['Moon'], 12742);"
You may insert as many records as you like in a single POST.
To query the data in a FeatureBase database, do the following:
curl -X POST http://0.0.0.0:10101/sql -d "SELECT * FROM planets;" | python3 -m json.tool
The output should be as follows:
{
"schema": {
"fields": [
{
"name": "_id",
"type": "id",
"base-type": "id",
"type-info": null
},
{
"name": "planet_name",
"type": "string",
"base-type": "string",
"type-info": null
},
{
"name": "moons",
"type": "stringset",
"base-type": "stringset",
"type-info": null
},
{
"name": "diameter_in_km",
"type": "int",
"base-type": "int",
"type-info": null
}
]
},
"data": [
[
1,
"Mercury",
null,
4879
],
[
2,
"Venus",
null,
12104
],
[
3,
"Earth",
[
"Moon"
],
12742
]
],
"execution-time": 1006
}
Join us on Discord.
Content type
Image
Digest
sha256:9f92aebeb…
Size
41.8 MB
Last updated
over 2 years ago
Requires Docker Desktop 4.37.1 or later.