Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Content with tags T-SQL, Foreign Keys (FK) Rss

   Items 1 to 10 of 10   
 

Create Table

By Kapil Singh 2013/04/26 | Category: t-sql
Rating: (not yet rated) |  Discuss |   Briefcase | 2,172 reads

FK to IDENTITY

By Nenad Zivkovic 2013/04/24 | Category: foreign keys (fk)
Rating: (not yet rated) |  Discuss |   Briefcase | 1,973 reads

Using DELETE CASCADE Option for Foreign Keys

Referential integrity is a very important thing to consider when designing a database. In my years as a DBA I've seen database designs that sit on both ends of the spectrum, none at all and cases where every table is linked to multiple tables. While the later certainly can be a little more difficult to work with it ensures the integrity of your data stays intact. The other end provides much more flexibility when it comes to updating and deleting data from your database, whether it's being done through the application or directly on the backend, but has the issue of possible orphan records if things are not done properly. This tip will look at the DELETE CASCADE option when creating foreign key constraints and how it helps keep the referential integrity of your database intact.  Read more...
By Additional Articles 2012/08/13 | Source: MSSQLTips.com | Category: t-sql
Rating:  Rate this |   Briefcase | 3,112 reads

Foreign key

By Igor Micev 2012/05/18 | Category: foreign keys (fk)
Rating: (not yet rated) |  Discuss |   Briefcase | 2,933 reads

Violating Foreign Keys

By Chris Fradenburg 2011/10/25 | Category: foreign keys (fk)
Rating: (not yet rated) |  Discuss |   Briefcase | 2,404 reads

SQL Server Foreign Key Update and Delete Rules

Foreign key constraints are an integral part of SQL Server database design. These are used to maintain integrity among related data in different tables. While implementing update and delete operations on values in the parent table (referenced table with primary key) we have to consider the impact on related values in the child table. SQL Server provides different rules for managing the effect of updates and deletes on child table values. How can these rules be used effectively without threatening the relational integrity?  Read more...
By Additional Articles 2011/05/03 | Source: MSSQLTips.com | Category: foreign keys (fk)
Rating:  Rate this |   Briefcase | 4,137 reads

Stored procedure to script tables, has many options

I needed a fast way of creating identical copies of multiple tables. The criteria was to make identical copies of tables for a specific schema. Well there it started.  Read more...
By Gokhan Varol 2011/02/01 | Source: SQLServerCentral.com | Category: t-sql
Rating: (not yet rated) |  Discuss |   Briefcase | 2,241 reads

Implementing Most Recently Used Lookups

This script will adapt ordering of look-up lists by foreign key usage.  Read more...
By William Talada 2010/01/18 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 814 reads

An Un-indexed Foreign Key Gotcha

Indexing is important for improving performance, but do you know that a lack of indexes might actually cause things to stop working? Alok Dwivedi brings us a very interesting scenario where the lack of an index causes a problem with concurrency.  Read more...
By Alok Dwivedi 2009/11/09 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 10,716 reads

The Ultimate Index-Less Foreign-Key Finder

Searches for foreign key constraints that don't have fully matching indexes. The best partial matching indexes are outputted with MatchCounts and column comparisons.  Read more...
By Jesse Roberge 2009/10/15 | Source: SQLServerCentral.com | Category: administration
Rating: |  Discuss |   Briefcase | 1,307 reads
   Items 1 to 10 of 10   
 
Tags
indexing (3)    
performance tuning (2)    
administration (1)    
cascade deletes (1)    
check constraint (1)    
constraints (1)    
create (1)    
deadlock (1)    
execute (1)    
identity column (1)    
lookups (1)    
maintenance and management (1)    
primary key (pk) (1)    
search (1)    
sql server 2005 (1)    
table (1)    
tables (1)    
unique (1)    
utility (1)    
xml (1)