Postingan

Lists For Loops - List

Gambar
   Lists  For Loops 1- Lists Toward the end of the previous mission, we worked with this table: track_name price currency rating_count_tot user_rating 0 Facebook 0.0 USD 2974676 3.5 1 Instagram 0.0 USD 2161558 4.5 2 Clash of Clans 0.0 USD 2130805 4.5 3 Temple Run 0.0 USD 1724546 4.5 4 Pandora - Music & Radio 0.0 USD 1126879 4.0 Data source: Mobile App Store data set (Ramanathan Perumal) Each value in the table is a data point. For instance, the first row has five data points: Facebook 0.0 USD 2974676 3.5 A collection of data points make up a data set. We can understand our entire table above as a collection of data points, so we call the entire table a data set. We can see that our data set has five rows and five columns. Typed out a sequence of data points and separated each with a comma: 'Facebook', 0.0, 'USD', 2974676, 3.5 Surrounded the sequence with brackets: ['Facebook', 0.0, 'USD', 2974676, 3.5] After we created the list, we stored it in the c...

Operator Pembanding MongoDB

Gambar
  "Operator Pembanding MongoDB" MongoDB, sebagai sistem basis data NoSQL, menyediakan berbagai operator pembanding yang dapat digunakan dalam permintaan (query) untuk membandingkan nilai dalam dokumen-dokumen yang disimpan. Berikut adalah beberapa jenis operator pembanding yang umum digunakan dalam MongoDB: 1. $eq : Sama dengan. 2. $ne : Tidak sama dengan. 3. $gt : Lebih besar dari. 4. $gte : Lebih besar dari atau sama dengan. 5. $lt : Lebih kecil dari. 6. $lte : Lebih kecil dari atau sama dengan. Contoh penggunaan: Atau bisa gunakan dibawah ini: db.products.insertMany([     { "_id" : 1, "name" : "xPhone", "price" : 799, "releaseDate": ISODate("2011-05-14"), "spec" : { "ram" : 4, "screen" : 6.5, "cpu" : 2.66 },"color":["white","black"],"storage":[64,128,256]},     { "_id" : 2, "name" : "xTablet", "price...