How to Query contract information

How to Query contract information

I need to query the SDP database for the Contract associated with various assets from an external application.
We are running on Microsoft SQL

I do have read-only access to the SDP database and I'm able to execute query commands, my problem is identifying the tables and fields to accomplish the task.

So far I have the following:
  query the Resources table and lookup the RESOURCENAME which gives me the RESOURCEID
  use the RESOURCEID to query the ContractDetails table and get the CONTRACTID
  
One I have the CONTRACTID, which table do I query to get the contract information?

Thank you for the help
Sal
                New to ADManager Plus?

                  New to ADSelfService Plus?