Build the datebase