[TYPO3-english] mongodb?

Martin Aarhof martinprikaarhof at gmail.com
Fri Jun 21 12:05:30 CEST 2013


On 20-06-2013 14:23, horace grant wrote:
> On Thu, Jun 20, 2013 at 12:08 PM, Philipp Gampe <philipp.gampe at typo3.org>wrote:
>
>> Hi horace,
>>
>> horace grant wrote:
>>
>>> i know it's more a theoretical question... i am just curious
>>
>> Two things come to mind:
>> a) Does it support auto-increment like mysql (pretty much any PHP up makes
>> use of this)?
>>
>
>
> yes, i think so. tough i am not sure i understand why you would need this
> besides mongodb's default primary key _id field (which is quite cool since
> the hash also contains the creation date).
>
>
>
>> b) How many hoster support this?
>>
>
>
> yes, that's the problem. with cheap shared hosting you always are pretty
> much limited to php+mysql. that's a pity because there are so many other
> nice technologies i would like to work with like django, meteor,...
>
>
>
>> c) How to you expect the compat layer to works such that it also works in
>> mysql, oracle, etc?
>>

With real Doctrine models/documents then it could be done.
But it will lose all backward compat.


>
>
> don't know. :)
>
>
>
>> d) Does doctrine support this?
>>
>
>
> yes, doctrine seems to have support for mongodb.


If TYPO3 7.0 only will use Doctrine DBAL then MongoDB is a no go.
DBAL does not support MongoDB.

If TYPO3 7.0 will use the whole Doctrine ODM and ORM then MongoDB could 
be used with a special mongo session handler.

My-/Postgre-/MS-/etc SQL and Mongo/CouchDB/etc are two very different 
approaches to "databases".

What I would much more like is something like
RedBean http://redbeanphp.com/

This can connect to all SQL databases (PDO), but you dont need to 
create/update tables.

$book = R::dispense('book');
$book->title = 'Gifted Programmers';
R::store($book);

Boom, now our table book have a title row.

$book = R::dispense('book');
$book->title = 'New book';
$book->created = new DateTime();
R::store($book);

Boom, now our table book have a created row (with the correct datetime 
field, and not those ugly int fields)


More information about the TYPO3-english mailing list