RE: [PHP-DB] Design conundrum...

2001-06-23 Thread Kristian Duske
The problem involves 2 tables, one of editors and one of categories, both have unique ID numbers. Each editor can have authority over an arbitrary number of categories, and conversely, each category can have an arbitrary number of editors. So what is the best way to represent this in the

Re: [PHP-DB] Design conundrum...

2001-06-23 Thread Antonio Mármol Albert
El sábado 23 de junio de 2001 (13:52), Kristian Duske escribió: The problem involves 2 tables, one of editors and one of categories, both have unique ID numbers. Each editor can have authority over an arbitrary number of categories, and conversely, each category can have an arbitrary

Re: [PHP-DB] Design conundrum...

2001-06-23 Thread Stephen van Egmond
Antonio M?rmol Albert ([EMAIL PROTECTED]) wrote: With index in the third table, How would it be ? It depends on the dynamics of the application. 1) If you have to ask what cateogories does the editor edit?, you create an index on editor. 2) If you have toa sk what editors does this category

RE: [PHP-DB] Design conundrum...

2001-06-23 Thread Kristian Duske
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