Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use fashionStore;
- ******** חלק ה ***********
- db.worker.insert([
- {
- name:"A",
- number:1,
- id:"123",
- address:
- {
- country: "Israel",
- city: "Nazareth",
- postalCode: "A01"
- }
- },
- {
- name:"B",
- number:2,
- id:"1234",
- address:
- {
- country: "UnitedKingdom",
- city: "London",
- postalCode: "A02"
- }
- },
- {
- name:"C",
- number:3,
- id:"12345",
- address:
- {
- country: "Jordan",
- city: "Amman",
- postalCode: "A03"
- }
- },
- {
- name:"D",
- number:4,
- id:"123456",
- address:
- {
- country: "Germany",
- city: "hamburg",
- postalCode: "A04"
- }
- },
- {
- name:"E",
- number:5,
- id:"1234567",
- address:
- {
- country: "France",
- city: "Paris",
- postalCode: "A05"
- }
- },
- {
- name:"F",
- number:6,
- id:"12345678",
- address:
- {
- country: "United States",
- city: "Las Vegas",
- postalCode: "A06"
- }
- }])
- *********************************************************************************************
- ******************** חלק ח *************
- db.worker.update(
- { id:"123"},
- {
- $push:
- {
- address01:
- {
- country: "israelVIP",
- city: "NazarethVIP",
- postalCode:"A01"
- },
- address02:
- {
- country: "israelVIP02",
- city: "NazarethVIP02",
- postalCode:"A01"
- },
- address03:
- {
- country: "israelVIP03",
- city: "NazarethVIP03",
- postalCode:"A01"
- }
- }
- }
- )
- ------------------------------------------
- db.worker.update(
- { id:"1234"},
- {
- $push:
- {
- address01:
- {
- country: "UnitedKingdomlVIP",
- city: "LondonVIP",
- postalCode:"A02"
- },
- address02:
- {
- country: "UnitedKingdomlVIP02",
- city: "LondonVIP02",
- postalCode:"A02VIP"
- },
- address03:
- {
- country: "UnitedKingdomlVIP",
- city: "LondonVIP",
- postalCode:"A02VIPP"
- }
- }
- }
- )
- --------------------------------------------
- db.worker.update(
- { id:"12345"},
- {
- $push:
- {
- address01:
- {
- country: "jordanlVIP",
- city: "ammanVIP",
- postalCode:"A03"
- },
- address02:
- {
- country: "jordanlVIP02",
- city: "ammanVIP02",
- postalCode:"A03VIP"
- },
- address03:
- {
- country: "jordanVIP",
- city: "ammanVIP",
- postalCode:"A03VIPP"
- }
- }
- }
- )
- -------------------------------------------
- db.worker.update(
- { id:"123456"},
- {
- $push:
- {
- address01:
- {
- country: "germanylVIP",
- city: "hamburgVIP",
- postalCode:"A04"
- },
- address02:
- {
- country: "germanylVIP02",
- city: "hamburgVIP02",
- postalCode:"A04VIP"
- },
- address03:
- {
- country: "germanyVIP",
- city: "hamburgVIP",
- postalCode:"A04VIPP"
- }
- }
- }
- )
- ---------------------------------------
- db.worker.update(
- { id:"1234567"},
- {
- $push:
- {
- address01:
- {
- country: "francelVIP",
- city: "parisVIP",
- postalCode:"A06"
- },
- address02:
- {
- country: "francelVIP02",
- city: "parisVIP02",
- postalCode:"A06VIP"
- },
- address03:
- {
- country: "franceVIP",
- city: "parisVIP",
- postalCode:"A06VIPP"
- }
- }
- }
- )
- ------------------------------------
- db.worker.update(
- { id:"12345"},
- {
- $push:
- {
- address01:
- {
- country: "junitedStateslVIP",
- city: "lasVegasVIP",
- postalCode:"A07"
- },
- address02:
- {
- country: "unitedStateslVIP02",
- city: "lasVegasVIP02",
- postalCode:"A07VIP"
- },
- address03:
- {
- country: "unitedStatesVIP",
- city: "lasvegasVIP",
- postalCode:"A07VIPP"
- }
- }
- }
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement