RE: [PHP-DB] Design conundrum...
| From: | Kristian Duske | Date: | Sat, 23 Jun 2001 22:45:30 +0000 |
| Subject: | RE: [PHP-DB] Design conundrum... | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-9780@lists.php.net to get a copy of this message | ||
> With index in the third table, How would it be ?
>
> PRIMARY KEY (editor, category)
>
> or
>
> KEY (editor),
> KEY (category)
>
> What's the better (more efficient and correct) ??
I don't really know - I personally use a third id field as a primary key,
but if you want to use REPLACE to update / insert your records, you have to
use the PRIMARY KEY (editor, category) version - your the fields you mention
in your REPLACE statement must form a unique key.
Kristian