Relational Foundations for Functorial Data Migration