revise db structure