fixed database relationship