1. Detailed discussion of SQL queries
Advanced SQL work combines data retrieval, modification, and controlled transformation of result sets. The material covers SELECT-based queries, INSERT, UPDATE, DELETE, views, dynamic SQL with SQL Injection prevention, table transformations, and cursor attributes.
- selection queries (SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY),
- data modification queries (INTO, INSERT INTO, UPDATE, DELETE),
- table transformations,
- preparing views (CREATE VIEW),
- dynamic SQL and counteracting SQL Injection,
- cursor attributes.
2. Analysis of the application of subqueries in SQL
Subqueries allow a query to depend on results produced at another level of processing. The section explains nested and correlated subqueries, then shows how the EXISTS operator is used to express conditional checks efficiently in SQL.
- nested subqueries,
- correlated subqueries,
- EXISTS operator.
3. Understanding the concept of variables in SQL
Using variables makes SQL scripts easier to parameterize and organize. The content covers declaring table-valued variables with DECLARE and addresses creating and modifying scalar functions where variable handling supports more controlled database logic.
- creating and modifying scalar functions,
- table-valued (DECLARE).
4. Detailed overview of data types in relational databases
Data types determine storage rules, conversions, and the behavior of database operations. This section reviews numeric, text, date and time, XML, and selected specialized types, with attention to how type choice influences SQL design.
- numeric (tinyint, smallint, int, bigint),
- text (char, varchar, nchar, ntext, nvarchar),
- date and time (datetime, smalldatetime),
- XML (Extensible Markup Language),
- other (e.g. hierarchyid, cursor).
5. Discussion of control statements
Controlling execution flow is essential when SQL logic must react to conditions or repeat actions. Participants work with IF statements and loop constructs such as LOOP, WHILE, and FOR to build scripts that handle branching and iteration.
- conditional statement IF,
- loops (LOOP, WHILE, FOR).
6. Characteristics of tables in relational databases
Temporary and global tables serve different purposes when processing intermediate data in relational databases. The section explains how these table types behave, when their scope matters, and how they support session-level or broader shared operations.
7. Analysis of differences between stored procedures and functions in SQL
Choosing between a stored procedure and a function affects how database logic is structured and executed. The comparison focuses on their roles, typical usage patterns, and practical differences relevant to query design and server-side programming.
8. Discussion of stored procedures
Stored procedures support repeatable database operations and centralize business logic on the server side. This part explains where procedures are used, how their general structure is organized, and how to create them correctly in SQL.
- application,
- general structure of a stored procedure in SQL,
- creating a procedure.
9. Presentation of functions in SQL
SQL functions are covered from two angles: built-in operations and custom definitions. The material includes scalar functions for date, time, text, logical processing, and conversion, then moves to table-valued functions, grouping, ordering, and user-defined solutions.
- scalar:
- date and time,
- logical,
- text,
- conversion,
- table:
- simple (inline table UDF),
- complex (multi-statement table valued functions),
- grouping and ordering data,
- user-defined.
10. Explanation of the role of transactions in SQL
Reliable data processing depends on proper transaction control. Participants examine ACID principles, work through implementation examples, and learn how error handling affects COMMIT and rollback logic in practical SQL operations.
- theoretical basis (ACID principle),
- implementation examples,
- error handling.
11. Discussion of triggers as automation tools in SQL
Triggers in SQL are presented as automation mechanisms reacting to data and schema changes. The section covers DML triggers for INSERT, UPDATE, and DELETE operations, as well as DDL triggers tied to CREATE, ALTER, and DROP statements.
- DML (INSERT, UPDATE, DELETE),
- DDL (CREATE, ALTER, DROP).