Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Oracle Miscellaneous > Re: Primary Key...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 9 Topic 6966 of 7280
Post > Topic >>

Re: Primary Keys and Valid_From / Valid_To

by Frank van Bortel <frank.van.bortel@[EMAIL PROTECTED] > Jun 24, 2008 at 09:52 PM

Hans Mayr wrote:
> Hello Thomas,
> 
> Thanks for your mail. But you did exactly what I wanted to avoid, you
> argued about a system for articles, prices and currencies. They are
> just an example for the datastructure I have and which can not be
> changed in my context. Just imagine that a certain product is not
> always available and if it is not available there is no price. Thus,
> in the example, I need the valid_to and I need to check if there is a
> valid from, valid to period when I enter something in t_orders. One
> could solve that differently, too. I know. But given a datastructure
> like the one I described above, which I have seen in many places, how
> does one organize that?
> 
> Best,
> 
> Hans

If an item is unavailable, QTY_IN_STOCK = 0. Has nothing to do
with ITEM_PRICE.

Rethink your model - you are reinventing relational databases
using triggers - it will not scale as much as the native
solution.

And I am worried about your opening mail, where you claim:
"Oracle will make sure that article_id and currency are unique.
And it will make data access on t_prices faster through
the associated index."

That is simply not true*) - explain why an index read, followed
by a table read would be faster than just a table read. Why
do you think the optimizer uses full table scans, and ignores
indexes so many times?

Try to understand Oracle; read the concepts manual, or
fine printed matter by Tom Kyte, Jonathan Lewis and others.

*) true as in universal - there are exceptions. Point to be
made is the misconception of Oracle as an RDBMS.
-- 

Regards,
Frank van Bortel
 




 9 Posts in Topic:
Primary Keys and Valid_From / Valid_To
Hans Mayr <mayr1972@[E  2008-06-24 03:36:41 
Re: Primary Keys and Valid_From / Valid_To
Thomas Olszewicki <Tho  2008-06-24 05:49:09 
Re: Primary Keys and Valid_From / Valid_To
Hans Mayr <mayr1972@[E  2008-06-24 07:34:53 
Re: Primary Keys and Valid_From / Valid_To
Frank van Bortel <fran  2008-06-24 21:52:15 
Re: Primary Keys and Valid_From / Valid_To
Thomas Olszewicki <Tho  2008-06-24 13:03:47 
Re: Primary Keys and Valid_From / Valid_To
Frank van Bortel <fran  2008-06-24 22:21:46 
Re: Primary Keys and Valid_From / Valid_To
Thomas Kellerer <FJIFA  2008-06-24 23:15:23 
Re: Primary Keys and Valid_From / Valid_To
Robert Klemme <shortcu  2008-06-25 07:50:10 
Re: Primary Keys and Valid_From / Valid_To
Hans Mayr <mayr1972@[E  2008-06-25 02:02:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 0:15:28 CST 2008.