Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Indexes




On Jan 18, 2006, at 4:53 , Silas Justiniano wrote:

CREATE UNIQUE INDEX foo ON Intermediate(book_id, author_id);

You'll want this index for normalization.

CREATE UNIQUE INDEX bar ON Intermediate(book_id);
CREATE UNIQUE INDEX baz ON Intermediate(author_id);

You probably don't want these two indexes unless you want to have only one entry for each book, or one entry for each author. Many books have multiple authors and many authors write more than one book, so you probably don't want to restrict this.

Michael Glaesemann
grzm myrealbox com





  • References:

Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group