Welcome Guest, Not a member yet? Register   Sign In
Using MongoDB with CodeIgniter
#8

[eluser]Stilly[/eluser]
Hi Everyone,

@svatunen: with "funny name" I meant "MongoDB" not your name Wink

Can you share the experiences that make you say the existing libs are not reliable? I am highly interested in any problems you encountered. (And any solutions your might have)

@fedeisas - Don't get carried away by the speed. Thats not really the point about NoSQL. If your application deals with only a million records or so you aint gonna see any increase in speed. As Bretticus has pointed out the thing about Document oriented DB's is that they are not like table oriented "classical" Databases. The SQL DB's that we have been using for the past 30 yrs or so are two-dimensional (row x column). Many NoSQL DB's are multidimensional. Just think of a record as a multidimensional array.

A record you retrieve could look like this:

Code:
[2]=>
  array(3) {
    ["_id"]=>
    object(MongoId)#19 (0) {
    }
    ["name"]=>
    string(9) "Peter Murray"
    ["c"]=>
    array(2) {
      ["tel1"]=>
      string(6) "555123456"
      ["tel2"]=>
      string(6) "555456123"
    }
  }

This comes in handy if you have changing db structure or any kind of social network application and the typical queries that your run in such applications. Other NoSQL DBs don't allow this. They are just key:value driven, but allow you to retrieve results from billions of records in time critical enviroments.

My personal rule of thumb is:

When you know the structure of the data before hand and you are dealing only with one company or entity data - stay with SQL. Thats proven and rock solid. But if you cant predict the data structure or if the data can multiply each other into billions - it might be worth to take a look on some NoSQL solutions.

So it's not like "Replace MySQL with MongoDB and go faster" - it's way more complicated then that. DB's worth looking into are Cassandra (thats the DB behind Facebook) which allows for instance 100 million picture uploads per day (remember: Pictures get tagged, commented on etc etc) - so simply stuff no SQL DB can do. Others are CouchDB, Googles BigTable, Amazons SimpleDB and a dozen or so more.

@Bretticus: Even if it's technically not a "driver" but a library, who cares? You can go on coding (almost) the same way you did before. Sure it's gonna be bumpy here and there and stuff will work different, but given that you switched from two-dimensional to multidimensional databases it ain't gonna get any smoother then this when you think in terms of transition. Even the best driver won't give you $this->db->join() if the DB doesn't have joints. [I am no php crack, but isn't PECL an extension to PHP? The libs I mentioned use the PHP Mongo PECL http://www.php5.org/intro.mongo.php]

Personally I find the transition in term of thinking of the database architecture way more irritating and challenging then the code level.

hey, and sorry if I misread your posting (hostility) - didn't mean to offend you.

Good luck everyone

Sven


Messages In This Thread
Using MongoDB with CodeIgniter - by El Forum - 10-05-2010, 04:10 AM
Using MongoDB with CodeIgniter - by El Forum - 10-05-2010, 11:41 AM
Using MongoDB with CodeIgniter - by El Forum - 10-06-2010, 12:22 AM
Using MongoDB with CodeIgniter - by El Forum - 10-07-2010, 08:58 PM
Using MongoDB with CodeIgniter - by El Forum - 10-07-2010, 09:39 PM
Using MongoDB with CodeIgniter - by El Forum - 10-07-2010, 10:50 PM
Using MongoDB with CodeIgniter - by El Forum - 10-08-2010, 01:04 AM
Using MongoDB with CodeIgniter - by El Forum - 10-08-2010, 11:58 AM
Using MongoDB with CodeIgniter - by El Forum - 10-09-2010, 07:30 PM
Using MongoDB with CodeIgniter - by El Forum - 10-10-2010, 12:38 PM
Using MongoDB with CodeIgniter - by El Forum - 12-04-2010, 01:49 PM
Using MongoDB with CodeIgniter - by El Forum - 05-01-2012, 11:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB