Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'd store the middle name in the first_name column. Like for example "Juan Martin" would be in the first_name columns and "Del Potro" in the last_name. Apart from the middle/first name incongruence that you may highlight, I believe that this design is not awfully bad and should serve in most situations.


If you used that as an address in emails it'd sound very awkward to include a middle name when someone doesn't usually go by it.


Many Americans have two word first names like “Sue Ellen” or “Mary Anna” as well as a middle name. Double last names are even more common.


why on earth would you, and the article writer for that matter, use a column named first_name for storing the middle names as well?

just call it name!

as I said above, the article goes to length about normal form, and skimps on the important part: the data model is a representation of the real world, and a first_name column with middle names inside is basically a straight up lie of what the column models and what data it contains.

there's not one way to represent names, there are application specific domain where generalities need to be more or less detailed, but the core aspect of it all is that the data model shouldn't lie about what it is that it's modelling.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: