Like all CMS solutions, Episerver stores your website's data within a database and provides a brilliant collection of API's to allow developers to access that data. When we build a website, developers should never directly call the CMS database for numerous reason, scaling, upgrade-ability, performance, security to name a few. When building a website or trying to debug a live server, it can sometimes to be useful to directly query the database to find out key bits of information about the state of the platform. In today's guide, I'm going to cover some useful SQL scripts I've used throughout the years. One script I frequently use is a script that lists out all the tables in a database and all their properties: [sql] select sysobjects.Name, syscolumns.Name from sysobjects inner join syscolumns on sysobjects.id = syscolumns.id where sysobjects.xtype = 'U' order by sysobjects.Name, syscolumns.colorder [/sql] I only need to look in the database once in a blue moon and that's usually when something's gone wrong. I can work months at a time without needing to look into SQL so memorising the Episerver database structure seems a waste of brain cells. Instead, I usually run the above script on the CMS, or commerce database to help me quickly narrow down the tables I need to look into.