Re: database design method
Date: Mon, 18 Nov 2002 13:20:52 +0200
Message-ID: <3DD8CD14.4D3657A3_at_atbusiness.com>
Jan Hidders wrote:
> >
> >> > - I would suppose that the id's could be generated
> >> >each time the query was executed - what's the problem?
> >>
> >> If it is executed a lot you may run out of them.
> >
> >Surely if that same view (that generates - perhaps abstract -
> >identifiers) is queried many times, it represents each time
> >the values of the execution at that point of time. So if
> >I query it twice it makes no difference whether the
> >identifiers are the same or not, or what the result
> >of the query is.
> >
> >So if I say
> >
> > select * from cust_class
> > and get the answer {(1,1),(1,2),(2,3)}
> >
> >and re-execute it after 10 minutes
> > and get the answer {(1,1),(2,2),(2,3)}
> >
> >that would be perfectly correct because
> >it would just be the result of the query
> >and that's it.
> > Yes, what could also happen is: > > first answer: {(1,1),(1,2),(2,3)} > > second answer: {(2,1),(2,2),(1,3)} > > since a relation is a set and there is no fixed order in which the > identifiers are generated. This is theoretically a bit annoying; nothing has > changed in the database, you ask the same question, and yet you get a > different answer. Another more practical problem is that there may be > another view that (on the basis of this view) computes certain properties of > these groups like Avg_income(class_id, avg_inc) that will have computed > certain properties of these classes. If the identifiers change every time > you query the view the connection between this tables is lost.
Jan:
regards,
Lauri Pietarinen
Received on Mon Nov 18 2002 - 12:20:52 CET