Fixed database relationships