
19 Sep
2006
19 Sep
'06
12:13 p.m.
Hi, I'm trying to build a driver for monetdb for sqlalchemy (a python ORM layer). One of the things I need to do for that is provide a way to reconstruct the (some of) database schema on the fly. It seems to be easily possible to reconstruct most of the table definition from the 'table' and 'columns' tables, but how do I retrieve key contraints? Specifically, given this table definition: create table test ( id integer primairy key, name varchar(10) ) , I get some data in the keycolums table, but don't know how to relate that to the tables and colums tables. I also need something simular for foreign keys, but haven't looked into that yet. Ronald P.S. I'm using the head of the CVS trunk.