Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2015
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. There are a few common ways for representing many-to-many relationships within structured SQL data, all of which will be detailed below:
  2.  
  3. - Using multiple fields of an on/off data type to store many “keys” in a single table
  4. - 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
  5. - 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
  6. - 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