我从Google Firebase服务中看过视频并阅读了Cloud firestore的文档,但我无法想象实时数据库.
我想到了这个Web应用程序,我希望从不同类别的产品中存储我的提供程序.我希望通过我的所有产品执行搜索查询,以查找我对此类产品的提供商,并最终访问该提供商信息.
我打算为此目的使用这个结构:
Providers ( Collection )
Provider 1 ( Document )
Name
City
Categories
Provider 2
Name
City
Products ( Collection )
Product 1 ( Document )
Name
Description
Category
Provider ID
Product 2
Name
Description
Category
Provider ID
Run Code Online (Sandbox Code Playgroud)
所以我的问题是,一旦我得到我想要的产品,这种方法是否是访问提供商信息的正确方法?
我知道这在实时数据库中是可行的,使用我可以在提供者部分中搜索该提供者的提供者ID,但是使用Firestore我不确定它是否可能或者这是否正确.
java firebase firebase-realtime-database google-cloud-firestore