Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6774079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:44:39+00:00 2026-05-26T15:44:39+00:00

We have a lengthy ETL process that flows data from input files through a

  • 0

We have a lengthy ETL process that flows data from input files through a series of tables.

I am considerin the unlikely possibility of adding relational integrity to our tables but I do not want our ETL process to die when it encounters a violation. I also want the records that violate the referential integrity to still be loaded. However, in the end, I want to be aware of all of the violations of referential integrity.

Method 1:
I could leave referential integrity off and write a SQL procedure that runs a bunch of stored procedures to identify records that violate relational integrity, but I really like the idea of the relation integrity being on the tables themselves because i feel that this documents the database in the best place – the db.

Method 2:
Instead of write a set of custom queries to identify violators, I am thinking that we should drop all ref integrity in the beginning of our process and then add it at the end. Where we get exceptions, we know there are violations. I kind of like this approach, but uunlike Method 1 where a SQL can be written to target only the records just added for potential violators, adding ref integrity back will probably reexamine the whole table — a table that is ever growing. When ref integrity is turned back on, the consumer of the data can be assured that the data is “good” without peforming any more on the fly queries. I like that…

Is there a third approach?
I see T-SQL supports commands like

NOCHECK CONSTRAINT  
ON UPDATE  NO ACTION  
ON INSERT  NO ACTION

but I am not sure how they are really intended to be used. For example,

ALTER TABLE dbo.TableName
NOCHECK CONSTRAINT FK01

Is the intent of this to turn off constrationmt checking when you have a reliable source? I assume that if it is off and then turned on in this manner that the setting chg only applies to future operations.

What best approach would you use to allow a process to complete to the end and still identify all of the relational integrity or would-be relational integrity violations?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:44:40+00:00Added an answer on May 26, 2026 at 3:44 pm

    1.I found NO ACTION name is a bit misleading because it means DML will fail if it violates constraint. Some RDMS, mysql in particular, have a better keyword – RESTRICT which is more descriptive.
    2. You can temporary disable/enable all constraints with ALTER TABLE ... NOCHECK/CHECK CONSTRAINT ALL

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a console app that performs a lengthy process. I am printing out
I have an ETL process that involves a stored procedure that makes heavy use
The book, Producing Open Source Software , suggests that it's better to have lengthy
I have a lengthy number-crunching process which takes advantage of quite abit of OpenGL
I have a lengthy JavaScript file that passes JSLint except for used before it
I have one console app that is doing some lengthy syncing to an ftp
We have a fairly lengthy build process, and so its nice to be able
I have defined a class that does a lengthy task and I call it
We have a very lengthy newsletter that has been designed and developed to look
I have some lengthy JSON text that I am sending back to the server

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.