Posts

Showing posts from September, 2025

Learning Journal: Week 2- CST363

This week, we moved into advanced SQL, focusing on sophisticated ways to join and query data. I learned about different join syntaxes ( NATURAL JOIN , USING ), the power of LEFT JOIN for creating summaries that include zero-count groups, and set operations like UNION . The lessons on self-joins and WITH RECURSIVE for querying hierarchical data were particularly insightful. A key takeaway was the strategy of breaking down complex problems into smaller, incremental SQL steps to build a final solution. Prompt Answer Non-Key Join Example A common scenario for a non-key join is assigning employees to salary grades based on a range. English Sentence: "For each employee, find their salary grade by matching their salary to the grade's minimum and maximum salary range." SQL Query: SELECT e.employee_name, e.salary, sg.grade_level FROM Employees AS e  JOIN SalaryGrades AS sg ON e.salary BETWEEN sg.min_salary AND sg.max_salary; My Thoughts on SQL SQL is a powerful and decla...

Learning Journal Week 1- CST363

 Relational databases and spreadsheets can look similar on the surface, but their purpose and strengths are very different. A spreadsheet works well for small and simple tasks like keeping a budget, making a class schedule, or performing quick calculations. It is flexible, but that flexibility often leads to inconsistency and errors. For instance, imagine tracking inventory in a spreadsheet: one row lists “MacBook Pro,” another lists “Mac Book Pro,” and a third says “Apple Laptop.” All three entries might describe the same product, yet the spreadsheet treats them as separate items. A relational database, by contrast, enforces structure and rules through primary keys, foreign keys, and data types. This ensures that each product is stored once and referenced consistently wherever it is needed. Beyond enforcing rules, databases provide features that spreadsheets cannot, such as handling multiple users editing the same data at once, providing security through role-based access, and sca...