Hi
I am building a database of users where each user has some normal details stored about them.
I would also like to store which languages the user knows.
I know that one way to do this would be to create a language table and then create a separate table that maps between languages and users. Would it be easier to use the SQL “set” type instead of creating an extra table for languages?
As a general rule, if you can enumerate all the possible/supported languages/values,
SETwill work. Otherwise I’d use the table, because going back andALTER TABLEing to add a new language isn’t a very good way to do things and will also probably require changes to the application(s) using theSET, whereas if you use a separate table it should Just Work toINSERTa new language row.And, language being what it is, I’d not want to assume I know every language beforehand.