I have .mdf / .sdf files created in SQL Server. I want to convert them to MongoDB. How can I do this?
closed as too broad by Mark Storey-Smith, Paul White♦, RolandoMySQLDBA, ypercubeᵀᴹ, marc_s Jan 14 '14 at 18:10
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
You could also make use of the OOP paradigm; you could then write a simple program, that will basically do the following.
- create Classes for each of your SQL Server relations
- create your MongoDB structure acording to those models
- load the data into objects
- 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.