Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- There are a few common ways for representing many-to-many relationships within structured SQL data, all of which will be detailed below:
- - Using multiple fields of an on/off data type to store many “keys” in a single table
- - Using the INT, BIGINT, or SET data type (or equivalent in other RDBMS) to store a fixed number of key flags in a single table field
- - Using a CHAR string having one byte of storage per key needed, with the string acting as one long imploded array in a single table field
- - Using a relationship, or mapping, table, like the one in figure C, to store one or more keys related to an entity
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement