04 Data Practices - Observatorio-do-Trabalho-de-Pernambuco/documentation GitHub Wiki
4. Data Practices
How we define, document, and work with data structures, including database schemas and SQL styles.
4.1 DDLs (Data Definition Language)
Table Formalization
- Create and manage database tables, schemas, constraints
Column Definitions
- Data types, naming conventions, purposes
- Keep a data dictionary or catalog
4.2 SQL Convention
Style and Formatting
- Uppercase vs lowercase keywords
- Preferred naming conventions (snake_case, etc.)
Guidelines
- Use CTEs, window functions for clarity
- Comment complex queries
Examples
- Provide simple queries that follow the style