sql - Mysql SET reference Foreign Keys -



sql - Mysql SET reference Foreign Keys -

so know within mysql there set datatype can used hold 0 or more 1 string element within single column.

the thing have table called employees has column called languages , column contain set of languages employees knows. there languages table contains possible languages within scheme need employees languages set column reference ids of languages in languages table.

is possible or there improve way of tackling problem?

thanks

don't utilize set this. info type limited 64 elements (see documentation). there more 64 languages in world.

instead, create bona fide junction table, column employeeid , languageid (and appropriate foreign references employees , languages tables) gives ability to:

include knowledge of language ("reading", "conversational", "fluent", "native") include date when employee became knowledgeable @ level other info might relevant

also, set info type specific mysql, if ever decide alter underlying database, have create such junction table (or similar) anyway.

mysql sql foreign-keys set

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -