Home » SQL & PL/SQL » SQL & PL/SQL » Indexes
Indexes [message #345489] Wed, 03 September 2008 16:32 Go to next message
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 #345490 is a reply to message #345489] Wed, 03 September 2008 16:34 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & follow posting guidelines as stated in URL above
Re: Indexes [message #345491 is a reply to message #345490] Wed, 03 September 2008 16:47 Go to previous messageGo to next message
neha_garg123
Messages: 7
Registered: July 2008
Junior Member
I dont understand what I didnt followed in the guideline.
Can you please highlight.

Thanks
Re: Indexes [message #345521 is a reply to message #345491] Wed, 03 September 2008 23:31 Go to previous messageGo to next message
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 Go to previous message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
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
Previous Topic: Help with date format picture ends ....error
Next Topic: Cut string and place in a separate Column
Goto Forum:
  


Current Time: Sat Dec 10 01:00:54 CST 2016

Total time taken to generate the page: 0.11048 seconds