MobileSheets Forums

Full Version: Database internal: Source types
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Entries in the Files table have a (numeric) Source attribute that corresponds to a value in the table SourceType.
Using the song editor, Source types can be maintained. It is possible to remove Source types that are in use in the Files table, thus violating referential integrity.
Actually that particular source field (in the Files table) refers to where the file came from. When I was first rewriting the MS Pro code, I wasn't sure if I was going to allow files to be streamed from other sources, such as cloud storage. If I supported that, people wouldn't have to store all of their files on the tablet (at the cost of always having to have internet connectivity). So I set up a source field on my file objects so that I could identify what the path points to. Some cloud storages use unique ids to reference files instead of file paths, so in that case, the path would reference that. That source field can also indicate that the field is stored in internal storage, which requires a slightly different mechanism to look up the absolute path. For now, the source field is pretty much always 1, which is the SD card.