PostgreSQL数据库取外部数据的扩展功能

PostgreSQL的Foreign Data Wrappers允许连接到各种外部数据源,包括SQL数据库(Oracle, MySQL, ODBC)、NoSQL数据库(CouchDB, Redis)、文件(CSV, fixed-length)以及Twitter等。该功能扩展了数据库的访问能力,减少了跨数据库操作的编码需求。使用FDW需要注意部分扩展可能处于Beta阶段,谨慎使用。" 121396031,11630711,Django云笔记项目:用户注册实现,"['Django', '后端开发', 'Python', 'Web开发']

Foreign Data Wrappers是PostgreSQL取得外部数据比较方便的功能扩展。

可以取得关系数据库的数据,比如Oracle,MySQL,ODBC.

还可以取得NOSQL数据库的数据。比如CouchDBRedis

还可以直接访问text文本文件,csv文件。

还可以访问twitter的数据。等等。


可以说利用好这些功能后,我们就会减少很多关联数据的编码。

具体信息参考了wiki。

Foreign Data Wrappers

In 2003, a new extension called SQL/MED ("SQL Management of External Data") was added to the SQL standard. It is a standardized way of handling access to remote objects in SQL databases. In 2011, PostgreSQL 9.1 was released with a great support of this standard.

In a nutshell, you can now use various Foreign Data Wrappers (FDW) to connect a PostgreSQL Server to remote data stores. This page is an incomplete list of the Wrappers available right now. Another fdw list can be found at the PGXN website.

Please keep in mind that most of these wrappers are not officially supported by the PostgreSQL Global Development Group (PGDG) and that some of these projects are still in Beta version. Use carefully!


SQL Databases Wrappers

oracle_fdw

mysql_fdw

This extension implements a Foreign Data Wrapper for MySQL. It is supported on PostgreSQL 9.1 and above.

tds_fdw

A wrapper for accessing Sybase and Microsoft SQL Server databases.

odbc_fdw

A wrapper for databases with an ODBC driver, including Oracle, DB2, Microsoft SQL Server, Sybase, Pervasive SQL, IBM Lotus Domino, MySQL, PostgreSQL and desktop database products such as FileMaker and Microsoft Access:

NoSQL Databases Wrappers

couchdb_fdw

A wrapper for CouchDB

redis_fdw

A wrapper for Redis


File Wrappers

file_fdw

A CSV files wrapper. Delivered as an official extension of PostgreSQL 9.1

file_text_array_fdw

Another CSV wrapper

file_fixed_length_record_fdw

Fixed-width flat file wrapper

Others

twitter_fdw

A wrapper fetching text messages from Twitter over the Internet and returning a table

ldap_fdw

Allows PostgreSQL to query an LDAP server and retrieve data from some pre-configured Organizational Unit

PGStrom

uses GPU devices to accelarate sequential scan on massive amount of records with complex qualifiers.

s3_fdw

Reads files located in Amazon S3

www_fdw

Allows to query different web services:

Multicorn Foreign Data Wrappers

Multicorn is an extension that allows FDWs to be written in Python

SQL Database Wrappers

multicorn.sqlalchemyfdw

This fdw can be used to access data stored in any database supported by the sqlalchemy python toolkit.

File Wrappers

muticorn.fsfdw

This fdw can be used to access data stored in various files, in a filesystem. The files are looked up based on a pattern, and parts of the file's path are mapped to various columns, as well as the file's content itself.

multicorn.csvfdw

This fdw can be used to access data stored in CSV files. Each column defined in the table will be mapped, in order, against columns in the CSV file.

Others

multicorn.rssfdw

This fdw can be used to access items from an rss feed.



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值