position and box to db fields and type definitions