Hi,
I found DbVisualizer at www.minq.se to be a fantastic and free tool.
Here is a problem I encountered. Consider a db with these three tables:
CREATE TABLE alternatives( alt_id serial,
PRIMARY KEY(alt_id));
CREATE TABLE ver2( ver_id serial,
PRIMARY KEY(ver_id));
CREATE TABLE ver_alt( alt_id int,
ver_id int,
FOREIGN KEY(ver_id) REFERENCES ver2(ver_id),
FOREIGN KEY(alt_id) REFERENCES alternatives(alt_id));
The references display in DbVis shows correctly 2 arrows pointing to
ver_alt from the two source tables.
Now create a new db with the same 3 tables and add a fourth table:
CREATE TABLE ver3( alt_id int,
FOREIGN KEY(alt_id) REFERENCES alternatives(alt_id));
Now the references displays shows correctly one arrow from alternatives
to ver3 but only one arrow to ver_alt which happens to originate from ver2.
What happened to the alternatives->ver_alt reference ? Could this be a
db design error, a db error, a jdbc error or a DbVisualizer error ? I
cannot find exception to the above schema a but I am not an experienced
db architect.
The db has the keys correctly stored as checked by using psql locally. I
use postgresql7.3.1 on redhat 7.3 with the postgresql jdbc driver.
Thanks for any insight,
Andreas