我可以使用 firebase 来存储对象吗?
Can I use firebase to store objects?
我是一名新手 android 程序员,我正在开发我的第一个 android 应用程序。我想弄清楚 firebase 是否适合我的需要。
我的应用程序如下所示:
用户通过填写商品将商品加入数据库
字段
产品作为具有简单字段(数字和字符串)的对象存储在数据库中
用户在数据库中搜索产品,根据不同的条件比较其字段
用户编辑(更新)产品字段
用户有自己的账户
我的首要任务是易用性。
我的问题是:
- Firebase 适合我的需求还是有更合适的解决方案?
- 我对云存储产品感兴趣的理解正确吗?
您可以为此使用 firestore。虽然 full-text 搜索不起作用,但您可以使用 algoia/elastic 进行 full-text 搜索。
users add the product to the database by filling in the product fields
是的,您可以使用 Cloud Firestore or the Realtime Database 来实现。在这两种情况下,您都可以将数据添加为地图对象或您选择的自定义对象。
products are stored in the database as objects with simple fields (numbers and strings)
是的,你可以做到。这里是 Cloud Firestore supported data types, as well as Firebase Realtime Database data types.
users search for a product in the database to compare its fields according to different criteria.
None 以上数据库支持本机索引或搜索文本字段,因此您可以使用 third-party 库,如 Algolia or Elasticsearch.
users edit (update) product fields.
这些是两个数据库都支持的基本 CRUD 操作。
users have their own accounts
在这种情况下,您应该使用 Firebase Authentication,这是一种可以与两个数据库完美配合的服务。
Is firebase suitable for my needs or is there a more suitable solution.
从你的要求来看,是的,符合你的需求。
Do I understand correctly that I am interested in the Cloud Storage product?
为了存储数据(对象),您需要选择 above-mentioned 数据库之一,或者为什么不选择两者,对于存储文件,您确实应该使用 Cloud Storage for Firebase.
我是一名新手 android 程序员,我正在开发我的第一个 android 应用程序。我想弄清楚 firebase 是否适合我的需要。 我的应用程序如下所示:
用户通过填写商品将商品加入数据库 字段
产品作为具有简单字段(数字和字符串)的对象存储在数据库中
用户在数据库中搜索产品,根据不同的条件比较其字段
用户编辑(更新)产品字段
用户有自己的账户
我的首要任务是易用性。
我的问题是:
- Firebase 适合我的需求还是有更合适的解决方案?
- 我对云存储产品感兴趣的理解正确吗?
您可以为此使用 firestore。虽然 full-text 搜索不起作用,但您可以使用 algoia/elastic 进行 full-text 搜索。
users add the product to the database by filling in the product fields
是的,您可以使用 Cloud Firestore or the Realtime Database 来实现。在这两种情况下,您都可以将数据添加为地图对象或您选择的自定义对象。
products are stored in the database as objects with simple fields (numbers and strings)
是的,你可以做到。这里是 Cloud Firestore supported data types, as well as Firebase Realtime Database data types.
users search for a product in the database to compare its fields according to different criteria.
None 以上数据库支持本机索引或搜索文本字段,因此您可以使用 third-party 库,如 Algolia or Elasticsearch.
users edit (update) product fields.
这些是两个数据库都支持的基本 CRUD 操作。
users have their own accounts
在这种情况下,您应该使用 Firebase Authentication,这是一种可以与两个数据库完美配合的服务。
Is firebase suitable for my needs or is there a more suitable solution.
从你的要求来看,是的,符合你的需求。
Do I understand correctly that I am interested in the Cloud Storage product?
为了存储数据(对象),您需要选择 above-mentioned 数据库之一,或者为什么不选择两者,对于存储文件,您确实应该使用 Cloud Storage for Firebase.