
Originally Posted by
r937
yes, i do
okay, now consider this... you're preparing a list of articles (say, in response to a clickthrough on category or tag or whatever) and you want not only the slug but the date of last revision (or some other column from the articles table)
you'll have to do the join after all, and in that case, the id is more efficient as an index
Okay, so I'll counter with an ERD, and you can tell me what you think... 
Code:
SECTION -||----|<- SECTION_DIMENSION ->|------||- DIMENSION
DIMENSION -||-----|<- DIMENSION_SUBSECTION ->|-----||- SUBSECTION
SECTION_DIMENSION -||-------|<- ARTICLE_PLACEMENT
DIMENSION_SUBSECTION -||-------|<- ARTICLE_PLACEMENT
ARTICLE -||-------|<- ARTICLE_PLACEMENT
(BTW, I spent 2 weeks ultimately coming up with this Data Model, it meets all of my fairly complex Business Rules, and it has been tested and works as it should!!)
*IF* I chose to use "Natural Keys", it would save me joins above, and make junction tables like ARTICLE_PLACEMENT useful all by itself, because it would look like below which would be handy in building my Pretty URL...
Code:
legal sole-proprietorship when-a-sole-proprietor-gets-sued.php
I am currently pouring over my Data Model and debating the whole "Natural Key" versus "Derived Key" thing now.
But if I ever do use "Natural Keys", I still want an AutoIncrement ID in the field in the record, however I don't want to pollute a Junction Table with an "ID" because then it defeats a key purpose of "Natural Keys", which is to improve readability while reducing joins...
Not sure if that helps?
Debbie
Bookmarks