How to convert many-to-many relation form SQL to mongoDB colllection?
===

I have 3 table in SQL that have many-to-many relation.The first table "account" have 3 field (AccountId,UserName,Email).The second table "device" have 2 field (DeviceId and DeviceCode) and table "Association" have 4 field (AccountId,DeviceId,LastActivityDate,HasException)

How to convert them to mongoDB.
From suggestion of mongodb.org I embed  collection "Associaton" into device collection and account collection but the  field "LastAccessDate" always was updated every time when my system have new transaction. 

-Account collection:
{
  
  "UserName" : "xxx",
  "Email" : 1,
  
  "Association" : [{
      "DeviceId" : "4f45c4b73174ec818148d5c5",
      "LastActivityDate" : "Thu, 23 Feb 2012 11:44:19 GMT +07:00",
      "HasException" : false
    }, {
      "DeviceId" : ObjectId("4f45c5e93174ec818148d5c7"),
      "LastActivityDate" : "Thu, 23 Feb 2012 11:52:05 GMT +07:00",
      "Exception" : null
    }]
}

Device collection:
{
  
  
  "DeviceCode" : "abcjxhcbxkjcnxkcjhdiofjdojdlkdknd",
  "Associations" : [{
      "AccountId" : "34fdgfdy5676",
      "LastActivityDate" : "02/03/2012",
      "HasException" : false
    }, {
      "AccountId" : "34fdgfdy5dd676",
      "LastActivityDate" : "02/03/2012",
      "HasException" : true
    }],
 
}

 