HowdeeDoodee Posted July 1, 2007 Share Posted July 1, 2007 I have several full text indexed databases and some not full text. Does every database need a Primary key? Here is how a typical full text db is set up. Source INDEX 3 Lnum INDEX Topic FULLTEXT Subtopic FULLTEXT Theswords FULLTEXT Here is how a typical non-full text db is set up. Source INDEX 3 Lnum INDEX Topic INDEX Subtopic INDEX Theswords INDEX What is the purpose of primary key? Does adding a primary key enable the db to be searched more rapidly? Quote Link to comment https://forums.phpfreaks.com/topic/57909-solved-does-every-database-need-a-primary-key/ Share on other sites More sharing options...
fenway Posted July 1, 2007 Share Posted July 1, 2007 What does PK have to do will fulltext? And yes, for joins and most other things, PKs are essential... only in InnoDB under rare circumstances in an surrogate PK a bad idea. Quote Link to comment https://forums.phpfreaks.com/topic/57909-solved-does-every-database-need-a-primary-key/#findComment-287041 Share on other sites More sharing options...
HowdeeDoodee Posted July 2, 2007 Author Share Posted July 2, 2007 Thank you for the comment. What does the primary key do and does a primary key enable a db to be searched more rapidly? Quote Link to comment https://forums.phpfreaks.com/topic/57909-solved-does-every-database-need-a-primary-key/#findComment-287576 Share on other sites More sharing options...
bubblegum.anarchy Posted July 2, 2007 Share Posted July 2, 2007 A primary key identifies a record and indexing increases search times; primary keys are indexed. Quote Link to comment https://forums.phpfreaks.com/topic/57909-solved-does-every-database-need-a-primary-key/#findComment-287658 Share on other sites More sharing options...
Illusion Posted July 2, 2007 Share Posted July 2, 2007 and also you can not enter duplicate values in a primary key column. Quote Link to comment https://forums.phpfreaks.com/topic/57909-solved-does-every-database-need-a-primary-key/#findComment-287740 Share on other sites More sharing options...
HowdeeDoodee Posted July 2, 2007 Author Share Posted July 2, 2007 Thank you bubblegum and illusion. Quote Link to comment https://forums.phpfreaks.com/topic/57909-solved-does-every-database-need-a-primary-key/#findComment-287854 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.