There's an object for that
When writing custom code for your SOLIDWORKS Enterprise PDM system, have you been tempted to connect directly to the Enterprise database tables? You certainly could. The database isn’t encrypted and when you first start out it is easy to get the information you need with a simple SQL query.
Don’t. There’s an object for that. Everything you need from the database: BOMs, history, users, variables, searches, … has an associated object in the API.
It may take a little while to learn these new objects, but your code will be more robust and since you never know when SOLIDWORKS may change the database schema, your code will be much more “upward” compatible in the future.
Check out the EdmUtility constants list in the API help file to give you a taste of some of the objects available to satisfy your little SQL writin’ heart.