Page 1 of 1

List attribute primary key , index key , foreign key

Posted: 10.04.2011, 18:57
by lavoro92
How to get List of primary key , index key and foreign key and relative property( for example the external table reference for the foiregn key) throught Zeoslib components?

Posted: 11.04.2011, 09:48
by tintinux
Hi

I think it is possible only by querying the information schema, and depends on the database and it's release.

I made something working for MySql 5, if you are interested.

Regards
Tintinux

Posted: 11.04.2011, 12:25
by lavoro92
Are there other methods that do this ?
I prefer use a class method because i want the list of primary key , foreign key , index key for mssql,mysql,postgresql,interbase,firebird,sqllite and oracle dbms .

Posted: 11.04.2011, 12:42
by tintinux
None, that I know...
You will have an hard work with all these different databases.
It would be really useful to share it.
Buon lavoro !

Posted: 19.05.2011, 20:41
by mdaems
Have a look at the TZMetadata component. And maybe the zdbc metadata interfaces may be usefull for you too.

I don't think everything you asked for is available through the TZMetadata component, but maybe on the lower level more is available.

Mark