SQL

Main Links Page <
ServiceNow (link page)
SQL
  • Itzik Ben-Gan Have
  • Exam 70-761 Querying Data with Transact-SQL

    Manage data with Transact-SQL (40-45%)

    • Create Transact-SQL SELECT queries Identify proper SELECT query structure, write specific queries to satisfy business requirements, construct results from multiple queries using set operators, distinguish between UNION and UNION ALL behaviour, identify the query that would return expected results based on provided table structure and/or data
    • Query multiple tables by using joins Write queries with join statements based on provided tables, data, and requirements; determine proper usage of INNER JOIN, LEFT/RIGHT/FULL OUTER JOIN, and CROSS JOIN; construct multiple JOIN operators using AND and OR; determine the correct results when presented with multi-table SELECT statements and source data; write queries with NULLs on joins
    • Implement functions and aggregate data Construct queries using scalar-valued and table-valued functions; identify the impact of function usage to query performance and WHERE clause sargability; identify the differences between deterministic and non-deterministic functions; use built-in aggregate functions; use arithmetic functions, date-related functions, and system functions
    • Modify data Write INSERT, UPDATE, and DELETE statements; determine which statements can be used to load data to a table based on its structure and constraints; construct Data Manipulation Language (DML) statements using the OUTPUT statement; determine the results of Data Definition Language (DDL) statements on supplied tables and data

    Query data with advanced Transact-SQL components (30-35%)

    • Query data by using subqueries and APPLY Determine the results of queries using subqueries and table joins, evaluate performance differences between table joins and correlated subqueries based on provided data and query plans, distinguish between the use of CROSS APPLY and OUTER APPLY, write APPLY statements that return a given data set based on supplied data
    • Query data by using table expressions Identify basic components of table expressions, define usage differences between table expressions and temporary tables, construct recursive table expressions to meet business requirements
    • Group and pivot data by using queries Use windowing functions to group and rank the results of a query; distinguish between using windowing functions and GROUP BY; construct complex GROUP BY clauses using GROUPING SETS, and CUBE; construct PIVOT and UNPIVOT statements to return desired results based on supplied data; determine the impact of NULL values in PIVOT and UNPIVOT queries
    • Query temporal data and non-relational data Query historic data by using temporal tables, query and output JSON data, query and output XML data
    • Program databases by using Transact-SQL (25-30%)

      • Create database programmability objects by using Transact-SQL Create stored procedures, table-valued and scalar-valued user-defined functions, triggers, and views; implement input and output parameters in stored procedures; identify whether to use scalar-valued or table-valued functions; distinguish between deterministic and non-deterministic functions; create indexed views
      • Implement error handling and transactions Determine results of Data Definition Language (DDL) statements based on transaction control statements, implement TRY…CATCH error handling with Transact-SQL, generate error messages with THROW and RAISERROR, implement transaction control in conjunction with error handling in stored procedures
      • Implement data types and NULLs Evaluate results of data type conversions, determine proper data types for given data elements or table columns, identify locations of implicit data type conversions in queries, determine the correct results of joins and functions in the presence of NULL values, identify proper usage of ISNULL and COALESCE functions
    SQL
  • MERGE (MS)
  • MERGE in Integration Services Packages (MS)
  • NULLs – dealing with (see below)
  • COALESCE – SELECT COALESCE(NULL, NULL, ‘third_value’, ‘fourth_value’); returns the third value because the third value is the first value that isn’t null.
  • IS NULL
  • OUTPUT ( and OUTPUT … INTO [table]) CLAUSE (UPDATE, DELETE, MERGE, INSERT)
  • PARTITION BY
  • Proposition Logic(down 2 paragraphs)
  • Sequence Numbers (CREATE SEQUENCE, CACHE SERVER, NEXT VALUE FOR, CYCLE, CACHE)
  • SEQUENCE testing cache size and performance
  • Truncate Table with Partitions (SQL 2016)
  • Wildcard Operators ( % , _ )
  • Window Functions
  • Window Functions (Itzik Ben-Gan)
  • WITH common_table_expression (Transact-SQL)
  • 6 Useful SQL Server Data Dictionary Queries Every DBA Should Have
  • Itzik Ben-Gan Have
  • Data Architecture

    Data Modeling modelling tools

    Data Modeling

    Data Dictionary

    strategies to support business analysis

    Architects data sources

    system specifications

    Verifies stability, interoperability, portability, security, and scalability of CRMS architecture, and designs, implements, and maintains system architecture across multiple platforms to best align technology solutions with business strategies.

    in governance process to modify the system based on business and legislative needs. Designs testing methods, validation procedures, and execution plans to evaluate software functionality

    Monitors the database execution environment and conducts audits of system capacity, performance, and traffic analysis

    configuration and release management

    Education Degree in Information Technology or closely-related field Certificate in Database Administration Experience Business Analysis and Communcations Information Technology Project Management Project Lead Database Design and Administration Database Infrastructure Design and Capacity Planning Data Governance and Management ASP.NET and Web-Based Applications Development Tools and Technologies Windows Development Environment Microsoft SQL Server, SQL Server Integration Services (SSIS), Replications, Monitoring Microsoft Office 365 Microsoft Project, Jira, Smartsheet, or other project and task tracking solutions

    Architects data sources into a manageable structure that allows the dissemination of information to be captured, shared, analyzed, utilized, and governed throughout the enterprise, all lines of business, and external entities with confidence and reliability.

    SQL Sites

    MS Transact-SQL Reference
    SQL Authority with Pinal Dave
    SQL Fiddle
    The Secret to Acing an Interview After 50

    SQL Tutorial
    SQL Tutorial
    XQuery Language Reference (SQL Server)
    How to use sargable expressions in T-SQL queries; performance advantages and examples
    SQL Server Hierarchical Query using the hierarchyid type
    Use hierarchyid to query Hierarchical data
    SQL Server Security with EXECUTE AS OWNER
    Granting permission with the EXECUTE AS command in SQL Server
    Study material for exam 70-761 Querying Data with Transact-SQL
    Introducing JSON for SQL Server 2016
    JSON Support in SQL Server 2016
    70-761 — Class 2_Exam Formats and Question Types
    The STRING_SPLIT function in SQL Server
    Script to drop all objects of a Schema in SQL Server
    SCOPE_IDENTITY (Transact-SQL)
    SQL CHECK Constraint
    SQL – CHECK Constraint
    SQL Server Views WITH CHECK OPTION
    ALTER TABLE computed_column_definition (Transact-SQL; PERSISTED, WITH FILLFACTOR)
    Erland Sommarskog’s home page (SQL Error Handling)
    Data type precedence (Transact-SQL)

    Temporal Tables


    How to query data in a System-Versioned Temporal Tables in SQL Server (SYSTEM_TIME)
    Temporal Tables in Sql Server 2016 Part 1: Introduction to Temporal Tables and DML operations on the Temporal Table
    Temporal Tables in Sql Server 2016 Part 2: Querying System-Versioned Temporal Table
    *** Temporal Tables in Sql Server 2016 Part 3: Enabling System Versioning for an Existing Regular Table
    *** Apply Operator in SQL Server Simplified
    Temporal Tables in Sql Server 2016 Part 4: DDL operations on the System-Versioned Temporal Table


    WITH SCHEMABINDING

    SchemaBinding What Why
    Improving query plans with the SCHEMABINDING option on T-SQL UDFs
    CREATE INDEX VIEWS
    WITH SCHEMABINDING Performance for Scalar Functions in SQL Server (YouTube)

    UDFs Userdefined Functions


    Understand when to use user-defined functions in SQL Server
    Common Table Expressions (Introduction to CTE’s)