设备上的加密数据库还是云存储的数据库?

Encrypted database on device or cloud stored database?

我的 Android 应用程序有一个预填充的 SQLite 数据库,我需要进行一些读取以显示 autoCompleteTextView 的元素,然后进行其他一些操作,仅读取数据库。

在过去的几天里,我阅读了 Firebase 的 SQLCipher 和 Cloud Firestore。 SQLCipher 似乎是我正在寻找的东西,但我读到我不能将它与预填充的数据库一起使用。我认为 Firestore(或任何其他云服务)是我唯一的其他解决方案,但我有点担心 ACTV 上的输入和服务器结果之间的价格和可能的延迟。

数据库不包含任何用户信息或其他敏感数据,我只是想保护我的工作。我不需要最强的保护

我可以将 Firestore 与我的 SQLite 数据库一起使用吗?我的问题还有其他解决方案吗?谢谢!

如果您想使用 Firebase,您需要知道可以使用 Firebase Database Security Rules.

非常简单地保护您的数据库。

Firebase Realtime Database Rules determine who has read and write access to your database, how your data is structured, and what indexes exist. These rules live on the Firebase servers and are enforced automatically at all times. Every read and write request will only be completed if your rules allow it. By default, your rules are set to allow only authenticated users full read and write access to your database. This is to protect your database from abuse until you have time to customize your rules or set up authentication.

如果您想使用新的 Firestore 版本(目前处于测试版),请查看 Secure Data in Cloud Firestore 官方文档以获取更多信息。

另外需要注意的是Firebase and Firestore也可以提供offline capabilities。因此,即使您的应用程序暂时失去网络连接,应用程序也能正常工作。所以不需要其他数据库来实现。

另外需要注意的是Firebase可以提供Anonymously Authenticatin.

总而言之,Firebase 可以为您提供安全保障,即使您的应用包含或不包含任何用户信息或其他敏感数据。