Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Tables without any relationship needs FK index?

 
Rithanya Laxmi
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a list of tables without any relationships, since there is no referential integrity between the tables whether we can create any foreign key index for the tables ? or in this case primary key index will suffice? Please clarify.

Thanks
 
Roel De Nijs
Sheriff
Posts: 10763
148
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have tables without any relationships (e.g. Cat and Plane) which foreign keys would you create in these tables The only thing you can do is add a primary key constraint on the unique identifier of each table. And perhaps some (non-unique) indexes to improve performance when searching (and joining).
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!