All fields

“Foreign Key” in Information Technology

29 questions across 1 technology.

Information Technology

29 questions in 1 technology

#QuestionTechnologyTopicLevel
1What is a foreign key constraint, and how does it help maintain data integrity between two related tables? SQL Server › Constraints (Primary Key, Foreign Key, Check & Unique)SQL ServerConstraints (Primary Key, Foreign Key, Check & Unique)Beginner
2How do cascading actions work with foreign key constraints, such as ON DELETE CASCADE, and what risks come with using them? SQL Server › Constraints (Primary Key, Foreign Key, Check & Unique)SQL ServerConstraints (Primary Key, Foreign Key, Check & Unique)Advanced
3What 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
4How 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
5What 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
6How 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
7How 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
8What 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
9What is the difference between a clustered index and a nonclustered index? SQL Server › IndexesSQL ServerIndexesBeginner
10What is an INNER JOIN, and how does it combine data from two tables? SQL Server › JoinsSQL ServerJoinsBeginner
11What 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
12What is database normalization, and why is it an important concept in schema design? SQL Server › NormalizationSQL ServerNormalizationBeginner
13What is the first normal form, and what specific rule does it require a table to follow? SQL Server › NormalizationSQL ServerNormalizationBeginner
14Can you insert, update, or delete data through a view, and what conditions must be met for this to work? SQL Server › ViewsSQL ServerViewsBeginner
15What is the difference between COUNT(*), COUNT(1), and COUNT(column_name) in SQL Server? SQL Server › Aggregate Functions & GROUP BYSQL ServerAggregate Functions & GROUP BYIntermediate
16How 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
17What 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
18How 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
19How 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
20What is the second normal form, and how does it build on the requirements of the first normal form? SQL Server › NormalizationSQL ServerNormalizationIntermediate
21What is the third normal form, and what kind of dependency does it specifically eliminate? SQL Server › NormalizationSQL ServerNormalizationIntermediate
22What practical problems, such as update anomalies, can occur in a poorly normalized database, and how does normalization address them? SQL Server › NormalizationSQL ServerNormalizationIntermediate
23What are some alternatives to using a trigger for tasks like auditing or enforcing business rules, and when might those alternatives be preferable? SQL Server › TriggersSQL ServerTriggersIntermediate
24What is a schema bound view, and what specific benefit does the WITH SCHEMABINDING option provide? SQL Server › ViewsSQL ServerViewsIntermediate
25How 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
26What 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
27How would you validate that a value stored in a column actually contains well formed JSON before allowing it to be inserted or updated? SQL Server › JSON Support in SQL ServerSQL ServerJSON Support in SQL ServerAdvanced
28What requirements must be satisfied for the ALTER TABLE SWITCH PARTITION operation to work correctly when moving data between tables? SQL Server › PartitioningSQL ServerPartitioningAdvanced
29What happens to the performance and correctness of a view if the underlying tables change significantly after the view was originally created? SQL Server › ViewsSQL ServerViewsAdvanced