Migrate data from oracle to MongoDB

Hi guys, I want to extract data from oracle database and transfer it into MongoDB and i wish to use some programming language rather than an ETL tool. So can anyone suggest me some programming language(like Python) to do this and the process of how to do it?

Requirements:

Initially i have to transfer all data from oracle and after that on a timely basis i have to transfer newly inserted rows in MongoDB.

Appreciate any king of help.

I’ve had a quick look at what is required to move between Oracle and MongoDB (Blazing Saddles anyone?) and doing it manually by writing a script or program looks to be a wee bit painful.

There’s always Toad for Cloud Databases perhaps? A thread here www.toadworld.com/…/5780 has details.

There’s a 30 day free trial of another application named MongoDBPumper which might be helpful.

download.cnet.com/…/3000-2065_4-75892943.html

Then there’s this which looks excellent - planet.jboss.org/…/planning_to_migrate_your_relational_database_to_mongodb

HTH

Cheers,

Norm. [TeamT]

I know writing a program or a script is a tedious task but can you explain me how to go with it because i want to learn it. And thanks for the help. I will refer to the links and learn about it

I don’t use MongoDB, so I have no idea how you would create a collection (I think that’s the name for a table look-alike) - sorry.

You would need to consider the following, I suspect, but bear the above in mind - I have no idea what I’m on about!

  • Oracle tables convert to MongoDb Collections. (I think it’s collections)

  • Referential integrity - does MongoDB have any? How is it set up?

  • Check constriants - as above.

  • Unique constraints - again, as above.

  • What about Pl/SQL procedures, functions and packages/ How on earth do they get converted?

  • What about schemas? Does MongoDB have those?

  • Can we do JOINs in Mongo?

  • Indexes?

  • Sequences?

  • What about user defined TYPEs in Oracle? Do they convert?

  • Etc etc etc.

There appears to be a MongoDB PHP API and it is described over at secure.php.net/…/class.mongodb.php - I’ve had a quick look, it might be useful.

There’s a PDF that appears to describe the migration process at s3.amazonaws.com/…/RDBMStoMongoDBMigration.pdf which might also be helpful.

Also, the MongoDB people have this available too - docs.mongodb.org/…/ which again, might be useful.

As far as the conversion goes, I’d say that once you have documented the answers to the above queries of mine, and any others of your own, you should be in a position to show how, for example, an Oracle Table maps onto a MongoDB Collection and how to define a row in that table as a MongoDB Document.

You can then begin to determine which API you would want to use, be it Perl, PHP, C, C++, or PL/SQL (probably best) to read the data from the Oracle Table and write a “script” that can be executed against the MongoDB installation to create the data you require to migrate.

“Candygram for Mongo”: www.youtube.com/watch :slight_smile:

HTH

Cheers,

Norm. [TeamT]

Thanks a lot for all your help.

Welcome. Good luck.

Cheers,

Norm. [TeamT ]

Just in case anyone is interested in Mongodb , there’s an Eclipse Toad extension for this very “database”. Read these for details:

www.toadworld.com/…/blog-part-1-of-2-java-eclipse-mongodb-toad-ruby-rails-mongoid-get-them-all-working-together-with-toad

www.toadworld.com/…/blog-part-2-of-2-ruby-rails-mongoid-and-toad-mongodb-support

Cheers,

Norm [ TeamT ]