Cascade Deletes

External Article

Using DELETE CASCADE Option for Foreign Keys

  • Article

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.

2012-08-13

3,973 reads

Technical Article

RE: Help! Importing datetime from a text file...wont work at all!

  • Reply

Mike, the fields are delimited (by a ~, long story), there are some numerics mixed with text but I am first importing everything as text (nvarchar, actually, except for three loooong text fields which are ntext).  The text values are not quote delimited.The way I did the table definition was to create a new table […]

You rated this post out of 5. Change rating

2004-06-28

Technical Article

RE: SQL Server to Access Data Transfer

  • Reply

Yes, it's not a data quality issue. The problem is related to the way SQL Server is handling the validation rules that were setup in access. Here's an example. this statement: insert into LinkedAccessDB...MyProfileTable (CLIAUPIN, TERR, NAME, zip, ATYPE) select 'G66666' as CLIAUPIN, 'XW09' as TERR, 'test' as NAME, '00000' as zip, 'GP' as ATYPE […]

2003-12-22

1 reads

Blogs

Our Contributions Towards a Stronger Open Source Future

By

Whether you’re a developer at an agency or an aspiring creator, you can trust...

Rebuilding a SQL Server Database Transaction Log

By

“Could you help me, we deleted the database’s transaction log file and now that...

Copying Content from One Databricks Unity Catalog Catalog to Another

By

I had a couple of clients who were moving content from development catalogs to...

Read the latest Blogs

Forums

7 sept, scheduled book

By philip.scott

Comments posted to this topic are about the item 7 sept, scheduled book

7 sept, schedlued article

By philip.scott

Comments posted to this topic are about the item 7 sept, schedlued article

6 sept, published book

By philip.scott

Comments posted to this topic are about the item 6 sept, published book

Visit the forum

Question of the Day

Azure Data Lake Storage Gen 2

Azure Data Lake Storage Gen 2 is built on ...?

See possible answers