Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Counting propositions

Re: Counting propositions

From: x <x-false_at_yahoo.com>
Date: Mon, 21 Jun 2004 18:54:02 +0300
Message-ID: <40d70396$1@post.usenet.com>

"Tony" <andrewst_at_onetel.net.uk> wrote in message news:c0e3f26e.0406181117.4941b8f6_at_posting.google.com...
> >
> > > > You see, there might be a relational database that has no named
> > > > relation/relvar that (directly) assert employment.
> > >
> > > A badly designed, and probably un-normalised, database I would suggest
> > > ;-)
> >
> > Well, you cannot always choose the design :-)
>
> ... in which case, maybe you can't get useful information from it.

If the boss tells you to get that information, you cannot answer *maybe*. If the relation that assert employment is not a named relation, you can name it :-)

> > Why unnormalized ?

>
> Because you apparently have no table in which emp_id is unique, and so
> nowhere for a fact about an employee to be stored once and only once.

So what. Who said there must be such a table in a normalized design. You don't store employees. Remember ? You only talk about them. :-)

> You certainly can count emp_ids. Or you can count whole propositions, > if you know that those propositions have a one-to-one correspondence.

If I can count the emp_ids, why bother counting the propositions ?

> > > But, for every table, "select count(*)" provides useful information -
> > > provided you understand what the table means.
> >
> > I just showed you that you don't need to count the propositions for
counting
> > the employees. :-)
> > You only need to count the Emp_IDs ... :-)

>
> ... the emp_ids in that table yes - which amounts to the same thing,
> by definition.  It would be no good counting the emp_ids in a table
> that didn't have propositions about EVERY employee - e.g. if not all
> employees are assigned to projects, then counting the emp_ids in the
> assignment table would tell you how many employees are assigned to
> projects, not how many employees there are period.

I just count the Emp_IDs in the active domain for Emp_IDs. This ensure that I count EVERY employee :-)

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Received on Mon Jun 21 2004 - 10:54:02 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US