Brainstorming for data structure
From ownCloud.org
The idea
- Saving all information in only one database
- Using a master table with tree structure in wich all information is bound, and used for syncing
- The data itself could /should be stored in other tables, or files, so only a link or reference to the data is stored in the master table
- We could use uuid on every element to check if there's a change and sync only the new element
- The master table is multi-user, so server should be too ( user A on Server A could sync with Server C while user B on Server A could Sync with server D)
- If syncing to a servers, it could acts as client and choose not to sync everything (usefull for mobile devices, for example a phone wich syncs addresbook, calendar, bookmarks)
- Some of the keys of the master table shoud be predefined in the cloud, like addresbook-> names, phone etc, and some of its corresponding values like birthday
Tree structure
Database:
DB | User 1 | |- Addresboock | | | |-Squellet (a definition for standart info, so every user could have it's own standart fields on addresbook, contacts etc)+ | | | | | Name -> obligatory -> type: string | | | | | mail -> type: string | | | | | phone -> type: number | | | | | birthdate -> type: date | | ------------------------------ | |-contact_1 | | | | | Name -> obligatory -> type: string | | | | | note -> obligatory -> type: string (*** note that this field is not in the squellet) | | ------------------------------------------- | |-contact_2 | | | | | Name -> obligatory -> type: string | | | | | phone -> type: number | |- Calendar | | | |-squelet | | | | | Name | | | | | type of event | | | | | start date | | | | | end date date | |- Personal_notes | | | |-squelet | | | | | note_name | | | | | note_body | | | | |- Note1 | | | | | | | note_name | | | | | | | note_body | | | | | SubNote 1 | | | | | note_name | | | | | note_body | | |- Bookmarks | |
