{"id":17008811,"url":"https://github.com/i-e-b/kvk","last_synced_at":"2025-09-13T22:19:29.743Z","repository":{"id":5942502,"uuid":"7163039","full_name":"i-e-b/KVK","owner":"i-e-b","description":"Experiments in relational document datastores. Key-Value-Key.","archived":false,"fork":false,"pushed_at":"2013-02-28T13:36:10.000Z","size":1148,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T12:30:31.669Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/i-e-b.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-14T09:35:08.000Z","updated_at":"2014-06-13T20:16:33.000Z","dependencies_parsed_at":"2022-09-11T05:41:19.350Z","dependency_job_id":null,"html_url":"https://github.com/i-e-b/KVK","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/i-e-b/KVK","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-e-b%2FKVK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-e-b%2FKVK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-e-b%2FKVK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-e-b%2FKVK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/i-e-b","download_url":"https://codeload.github.com/i-e-b/KVK/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-e-b%2FKVK/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275035185,"owners_count":25394181,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T05:29:18.933Z","updated_at":"2025-09-13T22:19:29.684Z","avatar_url":"https://github.com/i-e-b.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"KVK\n===\n\nExperiments in relational document datastores. Key-Value-Key: Reinventing the wheel\n\nTodo\n----\n* Use JSON as the interface, decompose arrays directly.\n* Re-compose to JSON\n* Improve the pointerless Ternary Search Tree to cope with arbitrary depth\n* Try mem-mapping pTST to files\n\nSchema-free data store as a set of Key-Value stores\n===================================================\n\nDocuments are composed of a hierarchy of keys and values. Each document has a single unique key.\nEach key in the document can be expressed as a key path -- so in the document:\n\n```\nid1 = {\n\tGroup : {\n\t\tItem : {\n\t\t\tUpc : \"29875897587365\"\n\t\t}\n\t}\n}\n```\n\nThe `Upc` key has a key path of `Group.Item.Upc`.\n\nPrinciples\n----------\n\n* Every key-path is a separate store\n* Each __key__ in each store is the _value_ in the document\n* Each __value__ in each store is a list of documents that have the key-path _and_ value\n\nSo for documents:\n```\nx = {\n  Uri : \"http://example.com\",\n  Owner : {\n    Name : \"me\"\n  }\n}\n\ny = {\n  Uri : \"http://nist.gov\",\n  Owner : {\n    Name : \"government\"\n  }\n}\n\nz = {\n  Uri : \"http://snippetsfor.net\",\n  Owner : {\n    Name : \"me\"\n  }\n}\n```\n\n* `\"Uri\" --\u003e [\"http://example.com\" : [x]]; [\"http://nist.gov\": [y]]; [\"http://snippetsfor.net\":[z]]`\n* `\"Owner.Name\" --\u003e [\"me\" : [x, z]]; [\"government\":[y]]`\n\nWith pattern `\"store name\" --\u003e [\"value\" : [set of containing documents]]`\n\nThe keys in each store could be Tries where each node has a (potentially empty) list of matching documents.\n\nNotes\n-----\n* For scaling, can list hosts rather than documents, then go to host for definitive answer.\n* Key-value existence checking v. easy.\n* All documents are 'joined' by key equality by default.\n\nMulti-keys\n----------\n\nIt should be acceptable to define a key-path more than once per document. It then becomes \navailable by any of those keys:\n\n```\nx = {\n  Picture : \"http://example.com/us.jpg\",\n  Tags : {\n    Name : \"John\",\n\tName : \"Sue\",\n\tName : \"Phil\"\n  }\n}\n```\n* `\"Tags.Name\" --\u003e [\"John\" : [x]]; [\"Sue\":[x]]; [\"Phil\":[x]]`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi-e-b%2Fkvk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fi-e-b%2Fkvk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi-e-b%2Fkvk/lists"}