Research Article

Automatic NoSQL to Relational Database Transformation with Dynamic Schema Mapping

Algorithm 1

Schema Analyzer strategy.
Input: MongoDB collection (collection)
Output: Schema of collection in JSON format (schema)
foreach record r Є collection do
foreach column_name c Є r do
  schemaschemac
  if isDocument(r[“c”]) then
   parseDocument(r[“c”])
  else if isArray(r[“c”]) then
   parseArray(r[“c”])
 end
end