2009-12-30 94 views
5

工作目前,我正在使用獨立的GUI工具DbSchema來設計我的數據庫架構。尋找免費的GUI工具在PostgreSQL

我喜歡它,因爲它可以

  1. 生成SQL代碼。
  2. 對我的整個數據庫模式有圖形視圖。

alt text http://sites.google.com/site/yanchengcheok/Home/PostgreSQL.png

但是,我實現了SQL代碼通過的dbschema產生不被PostgreSQL的認可。

CREATE TABLE lot (
    lot_id serial AUTO_INCREMENT NOT NULL, 
    operator_name text, 
    machine_name text, 
    timestamp timestamp, 
    CONSTRAINT pk_lot_id PRIMARY KEY(lot_id)) 

CREATE TABLE unit (
    unit_id serial AUTO_INCREMENT NOT NULL, 
    fk_lot_id serial NOT NULL, 
    CONSTRAINT pk_unit_id PRIMARY KEY(unit_id), 
    CONSTRAINT fk_lot_id FOREIGN KEY(fk_lot_id) REFERENCES lot (lot_id)) 

我得到的錯誤:

org.postgresql.util.PSQLException: ERROR: syntax error at or near "AUTO_INCREMENT" 

是否有任何替代「只是工作」免費的工具,我可以和PostgreSQL合作,由上述2個功能提供?

+0

我假設您使用的是Windows,但對於Linux,請訪問http://stackoverflow.com/questions/898255/any-good-postgresql-client-for-linux – voyager 2009-12-30 06:45:30

+0

由於這是付費產品,您應該詢問他們對此的支持。 AUTO_INCREMENT不被許多DBMS支持,至少不能被PostgreSQL,Oracle或SQL Server支持 – chburd 2009-12-30 10:57:45

回答

2

我喜歡VisualUML/DBA套件。它不是免費的,但它確實很好。它會做你所要求的,它會生成DB(用你最喜歡的DBMS)爲你創建/刪除腳本。

1
+1

你的意思是phppgadmin?沒有!我不想要基於網絡的工具。我在獨立的機器上工作。 – 2009-12-30 06:35:41

+0

但經過我有「圖佈局」功能,這裏通過他們的網站的名單,他們的非:http://www.dbschema.com/screenshots.html – 2009-12-30 06:46:22

+0

真的嗎? http://squirrel-sql.sourceforge.net/screenshots/graph.png http://druid.sourceforge.net/#Features http://www.youtube.com/watch?v=fIYtbdamzp8&feature=player_embedded http:// dba.openoffice.org/drivers/postgresql/index.html#features – voyager 2009-12-30 06:54:18