Re: [PDO] PDO Cassandra
[email protected] (Pablo Sánchez) Thu, 25 Feb 2010 17:07:49 -0300
| Newsgroups | php.pdo |
|---|---|
| Message-ID | <[email protected]> |
2010/2/25 Christopher Jones <[email protected]>: >> Yep, I know. But it's a Database. As far as I know (please, I have >> just get in this list, so forgive me if I say something too stupid) > > The question was fine. > > I'm not sure the Cassandra model fits well with PDOs generally > portability aims, but since PDO drivers can have custom methods it > would probably be possible to implement a PDO driver for it. > > Do you have a specific reason for wanting PDO? Yep, keep using the abstraction layer for data retrieval. From the manual: "PDO provides a data-access abstraction layer, which means that, regardless of which database you're using, you use the same functions to issue queries and fetch data. PDO does not provide a database abstraction; it doesn't rewrite SQL or emulate missing features. You should use a full-blown abstraction layer if you need that facility.' What I want to show is this part specifically "PDO does not provide a database abstraction; it doesn't rewrite SQL or emulate missing features. You should use a full-blown abstraction layer if you need that facility". Maybe in this case, the Cassandra driver (not PDO) would need to do this work of rewriting to something it could understand, so you wouldn't need to rewrite all queries or something. The big issue here would be how to at least start thinking on how to make the Cassandra driver work with query and exec methods. Off course queries would not be compatible. Actually I'm still investigating how Cassandra works, to start understanding if and how it would fit the PDO approuch. As far as I could see, it can return multidimensional data, meaning a rewrite of the PDOStatement, since the current result set does not support multidimensional data (if it does, than I missed it from the manual). See, queries are queries, even if not structured, but still you must query to get data. So it should'nt be too dificult if Cassandra implements something nearly similar to SQL. As far as I see, NoSQL doesn't mean "no sql", but "Not only SQL". So SQL should be there. The result set of a Cassandra Query is the bigger issue here. Check here: http://wiki.apache.org/cassandra/DataModel Mostly of the documentation avaliable about Cassandra is on it's infrastructure architecture anda data model. So far I couldn't find how queries are made. This presentation http://www.slideshare.net/stuhood/cassandra-talk-austin-jug is a good start point. Yet, there is not as much technical details as I would like to see. Problably there will never be a way to make it work. Still it would be great to have it working as PDO does... -- ================================= Pablo Santiago Sánchez Análise e Desenvolvimento de Sistemas Web Zend Certified Engineer #ZEND006757 [email protected] (61) 9975-0883 http://www.sansis.com.br http://www.corephp.com.br "Quidquid latine dictum sit, altum viditur" =================================