0
我有一個NOSQL(Cloudant)數據庫如何做一個鏈接的NoSql查詢
-Within我們有文件的數據庫文件所在的領域之一,代表「表」(文檔類型)
-Within這些文件我們有代表鏈接其他文檔數據庫
內例如字段:
{_id: 111, table:main, user_id:222, field1:value1, other1_id: 333}
{_id: 222, table:user, first:john, other2_id: 444}
{_id: 333, table:other1, field2:value2}
{_id: 444, table:other2, field3:value3}
我們想要的搜索_id的方式:111
而且結果與數據某一文檔的鏈接表:
{_id:111, user_id:222, field1:value1, other1_id: 333, first:john, other2_id: 444, field2:value2, field3:value3}
有沒有辦法做到這一點?
我們如何存儲或獲取數據的結構具有靈活性 - 關於如何更好地構造數據以使其成爲可能的任何建議?