Indexes [message #345489] |
Wed, 03 September 2008 16:32  |
neha_garg123
Messages: 7 Registered: July 2008
|
Junior Member |
|
|
Hi ,
I have two tables in Oracle 10g
Table Customer
Table Address
Table customer contains the customer Id and customer name
Table Address contains the customer id and address
Lets say few of the customers in customer table have addresses in the address in address table. But all the address have a corresponding customer.
In other words the cardinality is 1:0..N
Now would it help in creating the binary index on customer id column, if i plan to join these tables on the customer id.
There is a Pk on customer id in the customer table and address id in the address table.
Please help.
Thanks
|
|
|
|
|
Re: Indexes [message #345521 is a reply to message #345491] |
Wed, 03 September 2008 23:31   |
rajatratewal
Messages: 507 Registered: March 2008 Location: INDIA
|
Senior Member |
|
|
Do you have multiple entries in Address table for a CustomerId.
Then you must be having foreign key index on the Address table.
Foreign key must be indexed when in your application if you modify the primary key of referenced table regularly.
But that's a bad design.
i don't understand the problem properly because you have not posted a testcase and what problem you are getting.
To get more clear results please post what you have tried.
and what exactly you are looking for.
Always post a Test case.
Test Case
Regards,
Rajat
[Updated on: Wed, 03 September 2008 23:36] Report message to a moderator
|
|
|
Re: Indexes [message #345534 is a reply to message #345489] |
Thu, 04 September 2008 00:49  |
 |
Michel Cadot
Messages: 68733 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Quote: | would it help in creating the binary index on customer id column, if i plan to join these tables on the customer id.
|
Yes it may help for the queries you didn't post and it may also help for the foreign you should have on address table.
Regards
Michel
|
|
|