Database wrapper template library