How to convert SQL Server database file to MongoDB? [closed]

Posted on

Question :

I have .mdf / .sdf files created in SQL Server. I want to convert them to MongoDB. How can I do this?

Answer :

You could also make use of the OOP paradigm; you could then write a simple program, that will basically do the following.

  1. create Classes for each of your SQL Server relations
  2. create your MongoDB structure acording to those models
  3. load the data into objects
  4. insert it into Mongo

This solution could be feasable or not, depending on your DB’s size/structure. That should do it. A straight-forward one-click solution I don’t think there’s available.

You would need to export the data from SQL Server then import the data into Mongo. There’s no way to simply take the SQL Server database files and convert them to Mongo.

Leave a Reply

Your email address will not be published. Required fields are marked *