What is the best way to design this? Basically, I want to avoid duplicates - but my question is, is it better to use more tables or have a small number of duplicate entries? Consider the following (sorry I can’t space it out or use tabs so I’ve separated the fields with a slash):
FirstName / LastName / Article / GroupName
Paul / McCartney
Paul / McCartney / and / Wings
/ / / Wings
Mike / McCartney /
Paul / Simon
Diana / Ross
Diana / Ross / and the / Supremes
/ / / The / Supremes
I have separated the Articles for sake of sorting and so I don’t have a silly printout of “Supremes (The)”.
So, is it better to have one table for each of FirstName LastName and Article GroupName (together) - in order to maintain the integrity of a single “Paul” entry? That way I could use “unique” in the database - but it seems like an excessive amount of tables. Or should I make one database with the above layout and handle duplicates with an “if” “where” there is a match for more than 1 field (ie if Paul McCartney is entered that’s a duplicate - but you can still enter Paul Simon.)
I would like the form to display the above 4 fields.
your slashes are really confusing
or maybe it’s the “article” column that’s confusing me
how would you classify Stevie Ray Vaughn?
i would use only one table, and only one column for the name
don’t bother splitting into firstname,lastname, etc.
AWESOME choice of example :D:tup:[/ot]
Sorry, about the slashes but this input tool won’t let me do this:
I would put Stevie Ray under first name because the whole point of this is to have a search/sort by artist name and/or group - so you would never want to sort by middle name.
sure it will
[B][COLOR="Red"]FirstName LastName Article GroupName[/COLOR][/B]
Paul McCartney and Wings
Diana Ross and the Supremes
Oops! Sorry, I see it - if you hit “Advanced” - thanks.
FirstName LastName Article GroupName[/COLOR]
Paul McCartney and Wings
Diana Ross and The Supremes
Stevie Ray Vaughan
Thanks but there’s no “tab”??? - obviously you did it inside “Code:”
…and back to my question, using one table and one column won’t allow proper sorting and you’ll get that stupid “The” list with a zillion groups starting with “The” who are then in no order at all.
no, no tabs, just the right number of spaces
as for sorting on titles that begin with The, there’s a simple way around this issue – http://www.sitepoint.com/forums/showthread.php?t=422393
Im guessing going the one table one column idea like suggested would be the best idea, because how would you handle the band. ‘The Crazy World Of Arthur Brown’?
There is just to many possibilities that you would have to cover, going down the path you currently are.