Home » SQL & PL/SQL » SQL & PL/SQL » uniqueness
uniqueness [message #1135] Wed, 03 April 2002 15:26 Go to next message
tom oswald
Messages: 1
Registered: April 2002
Junior Member
Say you have a composite primary key consisting of three columns- res_date (reservation date), member_id, and title_id. member_id and title_id are also foreign keys. this intro to oracle book says all three are not null, which makes sense. however, it says res_date and member_id are also unique, but not title_id. can someone briefly explain why title_id is not unique (or why the other two are)? thank you.
Re: uniqueness [message #1183 is a reply to message #1135] Tue, 09 April 2002 06:13 Go to previous message
Ray B
Messages: 1
Registered: April 2002
Junior Member
Not knowing the makeup of the structure I would have to guess that it could be a few things. First, since dates are stored as date and time and when part of a key just the first two (res_date and member_id) will be unique. Second, check to see if member_id and title_id are unique in their referenced tables(unique indexes,etc) Third, is there a unique index with the first 2 fields listed and not the 3rd? Last, what book is this that says it? I would like to read up on it.
Previous Topic: %rowtype in a cursor
Next Topic: presentation on performance tuning
Goto Forum:
  


Current Time: Thu Apr 25 07:36:46 CDT 2024