0

I am trying to understand PostgreSQL's FDW and an ODBC driver.

From my understanding, the FDW just makes other data sources look like Postgres tables, essentially a bridge between PostgreSQL and the external data source. So, you would write your own FDW to create the foreign tables and point the foreign table to the external data source(database).

Thus, if you had a NoSQL DB that didn't have a table schema than you would have to use the FDW to flatten the data to a tabular format?

How is this different than what an ODBC driver is doing?

Yolo49
  • 489
  • 2
  • 7
  • 14
  • Maybe I'm missing something, but the two are totally different.. I'm not even sure how to answer the question how they are different. With the exception that they both connect to databases, I'm not sure how they are the same. – Hambone Jan 09 '16 at 02:41
  • My understanding is that they both are used to flatten data into a tabular format(for NoSQL) and than submit the SQL queries to the tool you are using. – Yolo49 Jan 09 '16 at 14:43
  • Okay, maybe this proves I don't know what NoSQL is, then. I think of Oracle, for example. There is an Oracle FDW for PostgreSQL, and it allows you to read oracle tables and views as though they were natively in Postgres. You can join them to other Postgres tables in a single query, etc. ODBC driver for Oracle, by contrast is just an abstraction layer for Oracle access for any application and it does not let you merge native and non-native data. MS Access can do that, and it does use ODBC, but it's not ODBC managing that. ODBC is just a way for a single application to talk to multiple DBs – Hambone Jan 09 '16 at 16:30
  • Thanks, that makes sense. Is there a reason that ODBC drivers don't perform as well as a native connector? – Yolo49 Jan 09 '16 at 23:22
  • In most cases, you can hardly tell the difference. But since ODBC represents one additional layer between the client and the database, it can never be *quite* as good. It's kind of like the difference between speaking Spanish versus having a translator. – Hambone Jan 10 '16 at 00:10

0 Answers0