RelationModel: polnenje_v1.sql

File polnenje_v1.sql, 4.4 KB (added by 201084, 2 years ago)
Line 
1insert into users_table (username,email,name_user,password_user) values
2('andrejtodorovski5','andrejtodorovski5@gmail.com','Andrej Todorovski','andrejpassword'),
3('stefanmileski4','stefanmileski4@gmail.com','Stefan Mileski','stefanpassword'),
4('hristijansazdovski3','hristijansazdovski3@gmail.com','Hristijan Sazdovski','hristijanpassword'),
5('bojantrpeski2','bojantrpeski2@gmail.com','Bojan Trpeski','bojanpassword'),
6('darkosasanski1','darkosasanski1@gmail.com','Darko Sasanski','darkopassword'),
7('denicakjorvezir','denicakjorvezir@gmail.com','Denica Kjorvezir','denicapassword'),
8('deliveryman1','deliveryman1@gmail.com','Petko Petkovski','petko123'),
9('deliveryman2','deliveryman2@gmail.com','Marko Markovski','marko123'),
10('deliveryman3','deliveryman3@gmail.com','Petar Petrovski','petar123'),
11('warehouseman1','warehouseman1@gmail.com','Viktor Petrovski','viktor123'),
12('warehouseman2','warehouseman2@gmail.com','Vlatko Petrovski','vlatko123'),
13('warehouseman3','warehouseman3@gmail.com','Vido Petrovski','vido123'),
14('stefanmileski5','stefanmileski5@gmail.com','Stefan Mileski','stefanklient');
15
16insert into administrator (id_user) values (1),(2),(3);
17
18insert into client (id_user) values (13),(4),(5),(6);
19
20insert into delivery_man (id_user,employed_from) values (7,now()),(8,now()),(9,now());
21
22insert into warehouse (warehouse_location) values ('Radishani'),('Kozle'),('Vizbegovo');
23
24insert into warehouseman (id_user,employed_from,id_warehouse) values (10,now(),1),(11,now(),2),(12,now(),3);
25
26insert into part_manufacturer (pm_name,pm_location) values
27('Bosch','Germany'),
28('Continental','Belgium'),
29('Mahle','Netherlands');
30
31insert into car_manufacturer (cm_name,cm_country) values
32('Volkswagen','Germany'),
33('Fiat','Italy'),
34('Ford','USA'),
35('Toyota','Japan'),
36('Hyndai','Korea');
37
38insert into repair_shop (rs_name,rs_location,rs_phone_number) values
39('Toyota Service','Partizanska','070 123 456'),
40('Volkswagen Service','Ilinenska','075 876 543'),
41('Fiat Service','Vodnjanska','078 555 666'),
42('Hyndai Service','Boris Trajkovski','075 500 000');
43
44insert into car(in_production_since,in_production_till,car_type,id_car_manufacturer) values
45('2001-11-30','2002-11-30','Golf 4',1),
46('2003-11-30','2004-11-30','Punto',2),
47('2005-11-30','2006-11-30','Golf 5',1),
48('1999-11-30','2000-11-30','Fiesta',3),
49('1995-12-05','2001-05-10','Coupe',5);
50
51insert into car_sample(vin,year_of_production, engine_power, displacement, fuel_type, km_driven, ID_user, ID_car) values
52(1111,2008,65,1200,'Diesel',120000,4,4),
53(2222,2010,80,1400,'Diesel',150000,5,4),
54(3333,2016,65,1200,'Petrol/Gas',65000,6,2),
55(4444,1997,140,2000,'Petrol/Gas',185000,13,5);
56
57insert into part(part_name, id_part_manufacturer) values
58('Engine G4GF',1),
59('Wheel 20CM',2),
60('Shift 6GEARS',3),
61('Radio WITH AUX',1),
62('Rear Bumper FOR VW GOLF 4',2),
63('Headlight FOR PUNTO',3);
64
65insert into category(category_name) values ('Brakes'),('Cooling System'),('Electrical'),('Engine components'),('Exterior'),('Filters');
66
67insert into order_table(order_status,order_date,id_user) values
68('created',now(),4),
69('created',now(),5),
70('created',now(),6),
71('created',now(),13);
72
73insert into service_book (vin) values (1111),(2222),(3333),(4444);
74
75insert into delivery (delivery_status, delivery_address,id_user,id_order) values
76('in progress','Aerodrom',7,3),
77('finished','Pintija',8,1),
78('in progress','Kisela Voda',9,2),
79('in progress','Kozle',8,4);
80
81insert into price (amount, price_from, id_part) values
82(1000,now(),2),
83(2000,now(),3),
84(3000,now(),1),
85(1500,now(),4),
86(3500,now(),5),
87(300,now(),6);
88
89insert into repair (vin, id_repair_shop, id_service_book) values (1111,3,1),(2222,2,2),(3333,1,3),(4444, 2, 4);
90
91insert into review (review_rating, id_repair, id_user) values (10, 1, 4), (6, 2, 5), (8, 3, 6), (9, 4, 13);
92
93insert into part_is_from_category (id_part, id_category) values (5,5), (1,4), (6,5);
94
95insert into repair_shop_is_authorized_for_car_make (id_repair_shop, id_car_manufacturer) values (1,4),(2,1),(3,2),(4,5);
96
97insert into order_contains_part (id_order, id_part, quantity_order) values (1,3,1),(2,4,2),(3,1,2),(4,6,1);
98
99insert into part_is_in_stock_in_warehouse (id_part,id_warehouse,quantity_warehouse) values (1,2,100), (2,1,150), (3,1,50), (4,3,75),(5,1,30),(6,2,70);
100
101insert into part_is_appropriate_for_car (id_part, id_car) values (1,1),(1,2),(1,3),(2,1),(2,4),(2,5),(5,1),(4,1),(4,2),(4,3),(4,4),(4,5),(3,5),(6,2);