· 6 years ago · Aug 14, 2019, 07:53 PM
1-- --------------------------------------------------------
2-- Host: 127.0.0.1
3-- Server version: 10.3.16-MariaDB - mariadb.org binary distribution
4-- Server OS: Win64
5-- HeidiSQL Version: 9.5.0.5196
6-- --------------------------------------------------------
7
8/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
9/*!40101 SET NAMES utf8 */;
10/*!50503 SET NAMES utf8mb4 */;
11/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
12/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
13
14
15-- Dumping database structure for virtuallearning
16CREATE DATABASE IF NOT EXISTS `virtuallearning` /*!40100 DEFAULT CHARACTER SET latin1 */;
17USE `virtuallearning`;
18
19-- Dumping structure for table virtuallearning.assignment_solution
20CREATE TABLE IF NOT EXISTS `assignment_solution` (
21 `solution_id` bigint(20) NOT NULL,
22 `fileName` varchar(255) DEFAULT NULL,
23 `grade` int(11) NOT NULL,
24 `path` varchar(255) DEFAULT NULL,
25 `lecture_id` bigint(20) DEFAULT NULL,
26 `user_id` bigint(20) DEFAULT NULL,
27 PRIMARY KEY (`solution_id`),
28 KEY `FK18wok3yk5ph68liqxhtn0tx78` (`lecture_id`),
29 KEY `FKp5f2worxfmayv2rkcy1yxor94` (`user_id`)
30) ENGINE=MyISAM DEFAULT CHARSET=latin1;
31
32-- Dumping data for table virtuallearning.assignment_solution: 0 rows
33/*!40000 ALTER TABLE `assignment_solution` DISABLE KEYS */;
34/*!40000 ALTER TABLE `assignment_solution` ENABLE KEYS */;
35
36-- Dumping structure for table virtuallearning.assignment_task
37CREATE TABLE IF NOT EXISTS `assignment_task` (
38 `task_id` bigint(20) NOT NULL,
39 `fileName` varchar(255) DEFAULT NULL,
40 `path` varchar(255) DEFAULT NULL,
41 PRIMARY KEY (`task_id`)
42) ENGINE=MyISAM DEFAULT CHARSET=latin1;
43
44-- Dumping data for table virtuallearning.assignment_task: 5 rows
45/*!40000 ALTER TABLE `assignment_task` DISABLE KEYS */;
46INSERT INTO `assignment_task` (`task_id`, `fileName`, `path`) VALUES
47 (12, 'Installing JavaTask01.txt', 'C:\\Users\\megat0n\\Desktop\\VirtualTeacher13082019Last\\virtuallearning\\courseTasks\\'),
48 (15, 'Running our First Java ProgramTask02.txt', 'C:\\Users\\megat0n\\Desktop\\VirtualTeacher13082019Last\\virtuallearning\\courseTasks\\'),
49 (18, 'Downloading EclipseTask03.txt', 'C:\\Users\\megat0n\\Desktop\\VirtualTeacher13082019Last\\virtuallearning\\courseTasks\\'),
50 (21, 'VariablesTask04.txt', 'C:\\Users\\megat0n\\Desktop\\VirtualTeacher13082019Last\\virtuallearning\\courseTasks\\'),
51 (24, 'Getting User InputTask05.txt', 'C:\\Users\\megat0n\\Desktop\\VirtualTeacher13082019Last\\virtuallearning\\courseTasks\\');
52/*!40000 ALTER TABLE `assignment_task` ENABLE KEYS */;
53
54-- Dumping structure for table virtuallearning.completed_courses
55CREATE TABLE IF NOT EXISTS `completed_courses` (
56 `user_id` bigint(20) NOT NULL,
57 `course_id` bigint(20) NOT NULL,
58 KEY `FK1w529e7ynys2pgh5mybqe0hq6` (`course_id`),
59 KEY `FKn9u0s779u1pu52tkti0afbelu` (`user_id`)
60) ENGINE=MyISAM DEFAULT CHARSET=latin1;
61
62-- Dumping data for table virtuallearning.completed_courses: 0 rows
63/*!40000 ALTER TABLE `completed_courses` DISABLE KEYS */;
64/*!40000 ALTER TABLE `completed_courses` ENABLE KEYS */;
65
66-- Dumping structure for table virtuallearning.courses
67CREATE TABLE IF NOT EXISTS `courses` (
68 `course_id` bigint(20) NOT NULL,
69 `avg_rating` double NOT NULL,
70 `description` varchar(1000) DEFAULT NULL,
71 `enabled` bit(1) DEFAULT b'0',
72 `grade` double DEFAULT 0,
73 `title` varchar(255) NOT NULL,
74 `total_votes` int(11) NOT NULL,
75 `user_id` bigint(20) NOT NULL,
76 `topic_id` bigint(20) NOT NULL,
77 PRIMARY KEY (`course_id`),
78 KEY `FK51k53m6m5gi9n91fnlxkxgpmv` (`user_id`),
79 KEY `FKlvrhaosps2wkj26qi1nmomd4p` (`topic_id`)
80) ENGINE=MyISAM DEFAULT CHARSET=latin1;
81
82-- Dumping data for table virtuallearning.courses: 1 rows
83/*!40000 ALTER TABLE `courses` DISABLE KEYS */;
84INSERT INTO `courses` (`course_id`, `avg_rating`, `description`, `enabled`, `grade`, `title`, `total_votes`, `user_id`, `topic_id`) VALUES
85 (11, 0, 'What you\'ll learn\r\nYou will Learn Java the MODERN WAY - Step By Step\r\nYou will Understand the BEST PRACTICES in Writing High Quality Java Code\r\nYou will Solve a Wide Range of Hands-on Programming EXERCISES with Java\r\nYou will Learn to Write AWESOME Object Oriented Programs with Java\r\nYou will Acquire ALL the SKILLS to demonstrate an EXPERTISE with Java Programming in Your Job Interviews\r\nYou will learn ADVANCED Object Oriented Programming Concepts - Abstraction, Inheritance, Encapsulation and Polymorphism\r\nYou will learn the Basics of Object Oriented Programming - Interfaces, Inheritance, Abstract Class and Constructors\r\nYou will learn the Basics of Programming - variables, choosing a data type, conditional execution, loops, writing great methods, breaking down problems into sub problems and implementing great Exception Handling\r\nYou will learn Basics of Functional Programming with Java\r\nYou will learn about a wide variety of Java Collections - List, Map, Set and Queue Interfaces', b'1', 50, 'Java Programming for Complete Beginners ', 0, 3, 1);
86/*!40000 ALTER TABLE `courses` ENABLE KEYS */;
87
88-- Dumping structure for table virtuallearning.course_photos
89CREATE TABLE IF NOT EXISTS `course_photos` (
90 `course_photos_id` bigint(20) NOT NULL,
91 `fileName` varchar(255) DEFAULT NULL,
92 `path` varchar(255) DEFAULT NULL,
93 `course_id` bigint(20) DEFAULT NULL,
94 PRIMARY KEY (`course_photos_id`),
95 KEY `FK6i1jr04vidl5r0b2bm0ivfmef` (`course_id`)
96) ENGINE=MyISAM DEFAULT CHARSET=latin1;
97
98-- Dumping data for table virtuallearning.course_photos: 1 rows
99/*!40000 ALTER TABLE `course_photos` DISABLE KEYS */;
100INSERT INTO `course_photos` (`course_photos_id`, `fileName`, `path`, `course_id`) VALUES
101 (10, 'Java Programming for Complete Beginners coursePhoto06.png', 'C:\\Users\\megat0n\\Desktop\\VirtualTeacher13082019Last\\virtuallearning\\coursePhotos\\', 11);
102/*!40000 ALTER TABLE `course_photos` ENABLE KEYS */;
103
104-- Dumping structure for table virtuallearning.enrolled_courses
105CREATE TABLE IF NOT EXISTS `enrolled_courses` (
106 `user_id` bigint(20) NOT NULL,
107 `course_id` bigint(20) NOT NULL,
108 KEY `FK35tccn1iailx1d8x2p389srka` (`course_id`),
109 KEY `FKrvr5hj3vlgs3fp4nmqrvb4ypf` (`user_id`)
110) ENGINE=MyISAM DEFAULT CHARSET=latin1;
111
112-- Dumping data for table virtuallearning.enrolled_courses: 0 rows
113/*!40000 ALTER TABLE `enrolled_courses` DISABLE KEYS */;
114/*!40000 ALTER TABLE `enrolled_courses` ENABLE KEYS */;
115
116-- Dumping structure for table virtuallearning.hibernate_sequence
117CREATE TABLE IF NOT EXISTS `hibernate_sequence` (
118 `next_val` bigint(20) DEFAULT NULL
119) ENGINE=MyISAM DEFAULT CHARSET=latin1;
120
121-- Dumping data for table virtuallearning.hibernate_sequence: 7 rows
122/*!40000 ALTER TABLE `hibernate_sequence` DISABLE KEYS */;
123INSERT INTO `hibernate_sequence` (`next_val`) VALUES
124 (27),
125 (27),
126 (27),
127 (27),
128 (27),
129 (27),
130 (27);
131/*!40000 ALTER TABLE `hibernate_sequence` ENABLE KEYS */;
132
133-- Dumping structure for table virtuallearning.lectures
134CREATE TABLE IF NOT EXISTS `lectures` (
135 `id` bigint(20) NOT NULL,
136 `description` varchar(1000) DEFAULT NULL,
137 `title` varchar(255) DEFAULT NULL,
138 `task_id` bigint(20) DEFAULT NULL,
139 `course_id` bigint(20) DEFAULT NULL,
140 `video_id` bigint(20) DEFAULT NULL,
141 PRIMARY KEY (`id`),
142 KEY `FKhq1gl1uyj0ognfv01otvuy04m` (`task_id`),
143 KEY `FKsj4m8ipr4qnehoyxk7kbu3ide` (`course_id`),
144 KEY `FKb4x5n3wh5e8hj2exjn2r2ft0j` (`video_id`)
145) ENGINE=MyISAM DEFAULT CHARSET=latin1;
146
147-- Dumping data for table virtuallearning.lectures: 5 rows
148/*!40000 ALTER TABLE `lectures` DISABLE KEYS */;
149INSERT INTO `lectures` (`id`, `description`, `title`, `task_id`, `course_id`, `video_id`) VALUES
150 (14, 'It is recommended, before you proceed with online installation you may want to disable your Internet firewall. In some cases the default firewall settings are set to reject all automatic or online installations such as the Java online installation. If the firewall is not configured appropriately it may stall the download/install operation of Java under certain conditions. Refer to your specific Internet firewall manual for instructions on how to disable your Internet Firewall.', 'Installing Java', 12, 11, 13),
151 (17, 'The name of the class defined by the program is HelloWorld, which is same as name of file(HelloWorld.java). This is not a coincidence. In Java, all codes must reside inside a class and there is at most one public class which contain main() method. By convention, the name of the main class(class which contain main method) should match the name of the file that holds the program.', 'Running our First Java Program', 15, 11, 16),
152 (20, 'You may want to print these instructions before proceeding, so that you can refer to them while downloading and installing Eclipse. Or, just keep this document in your browser. You should read each step completely before performing the action that it describes. This document shows downloading and installing Eclipse (Oxygen) on Windows 7 in Summer 2017. You should download and install the latest version of Eclipse. The current latest (as of Summer 2017) is Eclipse (Oxygen).', 'Downloading Eclipse', 18, 11, 19),
153 (23, 'A variable is a container which holds the value while the java program is executed. A variable is assigned with a datatype. Variable is a name of memory location. There are three types of variables in java: local, instance and static. There are two types of data types in java: primitive and non-primitive.', 'Variables', 21, 11, 22),
154 (26, 'The Scanner class is used to get user input, and it is found in the java.util package. To use the Scanner class, create an object of the class and use any of the available methods found in the Scanner class documentation. In our example, we will use the nextLine() method, which is used to read Strings', 'Getting User Input', 24, 11, 25);
155/*!40000 ALTER TABLE `lectures` ENABLE KEYS */;
156
157-- Dumping structure for table virtuallearning.lecture_video
158CREATE TABLE IF NOT EXISTS `lecture_video` (
159 `video_id` bigint(20) NOT NULL,
160 `code` varchar(255) NOT NULL,
161 `title` varchar(255) DEFAULT NULL,
162 `watched` bit(1) DEFAULT b'0',
163 PRIMARY KEY (`video_id`)
164) ENGINE=MyISAM DEFAULT CHARSET=latin1;
165
166-- Dumping data for table virtuallearning.lecture_video: 5 rows
167/*!40000 ALTER TABLE `lecture_video` DISABLE KEYS */;
168INSERT INTO `lecture_video` (`video_id`, `code`, `title`, `watched`) VALUES
169 (13, 'Hl-zzrqQoSE', NULL, b'0'),
170 (16, '5u8rFbpdvds', NULL, b'0'),
171 (19, 'CE8UIbb_4iM', NULL, b'0'),
172 (22, 'gtQJXzi3Yns', NULL, b'0'),
173 (25, '5DdacOkrTgo', NULL, b'0');
174/*!40000 ALTER TABLE `lecture_video` ENABLE KEYS */;
175
176-- Dumping structure for table virtuallearning.photos
177CREATE TABLE IF NOT EXISTS `photos` (
178 `photo_id` bigint(20) NOT NULL,
179 `fileName` varchar(255) DEFAULT NULL,
180 `path` varchar(255) DEFAULT NULL,
181 `user_id` bigint(20) DEFAULT NULL,
182 PRIMARY KEY (`photo_id`),
183 KEY `FKnm381g1ktlpsorbtpco2ljhuv` (`user_id`)
184) ENGINE=MyISAM DEFAULT CHARSET=latin1;
185
186-- Dumping data for table virtuallearning.photos: 9 rows
187/*!40000 ALTER TABLE `photos` DISABLE KEYS */;
188INSERT INTO `photos` (`photo_id`, `fileName`, `path`, `user_id`) VALUES
189 (1, 'signup-image.jpg', 'C:\\Users\\megat0n\\Desktop\\VirtualTeacher13082019Last\\virtuallearning\\photos\\', 1),
190 (2, 'signup-image.jpg', 'C:\\Users\\megat0n\\Desktop\\VirtualTeacher13082019Last\\virtuallearning\\photos\\', 2),
191 (3, 'signup-image.jpg', 'C:\\Users\\megat0n\\Desktop\\VirtualTeacher13082019Last\\virtuallearning\\photos\\', 3),
192 (4, 'signup-image.jpg', 'C:\\Users\\megat0n\\Desktop\\VirtualTeacher13082019Last\\virtuallearning\\photos\\', 4),
193 (5, 'signup-image.jpg', 'C:\\Users\\megat0n\\Desktop\\VirtualTeacher13082019Last\\virtuallearning\\photos\\', 5),
194 (6, 'signup-image.jpg', 'C:\\Users\\megat0n\\Desktop\\VirtualTeacher13082019Last\\virtuallearning\\photos\\', 6),
195 (7, 'signup-image.jpg', 'C:\\Users\\megat0n\\Desktop\\VirtualTeacher13082019Last\\virtuallearning\\photos\\', 7),
196 (8, 'signup-image.jpg', 'C:\\Users\\megat0n\\Desktop\\VirtualTeacher13082019Last\\virtuallearning\\photos\\', 8),
197 (9, 'signup-image.jpg', 'C:\\Users\\megat0n\\Desktop\\VirtualTeacher13082019Last\\virtuallearning\\photos\\', 9);
198/*!40000 ALTER TABLE `photos` ENABLE KEYS */;
199
200-- Dumping structure for table virtuallearning.rated_course
201CREATE TABLE IF NOT EXISTS `rated_course` (
202 `course_rating_id` bigint(20) NOT NULL AUTO_INCREMENT,
203 `course_rating` int(11) DEFAULT NULL,
204 `course_id` bigint(20) DEFAULT NULL,
205 `user_id` bigint(20) DEFAULT NULL,
206 PRIMARY KEY (`course_rating_id`),
207 KEY `FKg1dr07c2727axpeuenf6w00cf` (`course_id`),
208 KEY `FKdgqaxnkx89ncnhrhqv2y35loo` (`user_id`)
209) ENGINE=MyISAM DEFAULT CHARSET=latin1;
210
211-- Dumping data for table virtuallearning.rated_course: 0 rows
212/*!40000 ALTER TABLE `rated_course` DISABLE KEYS */;
213/*!40000 ALTER TABLE `rated_course` ENABLE KEYS */;
214
215-- Dumping structure for table virtuallearning.roles
216CREATE TABLE IF NOT EXISTS `roles` (
217 `role_id` bigint(20) NOT NULL AUTO_INCREMENT,
218 `role_name` varchar(255) NOT NULL,
219 PRIMARY KEY (`role_id`)
220) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
221
222-- Dumping data for table virtuallearning.roles: 9 rows
223/*!40000 ALTER TABLE `roles` DISABLE KEYS */;
224INSERT INTO `roles` (`role_id`, `role_name`) VALUES
225 (1, 'ROLE_ADMIN'),
226 (2, 'ROLE_ADMIN'),
227 (3, 'ROLE_TEACHER'),
228 (4, 'ROLE_TEACHER'),
229 (5, 'ROLE_TEACHER'),
230 (6, 'ROLE_STUDENT'),
231 (7, 'ROLE_STUDENT'),
232 (8, 'ROLE_STUDENT'),
233 (9, 'ROLE_STUDENT');
234/*!40000 ALTER TABLE `roles` ENABLE KEYS */;
235
236-- Dumping structure for table virtuallearning.topics
237CREATE TABLE IF NOT EXISTS `topics` (
238 `id` bigint(20) NOT NULL AUTO_INCREMENT,
239 `name` varchar(255) NOT NULL,
240 PRIMARY KEY (`id`),
241 UNIQUE KEY `UK_7tuhnscjpohbffmp7btit1uff` (`name`)
242) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;
243
244-- Dumping data for table virtuallearning.topics: 13 rows
245/*!40000 ALTER TABLE `topics` DISABLE KEYS */;
246INSERT INTO `topics` (`id`, `name`) VALUES
247 (1, 'Development'),
248 (2, 'Business'),
249 (3, 'Finance & Accounting'),
250 (4, 'IT and Software'),
251 (5, 'Office Productivity'),
252 (6, 'Personal Development'),
253 (7, 'Design'),
254 (8, 'Marketing'),
255 (9, 'Lifestyle'),
256 (10, 'Photography'),
257 (11, 'Health and Fitness'),
258 (12, 'Music'),
259 (13, 'Teaching and Academics');
260/*!40000 ALTER TABLE `topics` ENABLE KEYS */;
261
262-- Dumping structure for table virtuallearning.users
263CREATE TABLE IF NOT EXISTS `users` (
264 `user_id` bigint(20) NOT NULL AUTO_INCREMENT,
265 `email` varchar(255) NOT NULL,
266 `enabled` bit(1) NOT NULL,
267 `first_name` varchar(255) NOT NULL,
268 `hasRequested` bit(1) DEFAULT NULL,
269 `last_name` varchar(255) NOT NULL,
270 `password` varchar(255) NOT NULL,
271 `username` varchar(255) NOT NULL,
272 PRIMARY KEY (`user_id`)
273) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
274
275-- Dumping data for table virtuallearning.users: 9 rows
276/*!40000 ALTER TABLE `users` DISABLE KEYS */;
277INSERT INTO `users` (`user_id`, `email`, `enabled`, `first_name`, `hasRequested`, `last_name`, `password`, `username`) VALUES
278 (1, 'root@gmail.com', b'1', 'root', b'0', 'root', '$2a$10$V9I3a6vzOEm/A4h6VARbBueQSTQ53sqKriSIcIfE2Evczbl3AKka6', 'root'),
279 (2, 'ivsmile96@gmail.com', b'1', 'Ivan', b'0', 'Simeonov', '$2a$10$/URE.2Die7iKy00RZydJIeU3ts2abtxE32brDZh/wadqqNUFzH8GG', 'megat0n'),
280 (3, 'vikiiism@mail.bg', b'1', 'Vicky', b'0', 'Georgieva', '$2a$10$UyX0w7bKEESEg73uzTGiVO/Ip7za1J5RCGgyNZSQy2NSKbqsQBqzS', 'vickito'),
281 (4, 'pesho@gmail.com', b'1', 'Pesho', b'0', 'Peshov', '$2a$10$8m/jnbRwOCryTM5idDfyMunW/F3IW5eYBcZhYYANrXsTk4rlhyhGW', 'pesho@gmail.com'),
282 (5, 'misho@gmail.com', b'1', 'Mihail', b'0', 'Mihailov', '$2a$10$OmwlCMxM17suXUPaahYEweYd8pC6K1P5SXy2kWkfc4yPs5S/XS0JO', 'misho@gmail.com'),
283 (6, 'didi@gmail.com', b'1', 'Didi', b'0', 'Didieva', '$2a$10$8FwCC71KXCLbzezTyvNY2eufJxSPQuexb/Cu0vyO2UE1aakuN3N7q', 'didi@gmail.com'),
284 (7, 'mimi@gmail.com', b'1', 'Mariq', b'0', 'Markova', '$2a$10$S58Img67RqhbS02yomzbSOtU9jiN26tmjz2UJRjEhwA.6kOl5uE.q', 'mimi@gmail.com'),
285 (8, 'gogo@gmail.com', b'1', 'Georgi', b'0', 'Georgiev', '$2a$10$BX5coyxIN8MU1T6beBnFOuQN3zGJ8OBOAdkclC2txwTIvBOiKHInO', 'gogo@gmail.com'),
286 (9, 'pepi@gmail.com', b'1', 'Petar', b'0', 'Petrov', '$2a$10$oOAjdpjTNjQG/U/YsxEfq.8kKy4iXS4WTwutYzRAxbsu38h31y/za', 'pepi@gmail.com');
287/*!40000 ALTER TABLE `users` ENABLE KEYS */;
288
289-- Dumping structure for table virtuallearning.user_role
290CREATE TABLE IF NOT EXISTS `user_role` (
291 `user_id` bigint(20) NOT NULL,
292 `role_id` bigint(20) NOT NULL,
293 KEY `FKt7e7djp752sqn6w22i6ocqy6q` (`role_id`),
294 KEY `FKj345gk1bovqvfame88rcx7yyx` (`user_id`)
295) ENGINE=MyISAM DEFAULT CHARSET=latin1;
296
297-- Dumping data for table virtuallearning.user_role: 9 rows
298/*!40000 ALTER TABLE `user_role` DISABLE KEYS */;
299INSERT INTO `user_role` (`user_id`, `role_id`) VALUES
300 (1, 1),
301 (2, 2),
302 (3, 3),
303 (4, 4),
304 (5, 5),
305 (6, 6),
306 (7, 7),
307 (8, 8),
308 (9, 9);
309/*!40000 ALTER TABLE `user_role` ENABLE KEYS */;
310
311-- Dumping structure for table virtuallearning.user_video_already_watched
312CREATE TABLE IF NOT EXISTS `user_video_already_watched` (
313 `user_id` bigint(20) NOT NULL,
314 `video_id` bigint(20) NOT NULL,
315 KEY `FK3mbdjgtjpaw0yxsxvkl7i2go2` (`video_id`),
316 KEY `FKnw1fkepu78thca8kq5wmcrpe6` (`user_id`)
317) ENGINE=MyISAM DEFAULT CHARSET=latin1;
318
319-- Dumping data for table virtuallearning.user_video_already_watched: 0 rows
320/*!40000 ALTER TABLE `user_video_already_watched` DISABLE KEYS */;
321/*!40000 ALTER TABLE `user_video_already_watched` ENABLE KEYS */;
322
323/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
324/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
325/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;