Challenges with creating a subset for a relational database

 Creating a subset of a relational database involved selecting a subset of rows from each table while retaining the foreign to primary key constraints in each table. If you are creating a subset, the following challenges present themselves.

1. While selecting a subset of rows from a selected table, you must also get the rows of other tables that the selected table is related to.

2. A relational constraint may be on multiple columns (Composite keys). In this case when getting a subset of a table you have to also pick the rows of related tables using the multiple column constraint.

3. Some tables may have no foreign key columns but may have other tables that have foreign keys referencing the table. 

4. Cycles in the relationships. Table A has a foreign key to table B and table B has a foreign key back to table A. 

Products such as Windocks solve these types of challenges and others automatically to deliver subsets on demand.