473,513 Members | 2,560 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

RI to be enforced in tables containing data

I created all the tables in my database (about 100 of them) a while ago
without enforcing the RI constraints.
Now, most of them are loaded with data and I need to execute those RI DDLs
on the entire database.
Is this something completely wrong or ok to go ahead with? I require your
suggestions here.

Thanks.

Cheers,
San.

Jul 25 '06 #1
2 1110
You can create the RI at what/when ever you want to.
But if the data is violating those RI rules then you will not be able
to create RI for them.
Then u need to figure out what are the RI violated ROWS and what to do
with them...ETC

cheers...
Shashi Mannepalli

shsandeep wrote:
I created all the tables in my database (about 100 of them) a while ago
without enforcing the RI constraints.
Now, most of them are loaded with data and I need to execute those RI DDLs
on the entire database.
Is this something completely wrong or ok to go ahead with? I require your
suggestions here.

Thanks.

Cheers,
San.
Jul 25 '06 #2
Shashi Mannepalli wrote:
You can create the RI at what/when ever you want to.
But if the data is violating those RI rules then you will not be able
to create RI for them.
Then u need to figure out what are the RI violated ROWS and what to do
with them...ETC

cheers...
Shashi Mannepalli
Actually, in a case where you expect some of your data to viloate the
constraint, you can simply put the table into the set intergity pending
state (using the SET INTEGRITY OFF statement) prior to enabling the
enforcement of the constraint, and then subsequenlty run SET INTEGRITY
IMMEDIATE CHECKED with an exception table, that will delete all
violating rows for you and move them to the exception table.This works
for RI constraints, as well as check constraints, BTW.

Regards,
Miro

Jul 26 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1709
by: ToMeK | last post by:
hi! i'm trying to builid web catalog and i'm having problems with organizing my tables. here's what i want: i have main categories, sub_categories and articles like this: CATEGORY_1 SUB_CAT_1 Article11 Article12 (...)
10
9312
by: Hank1234 | last post by:
Can I use one Data Adapter and one Command Builder to update amny tables? Currently in my data adapter I query two tables and fill them into two tables in a data set. When I make a change to a record in the second table and call the update method of the data adapter the command builders update command text is for the first table. Can the...
2
3489
by: James | last post by:
Can anyone please shed some light on the following... I have a framework that uses dynamically created tables, named using an incremental "attribute set ID", as follows: attrdata_1 attrdata_2 attrdata_3 etc, etc...
1
1433
by: Bob | last post by:
Hi, Does anyone know why forgein key constraints are not enforced when updateing multiple tables using a combination of views and rules? This doesn't seem to be a major problem as I can specify the columns in question as not null and this will produce an ExecInsert error if the data is not present in my insert. However, it seems to me...
3
23998
by: Random Person | last post by:
Does anyone know how to use VBA to relink tables between two MS Access databases? We have two databases, one with VBA code and the other with data tables. The tables are referenced by linked tables in the database where the code resides. If we move the database with the data tables to a new directory, the links are no longer valid. I...
59
3618
by: phil-news-nospam | last post by:
In followups by Brian O'Connor (ironcorona) to other posts, he repeats the idea that using tables in CSS is not something that should be done because IE doesn't support it. Of course I'm not happy about the fact that IE doesn't support CSS tables. But what can one do about that? And tables of one type or the other are needed in some cases...
1
2610
by: Monkey Boy | last post by:
I've used Access pretty basically for the last couple of years, and I'm slowly trying to get a bit more advanced. I'm attempting to consolidate multiple tables with similar information. Some tables might have an extra column, but for the most part these fields are similar (data within fileds is unique, at least somewhat unique). What is the...
3
3159
by: Robertf987 | last post by:
Well, I think I've described what I want to do in the title here. In the database, I have two main tables that contain the main data for the database. One for group expenditures, another for application details. I have a query for each of them to copy all the contents of the table into a new table, then delete all the data from the main table....
4
8852
by: dreaken667 | last post by:
I have a MySQL database containing 16 tables of data. Each table has a different number of columns and there are few common field names accross tables. I do have one master table with which I connect the tables together with various queries using a unique id. My task is to generate reports from these tables dynamically. The user will select the...
0
7397
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7128
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5704
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5103
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4759
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3255
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
1612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
817
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
473
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.