Generates a subset of a relational database that respects foreign key constraints