Our SQL specialists cover the complete range of topics taught across database modules internationally from introductory query writing through schema design and normalisation to advanced topics including query optimisation, stored procedures, and platform-specific extensions.
Core SQL Queries SELECT, INSERT, UPDATE, DELETE
Data definition and manipulation assignments cover CREATE TABLE statements with appropriate constraints (NOT NULL, UNIQUE, CHECK, DEFAULT, PRIMARY KEY, FOREIGN KEY with referential action specified), INSERT statements with explicit column lists rather than positional insertion (which breaks when the table schema changes), UPDATE statements with precise WHERE conditions to avoid unintended multi row updates, and DELETE statements with the same care for scope. SELECT queries cover column aliasing with AS, expression evaluation in the select list, string pattern matching with LIKE and wildcard characters (% for any sequence, _ for a single character), and sorting with ORDER BY with multiple columns and direction specification. Pagination using LIMIT and OFFSET (MySQL, PostgreSQL) or TOP (SQL Server) is covered where the brief requires it.
JOIN Operations All Types, All Conditions
JOIN assignments cover the full range: INNER JOIN for rows with matching values in both tables, LEFT OUTER JOIN for all rows from the left table with matched rows from the right (and NULL for unmatched), RIGHT OUTER JOIN for the reverse, and FULL OUTER JOIN for rows from both tables regardless of matches. Table aliasing is applied consistently for readability and to resolve ambiguous column references. Self joins for hierarchical data use distinct aliases for each reference to the same table with explicit join conditions relating parent to child. Cross joins for Cartesian products are handled where a brief specifically requires them. Every join query includes an explanation of why that join type was selected for that question not just the working code.
Subqueries, CTEs, and Window Functions
Subquery assignments cover placement in WHERE (for set membership tests with IN, NOT IN, EXISTS, NOT EXISTS, or scalar comparison), FROM (as derived tables with required aliases), and SELECT (as scalar subqueries). Correlated subqueries that reference the outer query are constructed correctly with unambiguous table aliases. Common Table Expressions simplify multi step queries and are written using the WITH cte_name AS (...) syntax correctly including recursive CTEs for hierarchical data where the platform supports them. Window functions (ROW_NUMBER(), RANK(), DENSE_RANK(), LAG(), LEAD(), SUM() OVER, AVG() OVER) appear in advanced assignments and are covered for all platforms that support them.
Database Design and Normalisation
Database design assignments starting from a case study require working through entity identification, attribute assignment, relationship mapping, and normalisation systematically. Functional dependency analysis identifies which attributes determine which others the foundation of all normalisation decisions. 1NF removes repeating groups and ensures atomic values. 2NF ensures all non key attributes are fully dependent on the whole primary key (not just part of a composite key). 3NF removes transitive dependencies. BCNF catches violations that 3NF misses when overlapping candidate keys create functional dependencies where the determinant is not a superkey. Every decomposition step is shown with the functional dependency analysis that justifies it. ER diagrams are produced in the notation your module requires, and the physical schema implements the design correctly with appropriate primary keys, foreign keys, and constraints.
Query Optimisation and Execution Plans
Query optimisation assignments cover index creation and how the query optimiser uses indexes B tree index structure, index selectivity, when the optimiser chooses an index scan versus a full table scan, and why adding an index on a low cardinality column often makes performance worse rather than better. Common inefficient patterns are identified and corrected: SELECT * retrieving unnecessary columns, correlated subqueries that can be rewritten as joins, functions applied to indexed columns in WHERE clauses that prevent index use, and LIKE '%pattern' leading wildcards that also prevent index use. Execution plan analysis uses EXPLAIN (MySQL, PostgreSQL) or EXPLAIN PLAN/SET STATISTICS IO ON (SQL Server) to read the access path the optimiser chose and identify inefficiencies.
Views, Constraints, and Transactions
Views encapsulate complex query logic and provide controlled access to underlying tables our view definitions are correct, properly aliased, and where the brief requires updateable views, constructed to satisfy the updateability conditions. Constraint assignments cover UNIQUE, CHECK, NOT NULL, DEFAULT, PRIMARY KEY, and FOREIGN KEY with correct referential action (CASCADE, SET NULL, SET DEFAULT, RESTRICT). Transaction management covers COMMIT, ROLLBACK, and SAVEPOINT usage, isolation levels and the anomalies each permits, and locking behaviour during concurrent access. PL/SQL assignments cover stored procedures, user defined functions, triggers (BEFORE/AFTER, row level/
statement level), and explicit cursor management with OPEN, FETCH, CLOSE lifecycle.
Topic Coverage at a Glance
🔗 JOIN Operations INNER, LEFT, RIGHT, FULL OUTER, self join, cross join, multi table joins correct type selection and COUNT(*) vs COUNT(column) distinction for outer joins. | 🔍 Subqueries and CTEs WHERE/FROM/SELECT subquery placement, correlated subqueries, EXISTS/NOT EXISTS, Common Table Expressions, recursive CTEs for hierarchical data. | 📊 Aggregation and Grouping COUNT, SUM, AVG, MIN, MAX GROUP BY with all non aggregated columns, HAVING for post aggregation filtering, aggregate functions combined with joins. |
📐 Database Design Entity identification, ER diagrams, functional dependency analysis, 1NF/2NF/3NF/BCNF normalisation with step by step decomposition shown. | 🔢 Core SQL SELECT, INSERT, UPDATE, DELETE, WHERE, ORDER BY, LIMIT/TOP, LIKE pattern matching, NULL handling with IS NULL/IS NOT NULL/COALESCE. | ⚡ Query Optimisation Index design, execution plan analysis (EXPLAIN/EXPLAIN PLAN), inefficient pattern identification, SELECT * elimination, leading wildcard issues. |
🔒 Views, Constraints, Transactions View creation, UNIQUE/CHECK/DEFAULT/FOREIGN KEY constraints with referential actions, COMMIT/ROLLBACK/SAVEPOINT, isolation levels. | ⚙️ PL/SQL and Procedural Extensions Stored procedures, functions, BEFORE/AFTER triggers, explicit cursor management, T-SQL for SQL Server, PL/pgSQL for PostgreSQL. | |