久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <legend id='13bPu'><style id='13bPu'><dir id='13bPu'><q id='13bPu'></q></dir></style></legend>
    1. <i id='13bPu'><tr id='13bPu'><dt id='13bPu'><q id='13bPu'><span id='13bPu'><b id='13bPu'><form id='13bPu'><ins id='13bPu'></ins><ul id='13bPu'></ul><sub id='13bPu'></sub></form><legend id='13bPu'></legend><bdo id='13bPu'><pre id='13bPu'><center id='13bPu'></center></pre></bdo></b><th id='13bPu'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='13bPu'><tfoot id='13bPu'></tfoot><dl id='13bPu'><fieldset id='13bPu'></fieldset></dl></div>
      <tfoot id='13bPu'></tfoot>
      • <bdo id='13bPu'></bdo><ul id='13bPu'></ul>

      <small id='13bPu'></small><noframes id='13bPu'>

        NoSQL 數據結構,用于使用 Firebase 和查詢選擇字段

        NoSQL Data structure to select subset of fields with Firebase and query(NoSQL 數據結構,用于使用 Firebase 和查詢選擇字段子集)

        • <i id='ahvjK'><tr id='ahvjK'><dt id='ahvjK'><q id='ahvjK'><span id='ahvjK'><b id='ahvjK'><form id='ahvjK'><ins id='ahvjK'></ins><ul id='ahvjK'></ul><sub id='ahvjK'></sub></form><legend id='ahvjK'></legend><bdo id='ahvjK'><pre id='ahvjK'><center id='ahvjK'></center></pre></bdo></b><th id='ahvjK'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ahvjK'><tfoot id='ahvjK'></tfoot><dl id='ahvjK'><fieldset id='ahvjK'></fieldset></dl></div>

              <tbody id='ahvjK'></tbody>
            1. <small id='ahvjK'></small><noframes id='ahvjK'>

              <tfoot id='ahvjK'></tfoot>
                <bdo id='ahvjK'></bdo><ul id='ahvjK'></ul>
                <legend id='ahvjK'><style id='ahvjK'><dir id='ahvjK'><q id='ahvjK'></q></dir></style></legend>

                  本文介紹了NoSQL 數據結構,用于使用 Firebase 和查詢選擇字段子集的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在使用 Firebase 創建一個 NoSQL 數據庫,但由于我是一名 SQL 思想家,因此我需要一些關于 Firebase 查詢和 NoSQL 數據結構的建議.

                  I’m creating a NoSQL database using Firebase, but as I’m a SQL thinker my mind needs some advices about Firebase queries and NoSQL Data Structure.

                  我正在使用 Ionic 2 (AngularJS 2) 為移動應用程序做一些實驗,我擔心的是速度(用戶時間)和我的表格的正確結構.

                  I am making some experiments for a Mobile App using also Ionic 2 (AngularJS 2), and my concerns are about the speed (user time) and the correct structure of my tables.

                  在應用程序中,我列出了用戶所做的事情,并且用戶可能是組的一部分,現在在 Firebase 網站的非規范化之后,我創建了這個架構

                  In the App I have a list of things that Users have Made and Users could be part of a Group, now following the de-normalization from the Firebase website I made this schema

                  Users : {
                     Id : {
                         Name: string
                         Picture: base64 56x56 pixels (image)
                         Addresses : {}
                         Groups : {
                             Worker: boolean 
                             Student: boolean
                         }
                     }
                  }
                  
                  Groups : {
                    Worker : {
                      Desc: string
                      Members : {
                        Userid: boolean
                      }
                    }
                    Student : {
                      Desc: string
                      Members : {
                        Userid: boolean
                      }
                    }
                  }
                  
                  Made : {
                    Id : {
                      Name: string
                      Thumb: base64 56x56 pixels (image)
                      Desc: string
                      User: userid
                      Images:  base64 dimensions could vary
                    }
                  }
                  

                  我要做的是顯示用戶所做的事情的列表,其中包含很少的信息,例如名稱和拇指圖像,單擊它會打開帶有其他信息的描述.

                  What I have to do is to show a list of things that an user made, with few information like name and thumb image, by clicking on it opens the description with the other infos.

                  現在,如果我使用以下代碼段獲取列表,它會返回所有信息,但一開始我只需要姓名和拇指(或其他內容)

                  Now if I use the following snippet for getting the list, it returns me all the info but at the beginning I need just name and thumb (or something else)

                  return firebase.database().ref('/made/' + madeId)
                  .once('value').then(function(snapshot) {
                    var username = snapshot.val().username;
                    // ...
                  });
                  

                  那么,firebase 中有什么方法可以做類似(?)的事情:

                  So, is there any way in firebase to do something like(?):

                  SELECT name, thumb FROM Table_Made
                  

                  為了只獲取每個查詢我需要的字段?或者

                  In order to get only the fields that I need for each query? Or

                  最好有另一個只有名稱和圖像的表嗎?

                  Is better to have another table with only the name and the image?

                  同時擁有拇指和圖像是個好主意嗎?為了加速json,因為拇指一般比圖片小.

                  Is a good idea to have both thumb and the image? In order to speed up the json because the thumb is generally smaller than the image.

                  查看 Firebase 文檔,似乎小于 10mb 的圖像可以以 base64 格式保存到文檔中,以防存儲空間更大.您對此有何看法?

                  Looking at Firebase doc, it seems that images smaller than 10mb could be saved as base64 into the document and in case are bigger on the storage. What is your idea about that?

                  推薦答案

                  Firebase 客戶端總是檢索完整的節點.無法僅獲取節點屬性的子集.

                  Firebase clients always retrieve complete nodes. There is no way to get just a subset of the properties of a node.

                  像往常一樣:如果您在數據模型上實現用例時遇到問題,請更改數據模型以適應您的用例.所以在這種情況下,這意味著您可以將名稱和縮略圖拆分為一個單獨的節點.

                  As usual: if you are having problems implementing your use-case on the data model, change the data model to fit your use-case. So in this case, that means that you could split off the name and thumbnail into a separate node.

                  MadeListinfo : {
                    Id : {
                      Name: string
                      Thumb: base64 56x56 pixels (image)
                    }
                  }
                  

                  這篇關于NoSQL 數據結構,用于使用 Firebase 和查詢選擇字段子集的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Use IScroll in Angular 2 / Typescript(在 Angular 2/Typescript 中使用 IScroll)
                  anime.js not working in Ionic 3 project(Anime.js 在 Ionic 3 項目中不起作用)
                  Ionic 3 - Update Observable with Asynchronous Data(Ionic 3 - 使用異步數據更新 Observable)
                  Angular 2: file not found on local .json file(Angular 2:在本地 .json 文件中找不到文件)
                  In Ionic 2, how do I create a custom directive that uses Ionic components?(在 Ionic 2 中,如何創建使用 Ionic 組件的自定義指令?)
                  Use ViewChild for dynamic elements - Angular 2 amp; ionic 2(將 ViewChild 用于動態元素 - Angular 2 amp;離子2)

                    <bdo id='jsceK'></bdo><ul id='jsceK'></ul>

                    <i id='jsceK'><tr id='jsceK'><dt id='jsceK'><q id='jsceK'><span id='jsceK'><b id='jsceK'><form id='jsceK'><ins id='jsceK'></ins><ul id='jsceK'></ul><sub id='jsceK'></sub></form><legend id='jsceK'></legend><bdo id='jsceK'><pre id='jsceK'><center id='jsceK'></center></pre></bdo></b><th id='jsceK'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='jsceK'><tfoot id='jsceK'></tfoot><dl id='jsceK'><fieldset id='jsceK'></fieldset></dl></div>
                  • <tfoot id='jsceK'></tfoot>
                    1. <legend id='jsceK'><style id='jsceK'><dir id='jsceK'><q id='jsceK'></q></dir></style></legend>

                        <tbody id='jsceK'></tbody>

                          • <small id='jsceK'></small><noframes id='jsceK'>

                            主站蜘蛛池模板: 天天操夜夜拍 | 欧美一级久久 | 日韩在线播放一区 | 日本91av视频 | 高清人人天天夜夜曰狠狠狠狠 | 精品一区二区三区不卡 | 精品欧美久久 | 国产一级成人 | 国产精品久久久久久久久久免费看 | 久久一级大片 | 国产一区久久 | 伊人久久精品一区二区三区 | 在线一区| 国产精品资源在线 | 99re热精品视频 | 日本成人一区二区 | 欧美成人一区二区 | 91免费在线播放 | 国产久 | 麻豆av在线| 亚洲精品在线免费观看视频 | 亚洲欧美一区二区三区国产精品 | 色天堂视频 | 在线视频国产一区 | 成人h视频在线 | 国产在线视频一区 | eeuss国产一区二区三区四区 | 在线欧美日韩 | 欧美日韩一二三区 | 在线观看免费高清av | 国产福利91精品 | 国产一区二区三区免费 | 免费视频久久久久 | 久久男人 | 亚洲在线一区 | 在线欧美视频 | 国产传媒| 久久精品视频网站 | 国产精品1区2区3区 中文字幕一区二区三区四区 | 国产福利观看 | 欧美久久久久久久久 |