Using Type Transformation in Database Implementation