Finding table realtionships programatically

How do I programatically (say, given an AciveRecord model class or
instance) find out if it has any relationships to other tables?
Preferably using the database’s native directives (but using <has_many>
and the like if not possible).

Is there a way to set table relationships at a database level using