MongoDB Studio 3T Practice Set Using Tweets.json Dataset | Realcode4you
- realcode4you
- May 25, 2023
- 3 min read
Install MongoDB and Studio 3T on your computer, create a new database with a name and import 'Tweets.json' (available on iLearn) as a collection. Then complete the following exercises.

Exercise
1. Insert 2 new Tweets to the collection.
2. Write a MongoDB query that returns all the Tweets.
3. Write a MongoDB query to find one of your Tweets with user’s name: "user 30".
4. Update two Tweets to have two tags called “My first tag” and “My second tag” respectively. Show two ways to do this. Do the first one using update() and do the second one using save(). Hint: for save(), you might want to query the object, store it in a variable first; then update it and save the update.
5. Write a MongoDB query to retrieve all documents from the Tweets collection where user name equals either "user 30" or "user 40".
6. Write a MongoDB query to retrieve all documents from the Tweets collection where user screen_name is "Twitter User" and user location is "Internet". (Specify AND Conditions)
7. Write a MongoDB query to retrieve all documents from the Tweets collection where user screen_name is "Twitter User" or user url is "user URL". (Specify OR Conditions)
8. Write a MongoDB query to retrieve all documents from the Tweets collection where user id is not 224499494502
Solution
1. Insert 2 new Tweets to the collection.
A 1.
Solution 1:
//Tweet 1
db.tweets.insert(
{
"created_at": "Thu Apr 06 15:24:15 +0000 2020",
"id_str": "1850006245121695744",
"text": "Have a nice day",
"user": {
"id": NumberLong(2244456599494501),
"name": "user 01",
"screen_name": "Twitter User",
"location": "Internet",
"url": "user URL",
"description": "user description"
},
"place": {
},
"entities": {
"hashtags": [
],
"urls": [{
"url": "twt url sample",
"unwound": {
"url": "url sample",
"title": "web page title"
}
}],
"user_mentions": [
]
}
})//Tweet 2
db.tweets.insert(
{
"created_at": "Thu Apr 06 15:24:15 +0000 2020",
"id_str": "1850006245121695744",
"text": "Good Morning",
"user": {
"id": NumberLong(2244456599494501),
"name": "user 01",
"screen_name": "Twitter User",
"location": "Internet",
"url": "user URL",
"description": "user description"
},
"place": {
},
"entities": {
"hashtags": [
],
"urls": [{
"url": "twt url sample",
"unwound": {
"url": "url sample",
"title": "web page title"
}
}],
"user_mentions": [
]
}
})Solution 2:
db.tweets.insert(
[{
"created_at": "Thu Apr 06 15:24:15 +0000 2020",
"id_str": "1850006245121695744",
"text": "Hi",
"user": {
"id": 2244456599494501,
"name": "user 01",
"screen_name": "Twitter User",
"location": "Internet",
"url": "user URL",
"description": "user description"
},
"place": {
},
"entities": {
"hashtags": [
],
"urls": [{
"url": "twt url sample",
"unwound": {
"url": "url sample",
"title": "web page title"
}
}],
"user_mentions": [
]
}
},
{
"created_at": "Thu Apr 06 15:24:17 +0000 2020",
"id_str": "8510006245121695744",
"text": "Welcome",
"user": {
"id": 224499494503,
"name": "user 03",
"screen_name": "Twitter User",
"location": "Internet",
"url": "user URL",
"description": "user description"
},
"place": {
},
"entities": {
"hashtags": [
],
"urls": [{
"url": "twt url sample",
"unwound": {
"url": "url sample",
"title": "web page title"
}
}],
"user_mentions": [
]
}
}
]
)
2. Write a MongoDB query that returns all the Tweets.
db.Tweets.find() 3. Write a MongoDB query to find one of your Tweets with user’s name: "user 30".
db.Tweets.findOne({"user.name":"user 30"})4. Update two Tweets to have two tags called “My first tag” and “My second tag” respectively. Show two ways to do this. Do the first one using update() and do the second one using save(). Hint: for save(), you might want to query the object, store it in a variable first; then update it and save the update.
Solution 1 (update ()):
db.Tweets.update({"user.name":"user 30"}, {$set:{"tag":"My first tag"}})
db.Tweets.update({"user.name":"user 40"}, {$set:{"tag":"My second tag"}}) Solution 2 (save ()):
var tweet_user30 = db.Tweets.findOne({"user.name":"user 30"})
tweet_user30["tag"] = "My first tag"
db.Tweets.save(tweet_user30)
var tweet_user40 = db.Tweets.findOne({"user.name":"user 40"})
tweet_user40["tag"] = "My second tag"
db.Tweets.save(tweet_user40)5. Write a MongoDB query to retrieve all documents from the Tweets collection where user name equals either "user 30" or "user 40".
db.Tweets.find({"user.name":{ $in: [ "user 30", "user 40" ] } })6. Write a MongoDB query to retrieve all documents from the Tweets collection where user screen_name is "Twitter User" and user location is "Internet". (Specify AND Conditions)
db.Tweets.find({$and: [{"user.screen_name": "Twitter User"}, {"user.location":"Internet"}]})7. Write a MongoDB query to retrieve all documents from the Tweets collection where user screen_name is "Twitter User" or user url is "user URL". (Specify OR Conditions)
db.Tweets.find({ $or: [{"user.screen_name": "Twitter User"}, {"user.url":"user URL"}]})8. Write a MongoDB query to retrieve all documents from the Tweets collection where user id is not 224499494502.
Solution 1:
db.Tweets.find({"user.id":{$ne:224499494502}})Solution 2:
db.Tweets.find({"user.id":{$not:{$eq:224499494502}}})


