Groups | Search | Server Info | Login | Register


Groups > comp.databases > #89

Re: joining tables and the order changes

From Arthur Ward <art.ward@noreply.xx>
Newsgroups comp.databases
Subject Re: joining tables and the order changes
Date 2011-06-23 08:50 +0000
Organization Aioe.org NNTP Server
Message-ID <ituuo7$7cd$1@speranza.aioe.org> (permalink)
References <96356369-58eb-4a52-a72b-1687558871e1@e17g2000prj.googlegroups.com>

Show all headers | View raw


shawrie wrote:

> Hi
>
> I have 2 tables Dealsbasket and Product
>
> Deals Basket :
>
> DealNumber
> DealProduct
>
>
> Product :
>
> product code
> product description
>
> When i display records from deal basket for a specific deal number it
> displays the record fine. When i create a view and link the 2 tables
> by product code so i can display description the order of records
> change????
>
> How can i display the records in the dealsbasket in the order they
> were imported into the table and then display prod description as well
> with out that order changing.
>
> Im using sql server 2000

In the hope that this was a homework question, I'll just point out that
SQL databases don't have "records" they have rows, and rows are just
statements of fact.  Statements of fact have no associated order; there
is no concept of first fact or last fact or nth fact.  They are just
(presumably) true statements.  The system is allowed to do anything it
likes in the interests of speed, as long as it always gives you all the
facts you asked for.

SQL databases follow the Information Principle, which requires that all
the infromation content of the database is represented explicitly as
values of attributes of rows *and in NO OTHER WAY*. If one fact must
be distinguised from another in terms of the time (or sequence) at
which it became known, then the time (or sequence) must be part of the
fact. Once you have the sequence information you can use it to order
the facts when you finally report them.

Again in the hope this is a homework question, ask yourself, why was the
Information Principle invented?  Why is it a good thing, and not the
pain the backside it might seem at first?

HTH.

Art

Back to comp.databases | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

joining tables and the order changes shawrie <tourerukcom@googlemail.com> - 2011-06-22 07:44 -0700
  Re: joining tables and the order changes Ben Finney <bignose+hates-spam@benfinney.id.au> - 2011-06-23 07:47 +1000
  Re: joining tables and the order changes Arthur Ward <art.ward@noreply.xx> - 2011-06-23 08:50 +0000
    Re: joining tables and the order changes David Kerber <dkerber@WarrenRogersAssociates.invalid> - 2011-06-23 09:09 -0400
      Re: joining tables and the order changes Arthur Ward <art.ward@noreply.xx> - 2011-06-23 13:23 +0000
        Re: joining tables and the order changes David Kerber <dkerber@WarrenRogersAssociates.invalid> - 2011-06-23 14:35 -0400
    Re: joining tables and the order changes toledobythesea@yahoo.ca - 2011-06-24 10:40 -0700
      Re: joining tables and the order changes Arthur Ward <art.ward@noreply.xx> - 2011-06-25 12:33 +0000
        Re: joining tables and the order changes paul c <toledobythesea@yahoo.ca> - 2011-06-25 14:44 -0700
        Re: joining tables and the order changes paul c <toledobythesea@yahoo.ca> - 2011-06-25 14:53 -0700
          Re: joining tables and the order changes Lee Fesperman <firstsql@gmail.com> - 2011-07-04 00:39 -0700

csiph-web