Modelling SQLite Database to use it with CloudKit

I am working with SQLite as the local database. I have 5 tables created in the SQLite - A profile table, measurement table, measurementTemplate table  and imageGuide table. The measurement is owned by the profile . The measurementTemplate is also owned by a measurement and a measurementTemplate has a measurement guide. A profile has an array of pages. Each page has an array of measurements.

I’m trying to avoid double references to avoid complications. What’s the best way to go about modelling these tables to connect them with CloudKit?

I am pretty new to iOS development, this is an inherited codebase and I have been stuck on this issue for 2 weeks. I really need help.

Modelling SQLite Database to use it with CloudKit
 
 
Q