Creating html form definitions for a frontend inside postgresql?? - Mailing list pgsql-general

From Janning Vygen
Subject Creating html form definitions for a frontend inside postgresql??
Date
Msg-id 0110091822100W.30615@janning
Whole thread Raw
List pgsql-general
Hi,

still new to databaseprogramming lots of application design questions
bother me.

If i have a database and want to create a webfrontend for it to do
the most common tasks. Should i define the html form definitions
inside a postgresql table??

im thinking like this:

create table person (
  id     serial,
  name   text,
  state  state_id integer not null references state(id)
);

create table state (
  id       serial,
  name     text
);

insert into state (name) values ('Bayern');
insert into state (name) values ('Berlin');
insert into state (name) values ('Hessen');
...

Now i want a html form whith one input type=text field and one select
field for the state.

If i want to create a html form i have to know that the state has to
be a select field and which table i have to query for the options. Ok
i could guess it by asking system tables and if i found a reference
to another table i can ask this table for the option values, but i
still dont know which colomn to use, if the state table has another
column with something like 'shortname'.

I just want to do only layout and design inside my php or perl based
frontend. but i dont want to put in knowledge about the database.
Maybe It could be defined so common that the information could be
used for GUI frontends as well

How are you folks outhere doing it?

Janning



pgsql-general by date:

Previous
From: "Steve Brett"
Date:
Subject: Re: triggers
Next
From: "news.optonline.net"
Date:
Subject: Re: How to make a REALLY FAST db server?