preparing database scheme