JDBC connection with Solarwinds Database to populate ServiceNow CMDB

I am trying to set up a JDBC connection with Solarwinds DB and ServiceNow in order to do that i need two SQL queries to get the Data and most of the attributes like model, serial number, ip, mac address etc.

Can somebody please point me the tables or the SQL queries for each of the devices configured in solarwinds for motinoring:

1. Router

2. Switch

3. SQL Database

I have successfully connected to solarwinds DB and I am able to fetch windows, linux and ESX servers. I am also getting cisco devices but very few attributes like caption and machinetype. By using machine type i am unable to determine whether it is a router or a switch.

Any help with the table names or the DB queries is much appreciated.

Thanks in advance.