Professional Web Applications Themes

many to many - MySQL

Can one add some extra data into the link table on a many to many join. Have a group table and a member table and a link table. Want to add a 'title' column but the only current table it could go in would be the link table. Ok, or no? TIA...

  1. #1

    Default many to many

    Can one add some extra data into the link table on a many to many join.

    Have a group table and a member table and a link table. Want to add a
    'title' column but the only current table it could go in would be the
    link table. Ok, or no?

    TIA

    user Guest

  2. #2

    Default Re: many to many

    user wrote: 

    Sure you could do that, if you want.



    --

    //Aho
    J.O. Guest

  3. #3

    Default Re: many to many

    On Fri, 11 May 2007 06:07:59 +0200, "J.O. Aho" <net>
    wrote:
     
    >
    >Sure you could do that, if you want.[/ref]

    I would add that from a design point of view, you have very often many
    to many tables that have this function (among others) even if they
    don't get the name directly. If you want to add some columns in your
    M2M table, maybe it's worth considering that it is more than a simple
    M2M table, and give it a proper name regarding what it contains.

    In your case, you could name it "title", for example. It is then,
    conceptually, more than a simple M2M table, but represents a whole
    concept within your model.

    Sometimes, you need only a M2M, with the 2 primary keys. it's then ok
    to call il M2MFooBar. But if it does something more, try to get a name
    for it, it might help you tidying your idea of what your DB
    represents.
    subtenante Guest

  4. #4

    Default Re: many to many

    Subtenante,

    Thanks for the thoughts. I have since determined that a member can have
    more than one title so I will be adding an additional table.

    Regards



    subtenante wrote:
     
    >>
    >>Sure you could do that, if you want.[/ref]
    >
    >
    > I would add that from a design point of view, you have very often many
    > to many tables that have this function (among others) even if they
    > don't get the name directly. If you want to add some columns in your
    > M2M table, maybe it's worth considering that it is more than a simple
    > M2M table, and give it a proper name regarding what it contains.
    >
    > In your case, you could name it "title", for example. It is then,
    > conceptually, more than a simple M2M table, but represents a whole
    > concept within your model.
    >
    > Sometimes, you need only a M2M, with the 2 primary keys. it's then ok
    > to call il M2MFooBar. But if it does something more, try to get a name
    > for it, it might help you tidying your idea of what your DB
    > represents.[/ref]
    user Guest

  5. #5

    Default Re: many to many

    J.O.

    Thanks


    J.O. Aho wrote:
     
    >
    >
    > Sure you could do that, if you want.
    >
    >
    >[/ref]
    user Guest

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139