29 questions for “Foreign Key”

Found in 1 field. Select a question to see its full answer.

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