In Data Architecture we describe the 2 ways Data Feeds can be configured:
- Live Feed (Remote Data Source)
- On Device SQL DB (Local Data Source)
In this Tutorial we show you how you can use Cloud Collection to create either
To configure a Cloud Collection as a Live Feed or as an On Device SQL DB you have to Edit your Cloud Collection.
- Select Connect tab to access Cloud Collection
- Select the Collection
- Select 'Edit Collection'
The second setting, right after the Cloud Collection 'Name' Cloud Collection is 'Data Sources'
- Live Feed (showing under the older denomination: 'Remote Data Source')
- Under that configuration, the data from the Cloud Collection is stored as an XML file on the device.
- A data connection is required to access the data.
- Learn more about Live Feeds architecture
- On Device SQL DB (showing under older denomination Local Data Source)
- The data is stored on the Device as a SQL Lite Database.
- No data connection is required to access the assets.
- Learn more about On Device SQL DB architecture
- Live Feed AND On Device SQL DB (showing under older denomination Remote and Local Data Sources.)
- The data is stored as both: Live Feed and On Device SQL DB.
- To supports this setting, 2 different data source with 2 different settings are created. One Data Source will yield the On Device SQL DB (orange) while the other will be the Live Feed (green) see detail herein:
When you use the setting "Remote and Local Data Sources" to create the data source there will be a mirrored SQL Data base (local data source) automatically created which you can associate with your app.
You can use this SQL DB as local data that will be in your app and will not require a data connection to be accessed OR a timed local data source that will seek out new content that has been changed in your original Cloud Collection.
Generate a 'Live Feed'
To generate a Live Feed (XML format) from your Cloud Collection:
Set the Data Source option to 'Live Feed'
In this example the collection named 'Directory' is set up as a Live Feed (XML)
Generate an 'On Device SQL DB'
Some apps require local storage and in that case, a SQL DB is required.
Also, you can use SQL statements like 'Insert Into', 'Delete' , ... with an On Device SQL DB to do all sort of manipulation.
From development time prospective, switching you data from local (On Device SQL) to remote (Live Feed) can help accelerate the production of the app.
If you have a lot of assets in an on device SQL DB the app will take time to generate as the data moves around in the cloud.
While you are developing, you can have your content stored as Live and only move them to local SQL when you are ready to ship the app.
Update an On Device SQL DB
- An On Device SQL DB generated by a Cloud Collection will automatically update every 1.5 hours when there is a data connection.
- If there is no data connection available then the Data Source/app will update once there is a data connection available.
You can change this setting not only when you create your Cloud Collection but on the fly at any time by clicking on the "Connect" tab, then the Cloud Collection you want to edit and then click "Edit Collection".
To learn how to update & manage On Device SQL DB, refer to the Tutorial: