Advertisement
amjadArabia

Untitled

Sep 17th, 2020
3,654
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GDB 4.06 KB | None | 0 0
  1. use fashionStore;
  2. ********   חלק ה   ***********
  3. db.worker.insert([
  4.     {
  5.     name:"A",
  6.     number:1,
  7.     id:"123",
  8.     address:
  9.         {
  10.             country: "Israel",
  11.             city: "Nazareth",
  12.             postalCode: "A01"
  13.         }
  14.     },
  15.     {
  16.     name:"B",
  17.     number:2,
  18.     id:"1234",
  19.     address:
  20.         {
  21.             country: "UnitedKingdom",
  22.             city: "London",
  23.             postalCode: "A02"
  24.         }
  25.    
  26.     },
  27.     {
  28.     name:"C",
  29.     number:3,
  30.     id:"12345",
  31.     address:
  32.         {
  33.             country: "Jordan",
  34.             city: "Amman",
  35.             postalCode: "A03"
  36.         }
  37.    
  38.     },
  39.     {
  40.     name:"D",
  41.     number:4,
  42.     id:"123456",
  43.     address:
  44.         {
  45.             country: "Germany",
  46.             city: "hamburg",
  47.             postalCode: "A04"
  48.         }
  49.     },
  50.     {
  51.     name:"E",
  52.     number:5,
  53.     id:"1234567",
  54.     address:
  55.         {
  56.             country: "France",
  57.             city: "Paris",
  58.             postalCode: "A05"
  59.         }
  60.     },
  61.     {
  62.     name:"F",
  63.     number:6,
  64.     id:"12345678",
  65.     address:
  66.         {
  67.             country: "United States",
  68.             city: "Las Vegas",
  69.             postalCode: "A06"
  70.         }
  71.     }])
  72.  
  73. *********************************************************************************************
  74.  
  75. ******************** חלק ח *************
  76. db.worker.update(
  77. { id:"123"},
  78.   {
  79.     $push:
  80.     {
  81.        address01:
  82.        {
  83.          country: "israelVIP",
  84.          city: "NazarethVIP",
  85.          postalCode:"A01"
  86.        },
  87.        address02:
  88.        {
  89.          country: "israelVIP02",
  90.          city: "NazarethVIP02",
  91.          postalCode:"A01"
  92.        },
  93.        address03:
  94.        {
  95.          country: "israelVIP03",
  96.          city: "NazarethVIP03",
  97.          postalCode:"A01"
  98.        }
  99.      }
  100.   }
  101. )
  102. ------------------------------------------
  103. db.worker.update(
  104. { id:"1234"},
  105.   {
  106.     $push:
  107.     {
  108.        address01:
  109.        {
  110.          country: "UnitedKingdomlVIP",
  111.          city: "LondonVIP",
  112.          postalCode:"A02"
  113.        },
  114.        address02:
  115.        {
  116.          country: "UnitedKingdomlVIP02",
  117.          city: "LondonVIP02",
  118.          postalCode:"A02VIP"
  119.        },
  120.        address03:
  121.        {
  122.          country: "UnitedKingdomlVIP",
  123.          city: "LondonVIP",
  124.          postalCode:"A02VIPP"
  125.        }
  126.      }
  127.   }
  128. )
  129. --------------------------------------------
  130. db.worker.update(
  131. { id:"12345"},
  132.   {
  133.     $push:
  134.     {
  135.        address01:
  136.        {
  137.          country: "jordanlVIP",
  138.          city: "ammanVIP",
  139.          postalCode:"A03"
  140.        },
  141.        address02:
  142.        {
  143.          country: "jordanlVIP02",
  144.          city: "ammanVIP02",
  145.          postalCode:"A03VIP"
  146.        },
  147.        address03:
  148.        {
  149.          country: "jordanVIP",
  150.          city: "ammanVIP",
  151.          postalCode:"A03VIPP"
  152.        }
  153.      }
  154.   }
  155. )
  156. -------------------------------------------
  157. db.worker.update(
  158. { id:"123456"},
  159.   {
  160.     $push:
  161.     {
  162.        address01:
  163.        {
  164.          country: "germanylVIP",
  165.          city: "hamburgVIP",
  166.          postalCode:"A04"
  167.        },
  168.        address02:
  169.        {
  170.          country: "germanylVIP02",
  171.          city: "hamburgVIP02",
  172.          postalCode:"A04VIP"
  173.        },
  174.        address03:
  175.        {
  176.          country: "germanyVIP",
  177.          city: "hamburgVIP",
  178.          postalCode:"A04VIPP"
  179.        }
  180.      }
  181.   }
  182. )
  183. ---------------------------------------
  184.  
  185. db.worker.update(
  186. { id:"1234567"},
  187.   {
  188.     $push:
  189.     {
  190.        address01:
  191.        {
  192.          country: "francelVIP",
  193.          city: "parisVIP",
  194.          postalCode:"A06"
  195.        },
  196.        address02:
  197.        {
  198.          country: "francelVIP02",
  199.          city: "parisVIP02",
  200.          postalCode:"A06VIP"
  201.        },
  202.        address03:
  203.        {
  204.          country: "franceVIP",
  205.          city: "parisVIP",
  206.          postalCode:"A06VIPP"
  207.        }
  208.      }
  209.   }
  210. )
  211. ------------------------------------
  212. db.worker.update(
  213. { id:"12345"},
  214.   {
  215.     $push:
  216.     {
  217.        address01:
  218.        {
  219.          country: "junitedStateslVIP",
  220.          city: "lasVegasVIP",
  221.          postalCode:"A07"
  222.        },
  223.        address02:
  224.        {
  225.          country: "unitedStateslVIP02",
  226.          city: "lasVegasVIP02",
  227.          postalCode:"A07VIP"
  228.        },
  229.        address03:
  230.        {
  231.          country: "unitedStatesVIP",
  232.          city: "lasvegasVIP",
  233.          postalCode:"A07VIPP"
  234.        }
  235.      }
  236.   }
  237. )  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement