Functions to fill an empty database and create an sql string to properly add items from the cloud.