2009-12-30 99 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