Database sync with GUI