Page 1 of 1

Database abstraction (PDO/sqlite)

PostPosted: Sat Apr 30, 2011 1:11 pm
by jddcef
Hi,

I'm just wondering why doesn't tera-wurfl use PDO for its database access, this makes the project database agnostic and will allow one to specify a connection string for sqlite for example.

http://www.php.net/manual/en/book.pdo.php

Regards

Re: Database abstraction (PDO/sqlite)

PostPosted: Mon May 02, 2011 7:46 pm
by kamermans
I'm not opposed to PDO, but the problem has been making a CREATE TABLE definition that works across all platforms, so I would still end up having to make a PDO_SQLite, PDO_Pgsql, PDO_other_db connector. Additionally, the server-side procedure languages like T-SQL, PL/SQL and MySQL are totally different so I would need to do everything on the client site, which decreases performance.

Re: Database abstraction (PDO/sqlite)

PostPosted: Tue May 03, 2011 7:16 am
by jddcef
Couldn't you just write different implementations for each of the T-SQL, PL-SQL, and use the appropriate one depending on the actual DB being used?

Ok, I'm not an expert on PDO's implementation, but do you know of the http://www.redbeanphp.com/ project? They support MySQL, SQLite and PostgreSQL, so I'm imaging it's MSSQL that's the problem for supporting?