Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #1468

Re: Is it Faster to check first ?

From "Willie Moore" <williem@wmconsulting.com>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Is it Faster to check first ?
Date 2011-06-21 07:21 -0500
Organization Aioe.org NNTP Server
Message-ID <itq2d3$rv1$1@speranza.aioe.org> (permalink)
References <bfac7000-4dee-4585-b7c9-bacc882538b6@g12g2000yqd.googlegroups.com> <4dffc689$0$57114$c30e37c6@exi-reader.telstra.net> <cb68c2a1-2f55-4c05-b7b1-f05c6fbd75c8@f7g2000yqf.googlegroups.com>

Show all headers | View raw


Richard,

I use SQL server. I define my schema and SQL server enforces the referential 
integrity.

Regards,
Willie

"richard.townsendrose"  wrote in message 
news:cb68c2a1-2f55-4c05-b7b1-f05c6fbd75c8@f7g2000yqf.googlegroups.com...

Guys

In each of our tables defining people, jobs, groups, subjects, etc we
have a flag defining whether that entity has been referenced
elsewhere, and thus to retain referential integrity MUST not be
deleted.

So we have an "InUse" flag.

This means that whenever say a letter is written then must mark the
sender, receiver, job, subject, group etc as being used to prevent it
being deleted elsewhere by another user. we allow deletion and display
the status so users can see whats what. aty the start of a job, very
often several hundred likely people are added to the database, but as
the job progress's many of these are removed. hence the need for a
deletion utility, and that needs an "In Use" flag. indeed when a
database is setup, an option exists to import a previous projects
names [e.g. previously used sub-contractors etc], groups [viz standard
work packages etc], and subjects [viz standard filing system].

However, I like the idea of a conditional "Unused" index. it would be
a very small overhead for a compound index.

I must stress that we have never had any save speed complaints, but
now that we have a user running over a "slow connection" viz using the
web to connect we are looking at anything that might speed things up.

so the question is whether its quicker to test for whether the flag is
set, or just bash it in regardless.
to combine both validity and setting at the same time would be good.
it CAN happen that one  user deletes a person just as another start to
save it - so the validity checks then get invalidated - we had it once
on a hospital project some years ago.

what does everyone else do to preserve relational integrity ?

richard 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Is it Faster to check first ? "richard.townsendrose" <richard.townsendrose@gmail.com> - 2011-06-19 04:51 -0700
  Re: Is it Faster to check first ? "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> - 2011-06-20 02:00 +1000
  Re: Is it Faster to check first ? "Geoff Schaller" <geoffx@softwarexobjectives.com.au> - 2011-06-20 22:15 +0000
    Re: Is it Faster to check first ? "richard.townsendrose" <richard.townsendrose@gmail.com> - 2011-06-21 02:31 -0700
      Re: Is it Faster to check first ? "Willie Moore" <williem@wmconsulting.com> - 2011-06-21 07:21 -0500
      Re: Is it Faster to check first ? "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> - 2011-06-21 23:47 +1000
        Re: Is it Faster to check first ? "richard.townsendrose" <richard.townsendrose@gmail.com> - 2011-06-22 02:36 -0700
      Re: Is it Faster to check first ? "Geoff Schaller" <geoffx@softwarexobjectives.com.au> - 2011-06-22 22:26 +0000
        Re: Is it Faster to check first ? Mike Pitcher <mike_no_spam_please_@pamuk.demon.co.uk> - 2011-06-23 08:54 -0700
          Re: Is it Faster to check first ? "richard.townsendrose" <richard.townsendrose@gmail.com> - 2011-06-30 01:39 -0700

csiph-web