Welcome Guest, Not a member yet? Register   Sign In
MongoDB
#1

Hello,
I want to start new application with MongoDB.
Now How can I use MongoDB as main Database Driver?
Please explain thanks.
Reply
#2

Have you used MongoDB for something before?
Reply
#3

What do you mean by "use MongoDB as main Database Driver"?

CodeIgniter does not support MongoDB.
See https://www.codeigniter.com/user_guide/g...ments.html
Reply
#4

Yes,I use MongoDB.
I want to make simple script with it.
Reply
#5

There are no built-in database libraries for working with MongoDB, so you'll need to roll your own library to make interacting with it a bit easier, or Google for some pre-made solutions. I have used a library by Alex Bilbie in the past, but it seems that he has deleted the repo, which I guess makes sense as he hasn't used CI in a couple of years from what I can tell.

Here are a couple of quick links in case your Google-fu is working:

A tutorial on using them together with a pretty simple system.
A library inspired by the Alex Bilbie one. No longer maintained, but available. Was linked from Mongo's site, actually, so it shouldn't have been too difficult for you to find...

Best bet is to find an existing one, like the second link, and be prepared to dive in and update it to make it work as needed. You'll still have many saved hours.

So
Reply
#6

@Hamed

Please see this link - http://phpgainers.com/content/how-use-mo...deigniter/
May be helpful
Reply
#7

Hello,
I make my own lib to do my project but I think it would be better to integrate MongoDB with CI.
Reply
#8

(11-17-2015, 08:39 AM)Hamed Wrote: Hello,
I make my own lib to do my project but I think it would be better to integrate MongoDB with CI.

How would this work? It's impossible to make NoSQL databases work in the same way as a SQL database. The queries have to be built differently. Things like MapReduce are powerful, but doesn't fit into the Query Builder mold. And then the question would come up - why don't we support CouchDB, or Google's BigTable, or something else. I'm honestly amazed that CI currently supports all of the databases that it does with such a tiny team.
Reply
#9

I think a stand alone library for abstraction is enough.

For example:
https://github.com/thephpleague/monga
Reply




Theme © iAndrew 2016 - Forum software by © MyBB