compile and sync db