MonetDB schema for Yii 1.1 (PHP framework)?
Hi, I am working on a mini project and using the Yii 1.1 PHP framework (OOP framework, using MVC) and trying to connect to a MonetDB database (changing from MySQL). I see that there is a MonetDB PHP client (https://dev.monetdb.org/hg/MonetDB/file/tip/clients/php/lib/php_monetdb.php). I believe it is MAPI based, but I don't know if that can be used in Yii by creating a wrapper or so. Yii has special classes to retrieve metadata information from database (the http://www.yiiframework.com/doc/api/1.1/CDbSchema) and it also has subclasses for several databases supported in Yii "out of the box" (cubrid, mssql, mysql, oci, pgsql and sqlite). It uses the CActiveDataProvider class which is based on ActiveRecord (http://www.yiiframework.com/doc/api/1.1/CActiveDataProvider), and has methods to retrieve the data from database along with different criteria. Knowing MonetDB also has an ODBC driver, I installed unixodbc along with the PHP PDO driver for ODBC, the MonetDB ODBC driver, and have done all the needed set up to make ODBC work. By the way, my test server is an Ubuntu VM. Now that I have the ODBC working, I am able to connect to the database, and when using SQL statements (building the sql query, command, datareader, etc) everything works in Yii, and I can retrieve the needed data, but when I want to use the widgets and make use of the framework and MVC, I start getting errors and I believe it's all because of not having the right schema class. I tried "forcing" the driver name and tested all the existing schemas (the ones I specified above, that come with Yii) but to no avail. I'm not a database expert or an advanced PHP (and Yii) developer but have some development experience and was able to work on this project and build a nice web application with MySQL but now that I'm planning to change the DB and use MonetDB, I believe I need expert advice and some help from real experts, and I'm hoping someone on this list will be able to shed some light. I couldn't find much on the Internet. Thank you. Regards, Kevork Vartanian Technical Solutions Consultant kevork.vartanian@innotta.com.au | +61 406 776 789 | www.innotta.com.au
Dear Kevork, it might be helpful if you could share which version/release of MonetDB you are using. Also, it might be very helpful if you could shared whether you get Yii or MonetDB errors. In the former case, you'd probably need to consult Yii experts for help. In the latter case, it would be great if you could share the exact error messages you get. Best, Stefan ----- On Mar 24, 2016, at 1:44 AM, Kevork Vartanian kevork.vartanian@innotta.com.au wrote:
Hi,
I am working on a mini project and using the Yii 1.1 PHP framework (OOP framework, using MVC) and trying to connect to a MonetDB database (changing from MySQL).
I see that there is a MonetDB PHP client ( https://dev.monetdb.org/hg/MonetDB/file/tip/clients/php/lib/php_monetdb.php ). I believe it is MAPI based, but I don’t know if that can be used in Yii by creating a wrapper or so.
Yii has special classes to retrieve metadata information from database (the http://www.yiiframework.com/doc/api/1.1/CDbSchema ) and it also has subclasses for several databases supported in Yii “out of the box” (cubrid, mssql, mysql, oci, pgsql and sqlite). It uses the CActiveDataProvider class which is based on ActiveRecord ( http://www.yiiframework.com/doc/api/1.1/CActiveDataProvider ), and has methods to retrieve the data from database along with different criteria.
Knowing MonetDB also has an ODBC driver, I installed unixodbc along with the PHP PDO driver for ODBC, the MonetDB ODBC driver, and have done all the needed set up to make ODBC work. By the way, my test server is an Ubuntu VM.
Now that I have the ODBC working, I am able to connect to the database, and when using SQL statements (building the sql query, command, datareader, etc) everything works in Yii, and I can retrieve the needed data, but when I want to use the widgets and make use of the framework and MVC, I start getting errors and I believe it’s all because of not having the right schema class. I tried “forcing” the driver name and tested all the existing schemas (the ones I specified above, that come with Yii) but to no avail.
I’m not a database expert or an advanced PHP (and Yii) developer but have some development experience and was able to work on this project and build a nice web application with MySQL but now that I’m planning to change the DB and use MonetDB, I believe I need expert advice and some help from real experts, and I’m hoping someone on this list will be able to shed some light. I couldn’t find much on the Internet.
Thank you.
Regards,
Kevork Vartanian
Technical Solutions Consultant
kevork.vartanian@innotta.com.au | +61 406 776 789 | www.innotta.com.au
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
-- | Stefan.Manegold@CWI.nl | DB Architectures (DA) | | www.CWI.nl/~manegold/ | Science Park 123 (L321) | | +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) |
participants (2)
-
Kevork Vartanian
-
Stefan Manegold