Project 2
eCommerce project
use onlineStore
db.customer.insertMany([
{cus_id:1001,"cus_fname":"Rohan","cus_lname":"Kumar","gender":"m","email_id":"[email protected]",Age:21,number:9586475014,"address":"N.H-8, Near Samarkha Crossing","city":"Anand","state":"Gujarat",member_id:10001,payment_id:3001},
{cus_id:1002,"cus_fname":"Mukesh","cus_lname":"Kumar","gender":"m","email_id":"[email protected]",Age:25,number:9685475231,"address":"Stock broker","city":"Mumbai","state":"Maharasht",member_id:10002,payment_id:3002},
{cus_id:1003,"cus_fname":"Akash","cus_lname":"Joshi","gender":"m","email_id":"[email protected]",Age:30,number:9685475456,"address":"Asa Ram Complex Chottu Ram","city":"Chowk","state":"Haryana",member_id:10001,payment_id:3003},
{cus_id:1004,"cus_fname":"Bhawana","cus_lname":"Joshi","gender":"f","email_id":"[email protected]",Age:23,number:6864795234,"address":"vill-anghuthi, post-bichpuri","city":"agra","state":"Uttar pradesh",member_id:10002,payment_id:3004}
]);
db.customer.find()
db.Mamber.insertMany([
{member_id:10001,"plan":"Normal",prise:350,"month":"1 Month"},
{member_id:10002,"plan":"Premium",prise:999,"month":"1 Year"}
]);
db.account.insertMany([
{payment_id:3001,cus_id:1001,Ac_number:3685446237952030,"BankName":"SBI"},
{payment_id:3002,cus_id:1002,Ac_number:4937515149549500,"BankName":"ICICI"},
{payment_id:3003,cus_id:1003,Ac_number:4808437630180080,"BankName":"HDFC"},
{payment_id:3004,cus_id:1004,Ac_number:6458526348154570,"BankName":"SBI"}
]);
db.product.insertMany([
{product_id:12001},
{_id:1,"category":"Fashion","type":"shoes",item:{pro_id:2001,"pro_name":"Bata shoes",prise:1000,cus_id:1001}},
{_id:2,"category":"Home","type":"Kitchen",item:{pro_id:2002,"pro_name":"Cookwareprise",prise:1500,cus_id:1003}},
{_id:3,"category":"Electronics","type":"Cameras",item:{pro_id:2003,"pro_name":"DSLR",prise:50000,cus_id:1004}},
{_id:4,"category":"Toys","type":"Sports & Fitness",item:{pro_id:2004,"pro_name":"Football",prise:800,cus_id:1002}}
]);
db.product.find({"item.cus_id":1001})
db.product.find({"item.cus_id":1002})
db.product.find({"item.cus_id":1003})
db.product.find({"item.cus_id":1004})
db.cart.insertMany([
{
cus_id:1001,
item:{pro_id:2001,"pro_name":"Bata shoes",prise:1000},
"date":"12-06-2022",
checkout:"payment done",
Discharge:"Order Book"
},{
cus_id:1002,
item:{pro_id:2002,"pro_name":"Cookwareprise",prise:1500},
"date":"06-11-2022",
checkout:"payment done",
Discharge:"Order Book"
},
{
cus_id:1004,
item:{pro_id:2003,"pro_name":"DSLR",prise:50000},
"date":"10-06-2022",
checkout:"payment Panding",
Discharge:"Waiting"
}
]);
db.orders.insertMany([
{orders_id:100001,cus_id:1001,pro_id:2001,seller_id:20011,"Delivery date":"15-06-2022"},
{orders_id:100002,cus_id:1002,pro_id:2002,seller_id:20012,"Delivery date":"08-11-2022"}
]);
db.seller.insertMany([
{seller_id:20011,"seller_fname":"Sohan","seller_lname":"Joshi",Age:32,"gender":"M","email_id":"[email protected]","ShopName":"Kitchen Collection",seller_number:7453156408,"address":"No 4, Jammu PS Katras","city":"Dhanbad","state":"Jharkhand"},
{seller_id:20012,"seller_fname":"Mukesh","seller_lname":"Mehta",Age:30,"gender":"M","email_id":"[email protected]","ShopName":"Jai sachidanand mobile store",seller_number:9658426160,"address":"Near Govt School, Manikyapur Village","city":"Ganjam","state":"Orissa"},
{seller_id:20013,"seller_fname":"Pooja","seller_lname":"Duhudi",Age:28,"gender":"F","email_id":"[email protected]","ShopName":"BIBA Latur",seller_number:7586482314,"address":"Deogam,budhamba,polasara","city":"Latur","state":"Maharashtra"},
{seller_id:20014,"seller_fname":"Alok","seller_lname":"Kumar",Age:42,"gender":"M","email_id":"[email protected]","ShopName":"Samsung SmartPlaza - Guru Maa Enterprises",seller_number:9585859696,"address":"Post Office-Bari, Landmark-Karshubai","city":"Ahmadnagar","state":"Maharashtra"}
]);
db.seller_product.insertMany([
{_id:1,
seller_id:20011,
"category":"Home Product",
"type":"Kitchen",
item:[{pro_id:2101,"pro_name":"Gas Stoves",prise:799},
{pro_id:2102,"pro_name":"Cookware",prise:999},
{pro_id:2103,"pro_name":"Water Bottle",prise:559},
{pro_id:2104,"pro_name":"Heavy Stone Mortar",prise:499}],
add_to_product_id:12001
},
{_id:2,
seller_id:20012,
"category":"Electronics",
"type":"Mobile",
item:[{pro_id:2201,"pro_name":" Samsung S22 5G",prise:47999},
{pro_id:2202,"pro_name":"Redmi A1",prise:9000},
{pro_id:2203,"pro_name":"OnePlus Nord CE 2",prise:18000},
{pro_id:2204,"pro_name":"iPhone X",prise:55000}],
add_to_product_id:12001
},
{_id:3,
seller_id:20013,
"category":"Fasion",
"type":"Men & Women",
item:[{pro_id:2301,"pro_name":"Women Sweatshirt with Hoodies",prise:599},
{pro_id:2302,"pro_name":"Women's synthetic Crew Neck Sweatshirt",prise:929},
{pro_id:2303,"pro_name":"Men Navy Round Neck Sweatshirte",prise:979},
{pro_id:2304,"pro_name":"Men's Solid Padded Jacket",prise:2579}],
add_to_product_id:12001
},
{_id:4,
seller_id:20014,
"category":"Electronics",
"type":"Tv & Cameras",
item:[{pro_id:2401,"pro_name":"Canon EOS 1500D 24.1 Digital SLR Camera",prise:36499},
{pro_id:2402,"pro_name":"Sony Z-E10 - new interchangeable-lens vlog camera",prise:62990},
{pro_id:2403,"pro_name":"Samsung 32 Inches",prise:13990},
{pro_id:2404,"pro_name":"MI 80 cm 32 inches 5A Series HD Ready Smart Android LED TV",prise:13499}],
add_to_product_id:12001
}
]);
db.admin.insertMany([
{admin_id:4001,"admin_fname":"Rhaul","admin_lname":"Shing",Age:25,"gender":"M","email_id":"[email protected]",admin_number:9685156408,"address":"anghuthi post-bichpuri","city":"Delhi","state":"Delhi"},
{admin_id:4002,"admin_fname":"Nikita","admin_lname":"Joshi",Age:30,"gender":"F","email_id":"[email protected]",admin_number:9685426160,"address":"Stock broker","city":"agra","state":"Uttar pradesh"},
{admin_id:4003,"admin_fname":"Amit","admin_lname":"Duhudi",Age:29,"gender":"M","email_id":"[email protected]",admin_number:9685482314,"address":" At. Post- Waranghushi","city":"Mumbai","state":"Maharashtra"},
{admin_id:4004,"admin_fname":"Pawan","admin_lname":"Kumar",Age:33,"gender":"M","email_id":"[email protected]",admin_number:9685859696,"address":"At. Po. Banshelki Tq. Udgir,Banshelki","city":"Anand","state":"Gujarat"}
]);
db.orders.aggregate({$count:"orders_id"});
db.customer.aggregate([{$group:{_id:"$city"}}]);