TideSDK - postgreSQL? - postgresql

is there a way to connect to a postgreSQL Database? I've noticed that the PHP module doesn't have the postgres extensions and its not possible to load it dynamically.
Is there any other way? An external PHP scripts will be the worst solution.
Alex

I don't have direct experience with Tide, but reviewing their docs here are the places I would look:
Javascript-> PostgreSQL Is there a possibility of connecting postgreSQL directly to Javascript?
Python -> PostgreSQL, like psychopg.
If that fails, along with other similar languages, MAY be able to find another driver written fully in a language like this.
The PostgreSQL protocol is extensively documented and several implementations exist for it. You could probably adapt either the Javascript driver or implement in another language to give you a direct driver to PostgreSQL http://www.postgresql.org/docs/9.1/static/protocol-flow.html

Related

Connect SAS to mongodb without using ODBC

One of ours statistician is stuck trying to read data from mongoDB using SAS.
In my experience connecting mongo to other languages always require a native driver, but in this case I've found that is only possible using ODBC.
I've tried to find a better way to connect this two software but the only idea that came to my mind is to expose mongo via webservice.
Any of you have a better solution to connect SAS to mongodb?
After some tries we found that using webservice is the most convenient way to solve mongodb access in ours case.
Some statistician required to load data on laptop from outside the corporate network so we decided to extend our web service to expose some more informations and access it in SAS like this https://blogs.sas.com/content/sasdummy/2016/12/02/json-libname-engine-sas/
Thanks all for the clarification regarding ODBC, to me was a real surprise that is still the preferred way to load data in enterprise environments.

Consider using PDO instead [duplicate]

I have designed a website before 5 years using PHP MySQL and still works fine without any issues. I heard MySQL is officially deprecated as of PHP 5.5 and has been removed as of PHP 7. Also, PHP offers three different APIs to connect to MySQL (like MySQL, MySQLi, and PDO). My web server is updated frequently.
I understood, I have to move to newer API like MySQLi or PDO for safety. Now I am confused whether to choose MySQLi or PDO. Also, Is there any compatibility/migrating options available for such case?
Lets take a look at both of these extensions.
PDO
PDO is database neutral - You only need to learn one API to work with dozens of databases
So if you decide to move to another database, the only thing you would be changing is the DSN(data source name).
Support of both name and '?' placeholders for prepared statements.
Drupal uses PDO.
Mysqli
On the other hand Mysqli is designed specifically for Mysql databases and is recommended by Mysql. Mysqli works with Mysql and MariaDB databases.
Support of only '?' placeholders for prepared statements.
Joomla uses Mysqli
Conclusion
There are many conflicting arguments weather Mysqli or PDO runs faster. Both Mysqli and PDO use the same underlying drivers to access the database making the performance not worth comparing.
So there is no clear winner when working with Mysqli or PDO. But let's say you use Mysqli and then later you want to use another database, it would be a difficult transition.
The main strength of PDO over Mysqli is name placeholders for prepared statements and which is why I chose PDO over Mysqli.
The answer is fairly simple.
If, like majority of PHP users, you are going to use database API functions right in the application code, without any intermediate wrapper, then PDO is your only choice, as it's a sort of wrapper already, automating many operations that with mysqli have to be done manually.
No, there are no migration options, because the very approach is changed dramatically: instead of placing variables right in the query, they have to be substituted in the query with special marks. There is no way to automate this process.
PDO and MySQli both are used for database connection and both have their own advantage. In closer look PDO wins the battle but if you really stick with only one database provider then my personal best choice is use MySQLi.
You will also extract some good points from: http://code.tutsplus.com/tutorials/pdo-vs-mysqli-which-should-you-use--net-24059

Load a PostgreSQL database using cloudconnect

On the side of my Gooddata project, I maintain a small PostgreSQL database that contains a few tables.
I would like to be able to integrate both my ETL processes using the same tool, and it seems to me cloudconnect would be the easiest way, since I already have my whole GoodData ETL in it.
Here are the ways I tried to do it without success:
I tried to have a look in the documentation, and it seems to me that all the functionalities of CloverETL that enabled this (DBOutput, PostGreSQLDataWriter) are not available in Cloudconnect.
I managed to connect to the Agile Datawarehouse Service (Database attached to GoodData), but it seems that only the ADS database is able to understand the request:
COPY MyDataBaseTable (field1,field2) FROM LOCAL '${DATA_TMP_DIR}/CIforADS.csv'
even when I adapt the syntax to PostgreSQL because the dynamic addressing I use here does not seem to work.
Is there any way to proceed that I'm missing? Can anyone think of a workaround?
In general this could be achieved by using of "DBExecute" component, but
I'm not sure if I understand it well - do you want to load data into your own Postgres instance using CloudConnect?

How to write from Xpages to PostgreSql database?

I have to create an Xpage web application which directly inputs data in a PostgreSql database. I've never worked with a PostgreSql database so I have absolutely no idea on how to approach this.
The application will be used through a browser if that matters.
Any help would be highly appreciated.
or, if you do not want to use the extLib for this purpose only, take a look at http://www.eknori.de/2011-07-03/using-mysql-data-in-xpages/ The article describes, how to access MySQL, but you can use the same code even for PstGreSQL with the correct JDBC drive.
The article also contains a link to OpenNTF where you can download the full source code.
You need to use a JDBC connection to connect to PostgreSQL. Use the extension library. This library contains a demo application which connects to a sql database using JDBC. Please take a look at this question : How do I access SQL from XPages.

Connecting to a MySQL database using Xcode and Objective-C

I have been interested in working with a MySQL database in my iPhone or Mac projects. How is a connection performed in Objective-C?
I only had a bit of experience with PHP, but heck, that is a bit too different =/
Check this tutorial for connectivity with SQLite.
You will not be able to connect to MySQL directly from the iPhone. You must use some intermediate layer such as a Web application with PHP.
So, you will have something like this:
iPhone POSTING a request to the WebServer using HTTP
Web Server connecting to the MySQL database
Web Server returning data to the iPhone (XML, plain text)
iPhone processing the data
You can use this technique to query and insert/update/delete data.
Once I found this library for MySQL, and I am aware how it works.
It's a much better option not to deal directly with MySQL, but use Apple's Core Data API.
It allows you to manage an relational database without having to write SQL. It's very fast, very useful. Good stuff.
Try absrd which recycles connections across concurrent threads (queues).
If you want to connect to a MySQL database, use MySQL's Connector/C API library which, as Objective-C is a strict superset of C, you can use without any issues. I helped someone with the installation of it here.