source: scripts/polnenje.sql

Last change on this file was cc5ce51, checked in by todstef <todorovskistefan2@…>, 18 months ago

Commit scripts

  • Property mode set to 100644
File size: 7.7 KB
Line 
1insert into project.roles (role_id, role_description, role_name) values
2(default, 'Basic user', 'User'),
3(default, 'Administrator', 'Administrator');
4
5insert into project.users (user_id, user_username, user_password, user_name, user_surname, user_picture_url, user_email, user_phone_number, role_id) values
6(default, 'stefanTodorovski2', 'password1', 'Stefan', 'Todorovski', null, 'todorovskistefan@gmail.com', '072300300', 1),
7(default, 'katerinaSmilevska', 'password2', 'Katerina', 'Smilevska', null, 'smilevskakaterina@gmail.com', '070322000', 1),
8(default, 'mihailPetrovski12', 'password3', 'Mihail', 'Petrovski', null, 'petrovskimihail@gmail.com', '078888932', 1),
9(default, 'jovanaTodorov2232', 'password4', 'Jovana', 'Todorov', null, 'todorovjovana@yahoo.com', '079234986', 1),
10(default, 'jovantrajkoski420', 'password5', 'Jovan', 'Trajkoski', null, 'trajkoskijovan@gmail.com', '077128432', 1),
11(default, 'admin', 'admin', 'Admin', 'Admin', null, 'admin.admin@gmail.com', '078345123', 2);
12
13insert into project.manufacturers (manufacturer_id, manufacturer_name, manufacturer_country ) values
14(default, 'Samsung', 'South Korea'),
15(default, 'Apple', 'USA'),
16(default, 'Sony', 'Japan'),
17(default, 'North Edge', 'UK'),
18(default, 'Dell', 'USA'),
19(default, 'HP', 'USA'),
20(default, 'Philips', 'Netherlands'),
21(default, 'Google', 'USA');
22
23insert into project.Categories (category_id, category_name) values
24(default, 'Mobile phones and smartwatches'),
25(default, 'TVs and equipment'),
26(default, 'Laptops and equipment');
27
28insert into project.categories (parent_category_id, category_name)
29select
30 (select category_id from project.Categories where category_name = 'Mobile phones and smartwatches'),
31 v.cn
32from
33 (values ('Mobile phones'), ('Smartwatches')) as v (cn)
34;
35
36insert into project.categories (parent_category_id, category_name)
37select
38 (select category_id from project.Categories where category_name = 'TVs and equipment') ,
39 v.cn
40from
41 (values ('TVs')) as v (cn)
42;
43
44insert into project.categories (parent_category_id, category_name)
45select
46 (select category_id from project.Categories where category_name = 'Laptops and equipment') ,
47 v.cn
48from
49 (values ('Laptops')) as v (cn)
50;
51
52insert into project.productCharacteristics (characteristic_id, characteristic_description) values
53(default, 'Apple phone 1'),
54(default, 'Apple phone 2'),
55(default, 'Samsung phone 1'),
56(default, 'Samsung phone 2'),
57(default, 'Samsung phone 3'),
58(default, 'Apple watch 1'),
59(default, 'Apple watch 2'),
60(default, 'Samsung watch 1'),
61(default, 'Samsung watch 2'),
62(default, 'North Edge watch 1'),
63(DEFAULT, 'North Edge watch 2'),
64(default, 'Sony TV 1'),
65(default, 'Sony TV 1'),
66(default, 'Philips TV 1'),
67(default, 'Philips TV 2'),
68(default, 'Dell Laptop 1'),
69(default, 'Dell Laptop 2'),
70(default, 'HP Laptop 1'),
71(default, 'HP Laptop 2'),
72(default, 'Google phone');
73
74insert into project.products (product_id, product_name, post_date, manufacturer_id, category_id, characteristic_id) values
75(default, 'iPhone 13', '2020-11-20', 2, 1, 1),
76(default, 'iPhone 14', '2022-09-24', 2, 1, 2),
77(default, 'Galaxy S22', '2021-07-03', 1, 1, 3),
78(default, 'Galaxy A33', '2022-10-13', 1, 1, 4),
79(default, 'Galaxy A50', '2022-05-06', 1, 1, 5),
80(default, 'Watch SE2', '2019-08-30', 2, 1, 6),
81(default, 'Watch Series 7', '2018-12-04', 2, 1, 7),
82(default, 'Galaxy Watch 4', '2020-12-05', 1, 1, 8),
83(default, 'Galaxy Watch 3', '2021-02-13', 1, 1, 9),
84(default, 'Healthcare Watch', '2021-04-16', 4, 1, 10),
85(default, 'GAVIA watch', '2018-04-12', 4, 1, 11),
86(default, 'BRAVIA XR 65', '2022-01-13', 3, 2, 12),
87(default, 'BRAVIA XR 75', '2021-02-10', 3, 2, 13),
88(default , '4K UHD LED', '2020-06-13', 7, 2, 14),
89(default, 'Ultra Slim UltraHD Smart LED', '2019-10-10', 7, 2, 15),
90(default, 'Vostro 3510', '2021-02-19', 5, 3, 16),
91(default, 'Latitude 5530', '2019-11-12', 5, 3, 17),
92(default, 'Spectre x360', '2022-05-17', 6, 3, 18),
93(default, 'Chromebook x2', '2022-12-13', 6, 3, 19),
94(default, 'Pixel 6a', '2022-12-27', 8, 1, 20);
95
96insert into project.userFavourites (user_favourite_id, user_id, product_id) values
97(default, 1, 8),
98(default, 1, 5),
99(default, 2, 4),
100(default, 3, 7),
101(default, 3, 9),
102(default, 4, 14),
103(default, 2, 18),
104(default, 1, 13),
105(default, 1, 18),
106(default, 4, 3),
107(default, 3, 10),
108(default, 4, 19),
109(default, 5, 11),
110(default, 5, 8),
111(default, 3, 5),
112(default, 4, 8),
113(default, 4, 5);
114
115insert into project.userComments (comment_id, user_comment, user_id, product_id) values
116(default, 'Amazing product, would recommend.', 1, 3),
117(default, 'Not very satisfied. Low quality camera.', 1, 1),
118(default, '10/10 product, loved it!', 2, 2),
119(default, 'Just got it. Seems fine.', 2, 13),
120(default, 'Just as described.', 3, 10),
121(default, 'Great watch!', 3, 7),
122(default, 'Low resolution, would not recommend.', 5, 13),
123(default, 'Very satisfied. 10/10', 4, 18);
124
125insert into project.ratings (rating_id, rating_value, user_id, product_id) values
126(default, 5, 1, 3),
127(default, 4, 1, 5),
128(default, 5, 2, 9),
129(default, 3, 2, 12),
130(default, 1, 3, 4),
131(default, 5, 5, 18),
132(default, 4, 5, 11),
133(default, 4, 4, 4),
134(default, 1, 2, 10),
135(default, 2, 3, 11),
136(default, 3, 5, 7);
137
138insert into project.watchListProducts (watch_list_product_id, price_limit, user_id, product_id) values
139(default, 20000, 1, 5),
140(default, 40000, 1, 7),
141(default, 35000, 2, 8),
142(default, 27000, 3, 4),
143(default, 14000, 3, 9),
144(default, 29000, 1, 10);
145
146insert into project.productImages (product_image_id, product_image_url, product_id) values
147(default, 'dummyvalue1', 1),
148(default, 'dummyvalue2', 2),
149(default, 'dummyvalue3', 3),
150(default, 'dummyvalue4', 4),
151(default, 'dummyvalue5', 5),
152(default, 'dummyvalue6', 6),
153(default, 'dummyvalue7', 7),
154(default, 'dummyvalue8', 8),
155(default, 'dummyvalue9', 9),
156(default, 'dummyvalue10', 10),
157(default, 'dummyvalue11', 11),
158(default, 'dummyvalue12', 12),
159(default, 'dummyvalue13', 13),
160(default, 'dummyvalue14', 14),
161(default, 'dummyvalue15', 15),
162(default, 'dummyvalue16', 16),
163(default, 'dummyvalue17', 17),
164(default, 'dummyvalue18', 18),
165(default, 'dummyvalue19', 19),
166(default, 'dummyvalue20', 20);
167
168insert into project.stores (store_id, store_name) values
169(default, 'Anhoch'),
170(default, 'Setec'),
171(default, 'Neptun'),
172(default, 'Ledikom'),
173(default, 'iStyle');
174
175insert into project.productinstances (product_instance_id, product_instance_price, product_id, store_id) values
176(default, 37050, 1, 1),
177(default, 36000, 1, 2),
178(default, 57350, 2, 1),
179(default, 60400, 2, 3),
180(default, 78990, 3, 3),
181(default, 80000, 3, 5),
182(default, 68970, 3, 1),
183(default, 24000, 5, 1),
184(default, 25000, 4, 1),
185(default, 28700, 4, 2),
186(default, 27000, 5, 2),
187(default, 28980, 6, 1),
188(default, 32090, 7, 2),
189(default, 15660, 8, 2),
190(default, 13990, 8, 4),
191(default, 20180, 9, 1),
192(default, 50500, 10, 5),
193(default, 10870, 11, 2),
194(default, 18900, 11, 4),
195(default, 34000, 12, 1),
196(default, 87000, 12, 3),
197(default, 37000, 12, 5),
198(default, 25600, 13, 1),
199(default, 37580, 14, 3),
200(default, 12000, 15, 4),
201(default, 13500, 15, 5),
202(default, 14670, 16, 2),
203(default, 50700, 17, 2),
204(default, 35890, 18, 2),
205(default, 31650, 18, 5),
206(default, 30000, 19, 1),
207(default, 35500, 19, 4),
208(default, 38000, 1, 3),
209(default, 36600, 5, 3),
210(default, 12500, 4, 3),
211(default, 14490, 6, 3),
212(default, 53870, 9, 3),
213(default, 34860, 11, 3),
214(default, 54900, 13, 3),
215(default, 13000, 19, 3),
216(default, 22600, 20, 2);
217
218insert into project.belongs_to (product_id, category_id) values
219(1, 4),
220(2, 4),
221(3, 4),
222(4, 4),
223(5, 4),
224(6, 5),
225(7, 5),
226(8, 5),
227(9, 5),
228(10, 5),
229(11, 5),
230(12, 6),
231(13, 6),
232(14, 6),
233(15, 6),
234(16, 7),
235(17, 7),
236(18, 7),
237(19, 7),
238(20, 4);
Note: See TracBrowser for help on using the repository browser.