Việc theo dõi chuỗi kết quả thường cần dữ liệu đầy đủ để nhận ra sự thay đổi giữa các phiên chơi. Những game như tài xỉu, casino hay slot đều có cách hiển thị riêng nên việc tổng hợp thông tin là cần thiết. Khi tham khảo qua https://www.sportsimportance.in.net/, dữ liệu được trình bày theo hướng dễ quan sát nên việc phân tích kết quả trở nên rõ hơn. Điều này giúp người dùng nắm được diễn biến khi tham gia nhiều dạng game khác nhau. Việc có thêm nguồn tham khảo giúp quá trình theo dõi trở nên chủ động hơn.
Kho trò chơi thường là phần thể hiện rõ mức độ đầu tư của một nền tảng trong dài hạn. Việc tích hợp nhiều danh mục trong cùng hệ thống giúp hay88 duy trì sự đa dạng mà không làm rời rạc cấu trúc chung, bao gồm casino trực tuyến, thể thao, nổ hũ và bắn cá. Các nhóm này được phân bổ theo từng lớp nội dung nên không bị chồng chéo trong quá trình vận hành. Khi kết hợp với nền tảng hoạt động từ năm 2012 và giấy phép PAGCOR, hệ thống giữ được sự ổn định thay vì mở rộng thiếu kiểm soát. Điều này cho thấy hướng phát triển được xây dựng theo chiều sâu hơn…
Trước khi thử mình thường đọc hướng dẫn để tránh thao tác sai, nhất là phần đăng ký và nạp tiền. Khi làm theo từng bước thì thấy quy trình khá ngắn, không cần xác nhận nhiều lần. Trong quá trình đó, 123b hiển thị rõ từng bước nên mình hoàn tất nhanh rồi chuyển sang chọn game ngay sau đó. Mình thử qua casino rồi đổi sang slot, sau đó quay lại thể thao mà không bị gián đoạn. Việc các bước nối liền nhau giúp mình không phải dừng lại giữa chừng để xử lý lại từ đầu.
Một nền tảng mới xuất hiện đúng thời điểm thường dễ tạo được sức hút ban đầu. Khi thị trường giải trí trực tuyến tại châu Á đang tăng mạnh, việc ra mắt vào cuối 2025 giúp hệ thống nhanh chóng tiếp cận người dùng. Trong bối cảnh đó, C168 ghi nhận hơn 700.000 tài khoản đăng ký nhờ cung cấp nhiều nội dung trong cùng một môi trường, từ thể thao đến casino và các game giải trí. Lượng người dùng tăng nhanh cho thấy khả năng tận dụng giai đoạn phát triển của thị trường. Điều này giúp nền tảng mở rộng quy mô trong thời gian ngắn.
Mình biết tới Sunwin20 khi đang tìm kiếm thông tin nên ghé vào xem thử. Mình chỉ xem qua bố cục và cách phân chia nội dung. Nhìn chung, nội dung được sắp xếp khá gọn gàng.