Migrate multiple rows of data into single MongoDB document (nested)
<p>I want to create a utility which can help in migrating data from Relational DB(<em>Oracle</em>) to MongoDB.
Plan is :- <BR> <B>Relation DB -> CSV(<em>staging area)</em> -> BSON format </B><BR> (<em>conversion to BSON will be based on mappings provided by various use cases</em>).
<BR> Once BSON is created, Mongo DB's ‘Import’ tool will be used for loading data.</p>

<p>Need suggestions from this expert forum on following problem statement:-<br>
"Most of the relational tables are highly normalized. When I join them to create the data entity, I end up with multiple rows <em>(E.g. An employee having 3 phone numbers results in 3 rows in CSV file)</em>. I need to map/convert these three records into one document on BSON <em>(for embedded document structure)</em>."</p>

<p>Please suggest how to achieve this.</p>