Can someone point me towards a source for schema definition for the Intergy database? It's a Medical Practice Management database by a company named Vitera (Intergy used to be owned by Sage). The database engine is Progress. Basically, what I'm looking for is the table names, the associated columns, and the Primary/Foreign Keys. I've gone to Vitera, and have been told that this info is proprietary. I've built a simple web app that peeks at the Progress catalog tables, and this has gotten me part of the way. But, it would be nice to get a little more detail. Thanks.
If you can get to the catalog tables you've got what you need. You probably just need a little understanding of the relationships between _file, _field and _index to complete the picture.
_file = table
_field = column
As Tim points out there are no explicit foreign keys and so forth.
Fields are related to tables by a common "recid". I'm not a SQL guy and won't pretend to be one but the 4GL version of the query relating them is:
for each _file no-lock where _tbl-type = "t":
display _file-name.
for each _field no-lock where _field._file-recid = recid( _file ):
display _field-name.
end.
for each _index no-lock where _index._file-recid = recid( _file ):
display _index-name.
for each _index-field no-lock where _index-field._index-recid = recid( _index ):
find _field no-lock where recid( _field ) = _index-field._field-recid.
display _field-name.
end.
end.
end.
It should be fairly obvious how to convert that to SQL.