[CALUG] Database question

Jason C. Miller jason.c.miller at gmail.com
Wed Feb 25 08:09:22 EST 2009


I love posting weird questions to you guys.  :)

So, we have this postgres database that we're using that belongs to a 3rd 
party.  It has a metric-ass-ton of tables. NONE of us are proficient in 
postgres at all.

Given that:
1. we're not that good with PG
2. it's a huge schema that someone else built
3. we haven't undertaken the task to understand the vast # of relations 
yet
4. there really are no guidelines regarding what we will be 
querying...just that it could be anything over time

...we'd like to be able to dynamically query useful information from it.

I had a strange thought last night.  Is there a way that anyone is aware 
of to somehow import a postgres database into some kind of 
object-relational environment that is already aware of table relations? 
This would preempt the need for complex sql queries (which I'm not in the 
mood to write) and be a much simpler representation of the system.  I'm 
wondering if perhaps there is a way to export the database's relational 
metadata (if it even has any).

The first thing that comes to mind would be to use something like 
ActiveRecord, but that requires intimate relational knowledge and the need 
to set up the relations (via models) by hand.  I am looking for the same 
end result, though.

Any ideas?

                                ~j




More information about the CALUG mailing list