Tonolog / StudyDeck

0 stars 0 forks source link

Story: Database architecture research #5

Open danakenneyl opened 4 months ago

danakenneyl commented 4 months ago

Addresses issue https://github.com/Tonolog/StudyDeck/issues/3

danakenneyl commented 4 months ago

@naynayll2 suggests no use of cloud at this stage. Potential future feature.

shared_preferences: Allows for storage of simple key-value pairs. The key is required to retrieve the value and groupings of values cannot be queried together. This might be useful where key constants can be declared, but for the purpose of flashcards, it may be difficult. Especially because only simple datatypes can be stored. While a list of strings theoretically work to store all card data... it would not be the best solution. (https://pub.dev/documentation/shared_preferences/latest/)

flutter_secure_storage: seems more for storing information that needs to be secure e.g. passwords, API keys etc. While potentially useful in other areas of this project, for the actual storage of flashcard information, it is unnecessary to encrypt all the data. (https://pub.dev/documentation/flutter_secure_storage/latest/)

realm: MongoDB has its own flutter sdk, allows for flexible storage with easily defined parameters. Appropriate for our experimental approach to flashcard content. (https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/quick-start/)

naynayll2 commented 4 months ago

Realm does not support creating separate collections, we might have to do some testing to figure out how to isolate different decks with different schemas. if Realm automagically retrieves the data matching a certain schema great! otherwise we would need a field with the deck name to determine what cards to select