Database schema or Help with simple SQL

Hi, I am trying to get started with some cs-cart integrations between the CMS (silverstripe) and cs-cart.

I am hoping to find a clear schema (visual ?)

I am only looking to select data, no inserts.



I am primarily concerned with Product data.



If I could emulate the select required to get the: latest X-number of Products by X-brand with a positive stock (not sure how track with options affects this), and the associated Primary Image data, and short description



… I would be ecstatic.



I have been looking at the database in phpmyadmin but its hard to get it sorted.



any amount of a jump start would be greatly appreciated.

You should probably be looking at code in core/fn.catalog.php for examples.