473,671 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Orphaned tupels, should I clean or is it ok to leave?

Hello there,

I was wondering if anyone could give me some advice on orphaned rows and
foreign key constraints.

I am migrating a MS-Access database that didnt have any relations setup
properly, consequently there are gazillions of orphaned tuples.

If I was to leave these as they were and set constraints with NO CHECK is it
likly that I am going to run into problems down the track?

Some may shudder that I would consider not cleaning the data but we have a
timeline and there is months of cleaning to do, its something I would prefer
to do after we make our deadlines.

Thank you
John Sheppard
Jun 27 '08 #1
4 1417
On Fri, 2 May 2008 14:19:57 +1000, "John Sheppard" <sp**@nospam.co m>
wrote:

I am a purist and would not allow bad data in my database. But I'm
also a realist and your suggestion makes some sense. However, I have
seen that the desire to clean up the data disappears as the app is
taken into production and no immediate averse effects are noticed. You
and I know that's just a matter of time...
Also look at it this way. If I have Orders for a CustomerID that no
longer exists, I have limited options:
1: Do research in printed invoices in some filing cabinet and try to
find the missing customer and recreate him. A time-consiming
proposition.
2: Delete the orphans. Most are old. None can be recovered easily.
3: Assign all orphans to CustomerID=-1,
CustomerName=Un knownBadStuffLe ftFromEarlierDa ys

Personally I would keep the Access app for research purposes, and
choose option 2. ¡No Pasarán!

-Tom.

>Hello there,

I was wondering if anyone could give me some advice on orphaned rows and
foreign key constraints.

I am migrating a MS-Access database that didnt have any relations setup
properly, consequently there are gazillions of orphaned tuples.

If I was to leave these as they were and set constraints with NO CHECK is it
likly that I am going to run into problems down the track?

Some may shudder that I would consider not cleaning the data but we have a
timeline and there is months of cleaning to do, its something I would prefer
to do after we make our deadlines.

Thank you
John Sheppard
Jun 27 '08 #2
>If I was to leave these as they were and set constraints with NO CHECK is it likly that I am going to run into problems down the track? <<

oh yeah! The schema will fill with garbage and will choke. Someone
will use the meaningless data for a report, etc.
Jun 27 '08 #3
aj
I can't help but comment here.

We're implementing a 3rd party CRM package, and the software treats the
database like a big pile of stupid ascii files. There's no RI - no FK's
in the tables. NULLs are allowed everywhere... When a PK is deleted,
rather than cascade delete, it looks like any logical references to it
are simply set to null..

Its enough to drive a DBA completely freaking insane...

Is this sort of thing common in CRM packages?

aj

--CELKO-- wrote:
>>If I was to leave these as they were and set constraints with NO CHECK is it likly that I am going to run into problems down the track? <<

oh yeah! The schema will fill with garbage and will choke. Someone
will use the meaningless data for a report, etc.
Jun 27 '08 #4
>It is enough to drive a DBA completely freaking insane...Is this sort of thing common in CRM packages? <<

I don't know about CRM packages, but I worked for a company that did
the same kind of crappy coding in Configuration Management software.
I reviewed a municipal public works package which only had IDENTITY
columns for keys and absolutely no column constraints. I am no longer
amazed at the level of cowboy coding in packages.
>When a PK is deleted, rather than ON DELETE CASCADE, it looks like any logical references to it are simply set to NULL.. <<
Done manually, instead of with ON DELETE SET NULL? You probably don't
remember pre_RDBMS databases, but they often had a bit flag at the
start of a record to mark it as active or deleted. The reason that
records were located by physical position within a file or pointers of
some kind. You would do explicit garbage collection every now and
then to re-claim the disk space and to re-build the pointer chains and
links. Another form of flag for this purpose was to set a link to NIL
by traversing down a chain to the leaf nodes, then recursively back up
the chain to the parent record.

Jun 27 '08 #5

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

Similar topics

8
5471
by: Travis Pupkin | last post by:
Hi, I use a WYSIWYG rich text editor on a few web sites for clients to manage their content, but a lot of them use word and paste into the box and end up with a lot of crappy code as a result. Has anyone created an ASP include that will clean up the word html and just leave the basic formatting intact? Thanks.
3
1821
by: CSN | last post by:
Every now and then my connection to my remote server will disconnect. If I was using the psql commandline, "ps" will show it's still running (after I log back on). Is there a way to get access to the running psql process again, or cause it to disconnect and close? I tried "kill" but it didn't do anything. TIA, CSN
1
1300
by: Doc | last post by:
I have a problem, I reinstalled my computer (upgraded to XP) and thought I had a save backup of my database, though now I am not able to open it anymore. I don't have any understanding of how it works, but found something of an orphaned database. Anybody has an answer that could help me? I am using Access 2002 Thanks, Bart
7
2241
by: Felix Kater | last post by:
Hi, when I need to execute a general clean-up procedure (inside of a function) just before the function returns -- how do I do that when there are several returns spread over the whole function? My first approach: Use "while(1)" and "break", however this doesn't work if there is another loop inside (since I can't break two loops at the same time):
0
1357
by: newspost2000 | last post by:
I have built a Domino Web Application. I am looking for a tool that will be able to scour my site and find all files that are orphaned. I have found a few tools on the web that can do this kind of thing however they ask for ftp information to your file server so that they can index everything on your file server and then compare that to everything that they have indexed from their web scour of your site and what ever files are left over...
7
6053
by: newspost2000 | last post by:
I have a golden list of urls to each and every file on our corporate website. This includes all webpages and file resources. I am looking for a tool whereby I can plug in the base url of our website and also plug in this golden list of urls and have the program figure out which files are orphaned and not linked to any other webpage on our site. Is anyone aware of a tool that will do this? Thanks
0
1008
by: skip | last post by:
Over the past couple days I've been trying to reduce the large number of orphaned wiki pages, deleting many, stitching many others back into the fabric. There are a bunch of orphaned PyCon-related pages, mostly subpages of PyCon2005 and PyCon2006. Would someone with PyCon-fu want to check them out and decide their fate? If so, visit http://wiki.python.org/moin/OrphanedPages and scroll down to the "P" section.
6
3295
by: Janette | last post by:
Hi, Can anyone tell me, if you were to open a connection to a database at the top of each ASP page in a website, for example like this <% dim dbconn set dbconn=server.createobject("ADODB.connection") dbconn.ConnectionString= "File name=c:\databaseconnection.udl"
25
3009
by: Koliber (js) | last post by:
sorry for my not perfect english i am really f&*ckin angry in this common pattern about dispose: ////////////////////////////////////////////////////////// Public class MyClass:IDisposable
0
8473
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8911
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8819
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8597
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
7428
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5692
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4222
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2048
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1806
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.