Re: PHP to create an ERD (sic) on the fly on a web page based on current DB records?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"haliphax" <haliphax@xxxxxxxxx> wrote in message 
news:952625160903130637q40fcd2a9pc662d51979d583b6@xxxxxxxxxxxxxxxxx
> On Thu, Mar 12, 2009 at 7:47 PM, scubak1w1 <skiwi@xxxxxxxxxxx> wrote:
>> Hello,
>>
>> Seeking some advice on how to create an ERD (sic) graphically on the page 
>> on
>> the fly when the page is 'called'...
>>
>> That is, I have a backend PostgreSQL database that I am getting data from
>> and putting data into via web page/s and PHP...
>>
>> I would like to be able to show graphically to the web site admins the
>> relationships between the pimary key contents of one table to all its
>> foreign keys in the daughter table in a form of a simple entity 
>> relationship
>> diagram.
>>
>> That is, a graphic showing (say) all of the PKs listed in the mother 
>> table,
>> all of the more voluminous (sic) FKs listed in another table - and
>> "connecting lines."
>>
>> This is to aid the admin users that are used to conceptualiazing this 
>> sort
>> of thing...
>
> PHPMyAdmin does exactly this sort of thing, as do a lot of SQL
> workbench programs. I'm sure there is one out there that will handle
> PostgreSQL. My advice to you is not to reinvent the wheel. If they're
> admin users, do you really need to wrap it up in a self-contained
> webpage for them, or could you just show them using an administrative
> tool that can handle ERD?

My sincere apologies, in the interest of brevity I did not explain myself 
very well... and sorry for any delay in replying...

(Note that I use MicroOLAP Database Designer for PostgreSQL for ERDs and 
phpPgAdmin as well... Good tools! <smile>)

Here are some fuller details...

I have built a web site (with back-end PostgreSQL database) to provide 
modules and then keep track of employee's web based training results; they 
will need to do different training modules based on their "place" in the 
company...

That is, I have a series of database tables in PostgreSQL that I am getting 
data from and displaying in the web browser (via PHP, SQL, etc.)

* I have groups of employees assigned to just one training group - say 
'truck drivers', 'shipping technicians', etc - a one to many

* I have a series of modules, assigned to again just one module group - say 
'Vehicles', 'Drug Testing', 'Pallet Safety', etc - again a one to many

* The site admins use the existing functionality of the web site to, say, 
indicate that:

1. employees listed in the training group 'truck drivers' need to do all of 
the modules listed under the 'vehicles' module group,

2. ditto 'shipping technicians' for 'pallet safety', and

3. all employees need to do the 'drug testing' modules



As mentioned this is all set up, both in the back end database and on the 
user interface; that is, I have already written the pages and associated 
code to populate the intermediate table that sets up these relationships - 
so these can be dragged out with SQL easily.

I ahev some "admins" (i.e., *not* DBAs) that use the tools on the web site 
to add new modules, review results, add test questions, etc, etc...

On one of the admin pages I would love to be able to show the relationship 
of the records in the training group table to that in the module group table 
GRAPHICALLY 'on the fly' to better enable the admin user to see how they are 
related.

I envisage this as a *sort of* ERD, as it were (but rather than the database 
structural elements being the entities in the relationship diagram, I would 
want to show the varied training group <---> module group relationship as 
entities on the same diagram.)

Any suggestions as to how? Some OS software out there that I can use PHP 
with?

I realise that the request is a bit esoteric, but wanted to get some input 
before I started investigating it further! :-)

Thanks in advance:

GREG...



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux