forked from Powerlearnproject/database-week-8-week8.2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.sql
39 lines (30 loc) · 1.48 KB
/
schema.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
INSERT INTO Residents (name, phone, email, password, location, rewardPoints) VALUES
('John Doe', '+254712345678', '[email protected]', '$2y$10$/3MhFbgpfefgSc7pIBjzyu7wSNEsU/U1fQWNQjGqSIkf9tvHX8QYq', 'Downtown', 100),
('Jane Smith', '+254799222999', '[email protected]', '$2y$10$/3MhFbgpfefgSc7pIBjzyu7wSNEsU/U1fQWNQjGqSIkf9tvHX8QYq', 'Uptown', 150);
INSERT INTO Buyers (contactPerson, phone, organizationName, productToSupply) VALUES
('Alice Johnson', '+255766666666', 'Green Plastics Ltd', 'Pellets'),
('Bob Williams', '+254733333389', 'EcoRecycling', 'Cans');
INSERT INTO Bins (binCode, location, status) VALUES
('BIN001', 'Downtown', 'full'),
('BIN002', 'Uptown', 'active');
INSERT INTO Trucks (numberPlate) VALUES
('KAA 123A'),
('KBB 456B');
INSERT INTO WasteCollection (truckID, binID, totalWeight) VALUES
(1, 1, 500.25),
(2, 2, 320.75);
INSERT INTO Sorting (wasteType, truckID, weight) VALUES
('Plastic Bottles', 1, 250.50),
('Cans', 2, 150.30);
INSERT INTO Machines (machineNumber, type) VALUES
('M001', 'Shredder'),
('M002', 'Compressor');
INSERT INTO Processing (machineID, wasteType, weightIn, weightOut) VALUES
(1, 'Plastic Bottles', 250.50, 220.40),
(2, 'Cans', 150.30, 140.20);
INSERT INTO Products (wasteType, unprocessedWeight, processedWeight) VALUES
('Pellets', 220.40, 210.00),
('Cans', 140.20, 135.00);
INSERT INTO Sales (productID, buyerID, weightAcquired, pricePerKg, productRemainder) VALUES
(1, 1, 200.00, 5.00, 10.00),
(2, 2, 130.00, 3.50, 5.00);