Document database backed by keyvalue storage P&L: -7 (≃ -2026 TWD)
I am interested in database technology and distributed systems.
I have an experimental python project which is less than 1000 lines and supports basic SQL and SQL inner joins and basic Cypher graph database queries and keyvalue storage. There is no persistence layer.
On the linked website page from this project which is GitHub issues I am talking how I plan to implement document storage so that JSON documents can be mapped to individual keys and joined with SQL queries.
我花了幾個小時來解決這個問題的其餘部分,並在完成保存文檔後進行文檔檢索。
這使您可以保存和檢索 JSON 文檔
插入的文檔數據也可以通過 SQL 查詢。
尚不支持針對文檔的聯接,但我計劃實施此功能。
I spent a few hours working on the remainder of this problem and got documnent retrieval working after finishing save document.
This lets you save and retrieve JSON documents
The document data inserted is also queryable by SQL.
Joins against documents are not yet supported but I plan to implement this.
我設法存儲了一個 JSON 文檔,並使用 SQL 插入器插入了該文檔。理論上,該對象可以通過 SQL 查詢
{
“項目”:[(“名稱”:“項目1”),(“名稱”:“項目2”)],
“子對象”:{“子對象鍵”:“值”} }
I managed to store a JSON document and I used the SQL inserter to insert the document. In theory the object is queryable by SQL
{ "items": [("name": "item1"), ("name": "item2")], "subobject": {"subobject_key": "value"} }
⬜️ 需要將 JSON 文檔映射到數字,以便“文檔 id 0 hobbies[0].name=sam”變爲 0@0.0=sam”,這允許通過掃描數字之間的一系列鍵來進行有效檢索。 ⬜️需要編寫代碼將數字轉回字段名稱 ⬜️需要集成鍵空間優化器,因爲我們重新排序數字以提高跨列表連接的效率,例如文檔 0 = {"hobbies":{("name": "God"),{"name": "databases"), {" name": "computers")}) hobbies 可能是 0,name 可能是 1,我們有 3 個列表項 0、1、2 我們希望所有相同類型的列表索引在排序迭代器中相鄰,所以我們翻轉它們到最後所以 0@0[1]="God" 變成 0@1.0, 0@1.1 0@1.2 ⬜️ 需要爲用於 SQL 連接的內容創建鍵值 ⬜️ 需要創建一個文檔,定義人們期望在 JSON 文檔上執行的連接
⬜️ need to map a JSON document to numbers so "document id 0 hobbies[0].name=sam" becomes 0@0.1=sam" this allows for efficient retrievals by scanning a range of keys between numbers. ⬜️need to write code to turn numbers back into field names ⬜️need to integrate keyspace optimiser, as we reorder numbers for efficiency of joins across lists for example document 0 = {"hobbies":{("name": "God"),{"name": "databases"), {"name": "computers")}) hobbies might be 0, name might be 1 and we have 3 list items 0, 1, 2 we want all list indexes of the same kind to be adjacent in the sort iterator, so we flip them to the end so 0@0[1]="God" becomes 0@1.0, 0@1.1 0@1.2 ⬜️ need to create keyvalues for what is used for SQL joins ⬜️ need to create a document which defines the joins that people expect to do on a JSON document
我目前處於設計階段。我正在尋找一種有效的方法來有效地進行結構化連接和掃描集合的匹配鍵。
I am currently in design phase. I am looking for an efficient approach to structured joins and scanning matching keys of collections efficiently.
太好了,你開始了一個項目,[按時間順序]!很有意思。我將深入探討您對實現和代碼的想法。也許我們也可以邀請對相關技術感興趣或從事相關技術工作的人來這裏。
Great you starting a project, [chronological]! Very interesting. I'll have a deep dive into your thoughts of implementation and code. Perhaps we can also invite here people interested or working on related technology.