Data Layer
Synchronization
First, note that the data here is quite small and won't usually take a noticeable percentage of the available bandwidth (per month for phones) IF AND ONLY IF we keep the chatter to a minimum. Hence we will base all of our synchronization
- Each table will have a last updated datetime stamp.
- Each registered device will be listed in a table and the last updated timestamp for each device will be listed.
- Each actual change will be stored as a row on the device and include a timestamp and a CRUD operation object.
Tables
Clearly we must have tables for the following:
- Topics
- Beliefs
- Verses
- Devices
- Licenses
For the first three, the question is:
Question: How long does the string holding the topic need to be?
Belief: How long does the string holding the belief need to be?
Note: Verses are a 3-tuple of integer values. Decision since both chapters and verses are integers, all values will be one based e.g. Genesis 1:1 is identified by (1,1,1).
See the create.sql file in the project for the most recent.