Tag: Database Systems

  • Analysing Retail Data at Scale and Data Ethics Using SQL in DuckDB

    In CSC2230 Big Data Management and Analytics, I analysed the Instacart Online Grocery Shopping Dataset using SQL in DuckDB 1.5.4—working across 3,421,083 orders from 206,209 customers and 33,819,106 product-level purchase records.

    Uncovering Operational Patterns with SQL

    Linking orders, products, aisles, and departments through relational SQL queries showed how structured aggregation turns millions of raw rows into practical operational insight. Fresh produce dominated demand, with the produce department accounting for 29.24% of all item purchases and Banana leading as the most purchased product. Time-based analysis revealed clear ordering peaks on Day 0 and Day 1 and between 10:00 and 16:59 (57.39% of orders), helping inform inventory safety stock and workforce scheduling.

    Data Ethics Beyond De-Identification

    One of the most important reflections from this project involved data privacy. Although the dataset replaced customer names with numeric identifiers, detailed multi-order histories over time still represent sensitive behavioural data. Working through the ethical implications reinforced why analytics workflows must still enforce access controls, encryption, data minimisation, retention limits, and aggregated reporting.

    Connecting Analytics to Career Goals

    Handling multi-million-row datasets in DuckDB sharpened my SQL precision and taught me to pair technical analysis with clear executive summaries and privacy-aware engineering.

  • Database Foundations in Practice: Relational Algebra and Three-Tier Architecture

    Working through CSC2460 Database Systems Problem Solving 1 strengthened my understanding of how databases process queries under the hood and why system architecture matters for security and maintainability.

    Why Operation Order and Domains Matter

    Studying Relational Algebra highlighted the difference between procedural query steps and declarative requests. Because each operation—such as selection or projection—outputs an intermediate relation for the next step, reversing the order can drop required attributes and break the query completely. Defining strict attribute domains in full schema syntax (such as enforcing fixed course-code patterns, positive integers, and maximum field lengths) reinforced how clear rules at the schema level prevent invalid data from entering the system.

    Two-Tier vs. Three-Tier Architecture

    Comparing two-tier and three-tier designs showed how separation of concerns improves real software applications. In a two-tier setup, the client mixes interface display, business rules, and direct database access, creating heavier clients and higher security exposure. Splitting presentation, application logic, and database storage across three tiers allows thin browser clients, centralised rule updates, independent scaling, and an application layer that validates every request before it touches stored data.

    Takeaway for Software Development

    Seeing how relational theory connects directly to application security and clean architecture changed how I think about backend design—good database engineering is as much about structure, constraints, and clear boundaries as it is about writing queries.