Skip to content

A general-purpose plain-text relational database

Notifications You must be signed in to change notification settings

fetsorn/csvs-spec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

csvs (comma-separated value store)

Structure of metadir/

The `metadir` directory contains comma-separated plain-text files. Each comma-separated file can have only two columns: “key,value”.

metadir/props/ - contains keys and values of every property.

key1,value1
key2,value2
key3,value3
key4,value4

metadir/pairs/ - contains relations between properties.

key1,key3
key2,key4

Format of metadir.json

The `metadir.json` file describes the schema of a csvs database - relations between properties, their aliases and data types.

{
    "prop1": {
        "type": "string"
    },
    "prop2": {
        "parent": "prop1",
        "type": "string"
    }
}

object

  • “parent” - The name of the prop described by the current prop. Prop that does not have a parent is considered to be a root of the database.
  • “dir” - The directory in props where index.csv is stored. Defaults to prop’s name.
  • “label” - The property name to use in data structures. Defaults to prop’s name.
  • “type” - The data type of value. For a list of data types see below.

data types

  • not specified - stored as is, key is sha256sum of value
  • “date” - stored as is, key is sha256sum of value
  • “string” - stored as JSON escaped string, key is sha256sum of the unescaped value
  • “hash” - both key and value is the same sha256sum, not stored in props/, only appears in pairs/
  • “rule” - stored as

More csvs projects

qualia - Web UI and desktop app. Tell the story of your own data.

csvs-js - WASM/JS implementation. Serverless CRUD.

csvs-sh - command-line interface. A reference implementation.

csvs-template - a template database for genealogy

About

A general-purpose plain-text relational database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published