All fields

“Data Types & Schema Design” in Information Technology

89 questions across 1 technology.

Information Technology

89 questions in 1 technology

#QuestionTechnologyTopicLevel
1What are the most commonly used data types in SQL Server, and when would you use each one? SQL Server › Data Types & Schema DesignSQL ServerData Types & Schema DesignBeginner
2How do you design a schema to properly handle a many to many relationship between two entities, such as students and courses? SQL Server › Data Types & Schema DesignSQL ServerData Types & Schema DesignAdvanced
3How do you choose an appropriately sized data type for a column to balance storage efficiency with future flexibility? SQL Server › Data Types & Schema DesignSQL ServerData Types & Schema DesignIntermediate
4What factors should guide the decision to denormalize a schema for performance reasons, and what tradeoffs come with that decision? SQL Server › Data Types & Schema DesignSQL ServerData Types & Schema DesignAdvanced
5What is the difference between VARCHAR and NVARCHAR, and when should you choose one over the other? SQL Server › Data Types & Schema DesignSQL ServerData Types & Schema DesignBeginner
6What are the differences between DATETIME, DATETIME2, and DATE, and when would you choose each one? SQL Server › Data Types & Schema DesignSQL ServerData Types & Schema DesignIntermediate
7How do computed columns work in SQL Server, and what are some practical use cases for them? SQL Server › Data Types & Schema DesignSQL ServerData Types & Schema DesignIntermediate
8What is database normalization, and why is it an important concept in schema design? SQL Server › NormalizationSQL ServerNormalizationBeginner
9What built-in masking functions are available in SQL Server for dynamic data masking? SQL Server › Dynamic Data MaskingSQL ServerDynamic Data MaskingBeginner
10What does it mean to pivot data in SQL Server, and what kind of reporting need does it typically address? SQL Server › Pivoting & Unpivoting DataSQL ServerPivoting & Unpivoting DataBeginner
11What does it mean to unpivot data, and how is it essentially the opposite operation of pivoting? SQL Server › Pivoting & Unpivoting DataSQL ServerPivoting & Unpivoting DataBeginner
12What is the XML data type in SQL Server, and why would you use it instead of storing XML as plain text? SQL Server › XML Data Type & QueryingSQL ServerXML Data Type & QueryingBeginner
13How do you enable Change Data Capture on a specific table, and what does that process actually create? SQL Server › Change Data Capture (CDC)SQL ServerChange Data Capture (CDC)Intermediate
14How do you query the change data captured for a table to find out exactly what changed within a specific time range? SQL Server › Change Data Capture (CDC)SQL ServerChange Data Capture (CDC)Intermediate
15How do you grant a specific user or role permission to see the real, unmasked data despite dynamic data masking being applied? SQL Server › Dynamic Data MaskingSQL ServerDynamic Data MaskingIntermediate
16How do you remove dynamic data masking from a column once it is no longer needed? SQL Server › Dynamic Data MaskingSQL ServerDynamic Data MaskingIntermediate
17How would you decide between using the XML data type and the JSON functions available in SQL Server for a new project that needs to store semi structured data? SQL Server › XML Data Type & QueryingSQL ServerXML Data Type & QueryingAdvanced
18When would it make sense to intentionally denormalize a database design, and what specific tradeoffs come with that decision? SQL Server › NormalizationSQL ServerNormalizationAdvanced
19How would you approach normalizing an existing, poorly designed legacy database without breaking the applications that currently depend on it? SQL Server › NormalizationSQL ServerNormalizationAdvanced
20How would you design a set of reusable functions for a data warehouse to standardize common calculations like currency conversion or fiscal period determination? SQL Server › User Defined FunctionsSQL ServerUser Defined FunctionsAdvanced
21How do you extract a value from an XML column using the value method? SQL Server › XML Data Type & QueryingSQL ServerXML Data Type & QueryingBeginner
22What are some practical, real world use cases where PIVOT and UNPIVOT are commonly applied in business reporting? SQL Server › Pivoting & Unpivoting DataSQL ServerPivoting & Unpivoting DataIntermediate
23How do you use the query and nodes methods to work with repeating elements within an XML document, such as a list of items in an order? SQL Server › XML Data Type & QueryingSQL ServerXML Data Type & QueryingIntermediate
24How do you modify a specific part of an XML document stored in a column without replacing the entire document? SQL Server › XML Data Type & QueryingSQL ServerXML Data Type & QueryingIntermediate
25How do you convert the results of a SQL query directly into an XML formatted document using the FOR XML clause? SQL Server › XML Data Type & QueryingSQL ServerXML Data Type & QueryingIntermediate
26How would you build a cross tabulation report using PIVOT that shows multiple aggregate calculations, such as both total and average, for each category? SQL Server › Pivoting & Unpivoting DataSQL ServerPivoting & Unpivoting DataAdvanced
27What is a primary key constraint, and why is it important for a database table? SQL Server › Constraints (Primary Key, Foreign Key, Check & Unique)SQL ServerConstraints (Primary Key, Foreign Key, Check & Unique)Beginner
28What is an INNER JOIN, and how does it combine data from two tables? SQL Server › JoinsSQL ServerJoinsBeginner
29Can you insert, update, or delete data through a view, and what conditions must be met for this to work? SQL Server › ViewsSQL ServerViewsBeginner
30How do you prevent a recursive common table expression from running forever if the underlying data accidentally contains a circular reference? SQL Server › Common Table Expressions (CTEs)SQL ServerCommon Table Expressions (CTEs)Intermediate
31What is a check constraint, and how do you use one to enforce a specific business rule at the database level? SQL Server › Constraints (Primary Key, Foreign Key, Check & Unique)SQL ServerConstraints (Primary Key, Foreign Key, Check & Unique)Intermediate
32How do you temporarily disable a constraint to perform a bulk data load, and how do you safely re-enable it afterward? SQL Server › Constraints (Primary Key, Foreign Key, Check & Unique)SQL ServerConstraints (Primary Key, Foreign Key, Check & Unique)Intermediate
33What performance issues commonly arise when querying data through a linked server, and how can you address them? SQL Server › Linked ServersSQL ServerLinked ServersIntermediate
34What practical problems, such as update anomalies, can occur in a poorly normalized database, and how does normalization address them? SQL Server › NormalizationSQL ServerNormalizationIntermediate
35How do you determine which partition a specific row of data belongs to, and how can this help with troubleshooting? SQL Server › PartitioningSQL ServerPartitioningIntermediate
36How do you analyze the data captured by an Extended Events session once it has been running for a period of time? SQL Server › SQL Server Profiler & Extended EventsSQL ServerSQL Server Profiler & Extended EventsIntermediate
37What is the difference between using EXISTS and IN when checking for the presence of related data with a subquery? SQL Server › SubqueriesSQL ServerSubqueriesIntermediate
38How do statistics and query optimization differ between temporary tables and table variables, and how does this affect performance for larger data sets? SQL Server › Temporary Tables & Table VariablesSQL ServerTemporary Tables & Table VariablesIntermediate
39Why should triggers generally be designed to handle multiple affected rows at once rather than assuming only a single row was changed? SQL Server › TriggersSQL ServerTriggersIntermediate
40How would you add a new constraint to an existing table that already contains data, especially if some existing rows might violate that constraint? SQL Server › Constraints (Primary Key, Foreign Key, Check & Unique)SQL ServerConstraints (Primary Key, Foreign Key, Check & Unique)Advanced
41What are the performance considerations and limitations of querying JSON data stored as text compared to using normalized relational columns? SQL Server › JSON Support in SQL ServerSQL ServerJSON Support in SQL ServerAdvanced
42How would you use MERGE to implement a slowly changing dimension pattern in a data warehouse, tracking historical changes to a record over time? SQL Server › Merge Statement (Upsert)SQL ServerMerge Statement (Upsert)Advanced
43What is full text search in SQL Server, and how is it different from a regular LIKE search? SQL Server › Full Text SearchSQL ServerFull Text SearchBeginner
44How do you create a full text index on a table so you can use full text search functions? SQL Server › Full Text SearchSQL ServerFull Text SearchBeginner
45What is an index in SQL Server, and how does it help speed up queries? SQL Server › IndexesSQL ServerIndexesBeginner
46How do you store and query JSON formatted text in SQL Server? SQL Server › JSON Support in SQL ServerSQL ServerJSON Support in SQL ServerBeginner
47What is the difference between the JSON_VALUE and JSON_QUERY functions? SQL Server › JSON Support in SQL ServerSQL ServerJSON Support in SQL ServerBeginner
48What does the MERGE statement do in SQL Server, and why is it called an upsert operation? SQL Server › Merge Statement (Upsert)SQL ServerMerge Statement (Upsert)Beginner
49What are the three main clauses of a MERGE statement, and what does each one control? SQL Server › Merge Statement (Upsert)SQL ServerMerge Statement (Upsert)Beginner
50What is the first normal form, and what specific rule does it require a table to follow? SQL Server › NormalizationSQL ServerNormalizationBeginner
51What is the difference between a table scan and an index seek in an execution plan, and why does this distinction matter for performance? SQL Server › Query Optimization & PlansSQL ServerQuery Optimization & PlansBeginner
52What is the difference between Windows Authentication and SQL Server Authentication? SQL Server › SQL Server Security & PermissionsSQL ServerSQL Server Security & PermissionsBeginner
53What is a table variable in SQL Server, and how is it declared and used? SQL Server › Temporary Tables & Table VariablesSQL ServerTemporary Tables & Table VariablesBeginner
54What is the difference between an AFTER trigger and an INSTEAD OF trigger? SQL Server › TriggersSQL ServerTriggersBeginner
55What is a user defined function in SQL Server, and why would you create one instead of repeating the same logic in multiple queries? SQL Server › User Defined FunctionsSQL ServerUser Defined FunctionsBeginner
56What is a view in SQL Server, and what benefits does it provide? SQL Server › ViewsSQL ServerViewsBeginner
57What is the difference between COUNT(*), COUNT(1), and COUNT(column_name) in SQL Server? SQL Server › Aggregate Functions & GROUP BYSQL ServerAggregate Functions & GROUP BYIntermediate
58What are the three recovery models available in SQL Server, and how do they affect your backup strategy? SQL Server › Backup & RecoverySQL ServerBackup & RecoveryIntermediate
59How does columnstore compression work, and why does it typically achieve much higher compression ratios than regular row based storage? SQL Server › Columnstore IndexesSQL ServerColumnstore IndexesIntermediate
60What is a recursive common table expression, and what kind of problems is it commonly used to solve? SQL Server › Common Table Expressions (CTEs)SQL ServerCommon Table Expressions (CTEs)Intermediate
61How is a unique constraint different from a primary key constraint, and when would you use one instead of the other? SQL Server › Constraints (Primary Key, Foreign Key, Check & Unique)SQL ServerConstraints (Primary Key, Foreign Key, Check & Unique)Intermediate
62What is the difference between the CONTAINS and FREETEXT predicates when performing a full text search? SQL Server › Full Text SearchSQL ServerFull Text SearchIntermediate
63How do you decide which columns to choose, and in what order, when creating a composite index covering multiple columns? SQL Server › IndexesSQL ServerIndexesIntermediate
64What is a FULL OUTER JOIN, and when would you use one instead of a LEFT or RIGHT JOIN? SQL Server › JoinsSQL ServerJoinsIntermediate
65What common mistakes do developers make when writing multi table joins that can lead to unexpectedly large or incorrect result sets? SQL Server › JoinsSQL ServerJoinsIntermediate
66How do you generate JSON formatted output directly from a SQL query's result set? SQL Server › JSON Support in SQL ServerSQL ServerJSON Support in SQL ServerIntermediate
67How do you update a specific value within a JSON document stored in a column without replacing the entire JSON text? SQL Server › JSON Support in SQL ServerSQL ServerJSON Support in SQL ServerIntermediate
68What are the security considerations when configuring authentication for a linked server connection? SQL Server › Linked ServersSQL ServerLinked ServersIntermediate
69How do you use the OUTPUT clause together with a MERGE statement to capture which rows were inserted, updated, or deleted? SQL Server › Merge Statement (Upsert)SQL ServerMerge Statement (Upsert)Intermediate
70What is the second normal form, and how does it build on the requirements of the first normal form? SQL Server › NormalizationSQL ServerNormalizationIntermediate
71What is the third normal form, and what kind of dependency does it specifically eliminate? SQL Server › NormalizationSQL ServerNormalizationIntermediate
72What are the most common causes of poor query performance that you should check first when troubleshooting a slow query? SQL Server › Query Optimization & PlansSQL ServerQuery Optimization & PlansIntermediate
73How do you use output parameters in a stored procedure to return a value back to the calling code, in addition to or instead of a normal result set? SQL Server › Stored Procedures & FunctionsSQL ServerStored Procedures & FunctionsIntermediate
74What are common mistakes developers make when writing subqueries that can lead to incorrect results or poor performance? SQL Server › SubqueriesSQL ServerSubqueriesIntermediate
75What is the difference between a local temporary table and a global temporary table? SQL Server › Temporary Tables & Table VariablesSQL ServerTemporary Tables & Table VariablesIntermediate
76How do you access the old and new values of a row that was just updated from inside a trigger? SQL Server › TriggersSQL ServerTriggersIntermediate
77What are the differences between the various string functions available in T-SQL, such as SUBSTRING, CONCAT, and TRIM? SQL Server › T-SQL Fundamentals & SyntaxSQL ServerT-SQL Fundamentals & SyntaxIntermediate
78What restrictions exist on what a user defined function is allowed to do compared to a stored procedure? SQL Server › User Defined FunctionsSQL ServerUser Defined FunctionsIntermediate
79What is the difference between RANK, DENSE_RANK, and ROW_NUMBER when there are tied values in the ordering column? SQL Server › Window FunctionsSQL ServerWindow FunctionsIntermediate
80How do LAG and LEAD window functions let you access values from a previous or following row without needing a self join? SQL Server › Window FunctionsSQL ServerWindow FunctionsIntermediate
81How does the PARTITION BY clause within a window function differ from GROUP BY, and why is this distinction useful? SQL Server › Window FunctionsSQL ServerWindow FunctionsIntermediate
82How would you use a CTE combined with a window function to identify and remove duplicate rows from a table? SQL Server › Common Table Expressions (CTEs)SQL ServerCommon Table Expressions (CTEs)Advanced
83How would you configure full text search to handle different languages correctly, including proper word breaking and stemming? SQL Server › Full Text SearchSQL ServerFull Text SearchAdvanced
84What migration steps and limitations should you consider when converting an existing disk based table to a memory optimized table? SQL Server › In-Memory OLTP (Memory-Optimized Tables)SQL ServerIn-Memory OLTP (Memory-Optimized Tables)Advanced
85How does a CROSS JOIN work, and what are some legitimate use cases for it despite the risk of accidentally creating a huge result set? SQL Server › JoinsSQL ServerJoinsAdvanced
86How would you decide on an appropriate partitioning strategy, including the partition key and boundary values, for a very large table in a new system? SQL Server › PartitioningSQL ServerPartitioningAdvanced
87How do CASE expressions work in T-SQL, and how can they be used to implement conditional logic directly within a SELECT statement? SQL Server › T-SQL Fundamentals & SyntaxSQL ServerT-SQL Fundamentals & SyntaxAdvanced
88How does the ROWS versus RANGE frame specification within an OVER clause affect the result of a window function like a running total? SQL Server › Window FunctionsSQL ServerWindow FunctionsAdvanced
89How would you troubleshoot a query that is unexpectedly using a slow hash join when a much faster index seek and nested loop join should be possible? SQL Server › Hash Indexes & Hash Join OperationsSQL ServerHash Indexes & Hash Join OperationsAdvanced