GUI from database schema? - Mailing list pgsql-general

From Jason Hihn
Subject GUI from database schema?
Date
Msg-id NGBBLHANMLKMHPDGJGAPIENDCHAA.jhihn@paytimepayroll.com
Whole thread Raw
Responses Re: GUI from database schema?  (James Thompson <jamest@math.ksu.edu>)
List pgsql-general
Are there any tools that allow creation of GUIs from the schema itself?
For instance, lets I have a table:

create table address(
address1 varchar(32),
state char(2) references _states.abr,
zip varchar(10),
example_bool BOOL,
);

The GUI builder will create an edit box for address1 with max chars=32,
state will be a drop-down box with state abbreviations, and zip with be like
address 1, but constrained to 10 chars.

For screen positioning, a layout table can be used:

table | element | abs_position | control| ctrl_attrib | validate_func
--------------------------------------------------
address | address1 | (45,34) | NULL | NULL | val_addr_address()
address | state    | (34,65) | NULL | NULL | val_addr_state_()
address | ex_bool  | (34,32) | CHECKBOX | NULL | NULL

Note that we have a couple options for the bool. It could be a drop-down,
(with Yes/No) checkbox. Null will use the default. ctrl_attrib is a modifier
like simple-list, etc.

The positioning works well when absolute positioning is available, but not
good for html. In that advent, the system can just refer to the control in
the software as (table,element) and  the used in the place where it is to
go:

<TR><TD><?php place_control('address', 'state') ?></TD><TD>...
becomes
<TR><TD><SELECT name=address_state><OPTION VALUE='AR'>AR</OPTION>...(for
each element in referenced table.field)</SELECT></TD></TR>

And then some platform-indep (Java? or native, but for the bog three
platforms) reader does all the GUI code.

This force good design and business logic to be put in the database. Plus it
makes it real easy for me because I'm about to start a project where I need
web, native and curses layouts. Even if I need to do manual tweaking, it'd
save me a lot!

Any know of anything like this that works for Postgres?
Thanks!


pgsql-general by date:

Previous
From: Network Administrator
Date:
Subject: Re: 7.3 PDF documentation
Next
From: Lyndon Tiu
Date:
Subject: Father of Relational Databases - Dead at 79.