building db written

Change-Id: I10bb7e1e5d10c0caffb2933314c7cd46a3014b33