March 10th, 2000, 08:46 PM
I am having trouble understanding when and where to use KEY/INDEX.
Can someone give me a good example of where I would and would NOT use it?
If I have a database full of books and prices which people are searching, is that a good place to put in a key?
March 13th, 2000, 06:10 PM
Does the "books" column have a complementary unique key column associated with it, e.g. "book_id" where you use an auto_increment integer or the ISBN to uniquely identify it? If that is the case then that column should be the primary key. If not, then you could make the "book" column the primary key if there would be no duplicate book names in the database (risky...) Suggest putting in a primary key column to uniquely identify each and every book and then use an INDEX on the book column to optimize search performance.