.

DB マネージャプラグイン

DB マネージャプラグインは QGIS の公式コアプラグインの1つでSPITプラグインの置き換えとして、また QGIS がサポートするすべてのデータベース形式を統合した1つのインターフェースであつかうものとして作成されました. icon_dbmanager DB Manager プラグインは多くの機能を提供しています. QGIS ブラウザからレイヤをDBマネージャにドラッグするとそのレイヤは空間データベースにインポートされます. 空間データベース間でテーブルをドラッグアンドドロップすることができそれらは相手のデータベースにインポートされます. また DB マネージャを使って空間データベースに対して SQL クエリを実行しその結果を QGIS のクエリレイヤとして追加することで検索結果を空間的に見ることができます.

Figure DB Manager 1:

../../../_images/db_manager.png

DB マネージャダイアログ nix

The Database menu allows you to connect to an existing database, to start the SQL window and to exit the DB Manager Plugin. Once you are connected to an existing database, the menus Schema and Table additionally appear.

The Schema menu includes tools to create and delete (empty) schemas and, if topology is available (e.g., PostGIS 2), to start a TopoViewer.

The Table menu allows you to create and edit tables and to delete tables and views. It is also possible to empty tables and to move tables from one schema to another. As further functionality, you can perform a VACUUM and then an ANALYZE for each selected table. Plain VACUUM simply reclaims space and makes it available for reuse. ANALYZE updates statistics to determine the most efficient way to execute a query. Finally, you can import layers/files, if they are loaded in QGIS or exist in the file system. And you can export database tables to shape with the Export File feature.

The Tree window lists all existing databases supported by QGIS. With a double-click, you can connect to the database. With the right mouse button, you can rename and delete existing schemas and tables. Tables can also be added to the QGIS canvas with the context menu.

データベースに接続されている場合DBマネージャの メイン ウィンドウでは3個のタブが提供されます. Info タブではテーブルとそのジオメトリの情報が既存フィールドや制約やインデックス情報と同じように提供されます. また選択テーブルに対して作業が行われていない場合ヴァキューム解析や空間インデックスの作成を行うことができます. Table タブではすべての属性を表示し Preview タブではジオメトリのプレビューを描画します.