FireBase检索概念 [英] FireBase Retrieval Concept
问题描述
https://www.firebase.com/blog /2013-04-12-denormalizing-is-normal.html
我只想清除firebase上的检索概念。
如上所述链接
{
链接:{
link1:{
title:Example,
href:http://example.org,
已提交:user1,
评论:{
<当我访问link1时,响应包含link1数据以及注释:{comment1:true}。取而代之的是评论1的实际文字,访问链接1给出评论的标识,即评论1。它的意思是当我访问link1时,它给了我属于那个链接的注释的ID。所以我必须根据链接1响应中收到的评论ID,再次手动检索请求Firebase的评论?请清除我的概念:)
解决方案是的,您的概念是正确的,您将平整Firebase中的数据,然后检索评论通过使用前面阅读的
中的id
Im new to Firebase, I have Structure my Data on firebase using Indices for maintaining relationshi as described in below articles
https://www.firebase.com/docs/web/guide/structuring-data.html
https://www.firebase.com/blog/2013-04-12-denormalizing-is-normal.html
I just want to clear my retrieval concept on firebase.
as mention in above links
{
links:{
link1:{
title:"Example",
href:"http://example.org",
submitted:"user1",
comments:{
comment1:true
}
}
}
}
when I access link1, response contains link1 data as well as comments: {comment1:true}. Instead of comment1 actual text, accessing link1 gives comment's ID i.e, comment1. its mean when I access link1, it gives me the Ids of comments belongs to that link. so I have to retrieve comments mannually requesting firebase again based on comments ids received in link1 response? Please clear my concept : )
解决方案 Yes, your concept is correct, you will flatten out the data in firebase and then retrieve comments by using the id from the previous read
这篇关于FireBase检索概念的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!