SQL Metadata Queries: Key Concepts and Best Practices