-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdatabase.sql
More file actions
287 lines (241 loc) · 11.3 KB
/
database.sql
File metadata and controls
287 lines (241 loc) · 11.3 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 11, 2018 at 08:38 AM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `hoax`
--
-- --------------------------------------------------------
--
-- Table structure for table `category`
--
CREATE TABLE `category` (
`category_id` int(11) NOT NULL,
`type` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `category`
--
INSERT INTO `category` (`category_id`, `type`) VALUES
(1, 'other');
-- --------------------------------------------------------
--
-- Table structure for table `comment`
--
CREATE TABLE `comment` (
`comment_id` int(11) NOT NULL,
`hoax_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`comment` varchar(1000) NOT NULL,
`time` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `comment`
--
INSERT INTO `comment` (`comment_id`, `hoax_id`, `user_id`, `comment`, `time`) VALUES
(1, 1, 3, 'hoax', '0000-00-00 00:00:00'),
(2, 1, 3, 'I work at SBI Mumbai.\nThis is a hoax message.\nbanks do not run on this policy.\nI request fellow readers not to forward this message.', '0000-00-00 00:00:00'),
(3, 3, 5, 'I am a Security Analyst hence I can answer this better. There are various flaws in this method. Most of the website mentioned above uses OTP to validate the user. Unless you share the OTP with some unknown person.', '0000-00-00 00:00:00'),
(4, 2, 4, 'Hello I am an IAS officer.\non behalf of government of India I would like to clarify that this news is true and not a hoax.', '0000-00-00 00:00:00'),
(5, 5, 4, 'I am an IAS officer related to MEA.\nThis is a false news.\nwas checked same with UNESCO', '0000-00-00 00:00:00');
-- --------------------------------------------------------
--
-- Table structure for table `comment_activity`
--
CREATE TABLE `comment_activity` (
`comment_activity_id` int(11) NOT NULL,
`comment_id` int(11) NOT NULL,
`hoax_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`vote` int(11) NOT NULL DEFAULT '0',
`flag` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `hoax`
--
CREATE TABLE `hoax` (
`hoax_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`category_id` int(11) NOT NULL,
`message` varchar(1000) NOT NULL,
`date_time` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `hoax`
--
INSERT INTO `hoax` (`hoax_id`, `user_id`, `category_id`, `message`, `date_time`) VALUES
(1, 4, 1, 'Important reminder : Tomorrow & the day after tomorrow please do not....i repeat DO NOT put *500* ₹ and *_2000* ₹ note on your money bag or purse ...if some how those note get affected with COLOURS bank will never ever going to accept that money and the notes will be a *WASTE* no one will take it ......so please SHARE this message with *ALL*', '0000-00-00 00:00:00'),
(2, 4, 1, 'www.Bharatkeveer.gov.in This is website launched by Ministry of Home Affairs, Government of India and with the help of actor Akshay Kumar. This Website contains details of soldiers who sacrificed their life to protect our nation. You can contribute minimum ₹10 (Rupees Ten) to ₹15 lakhs (maximum) according to your ability. If any one soldier get ₹15 lakhs, then he will be removed from the list. Just think if 50 lacs people out of 125 crore people of india contribute only 10 rupees each. then it will become 5 Crore. You can take out your contribution certificate to show your participation in this initiative. 🙠A humble request that if you cannot contribute, then please forward this message as much as possible.. 🙠Remember freedom is not free, somebody has already paid for it. Hamari har ek sass un shahido ki karzdar hai. Kuch yaad unhe bhi karlo jo laut ke ghar na aaye. Superb initiative. PLEASE SUPPORT', '0000-00-00 00:00:00'),
(3, 4, 1, '*HACKING BANK ACCOUNTS & MORE* *21/11/17, 6:15:27 PM: Pradeep Oracle: ```*How can your bank account with internet banking facility can be hacked? Worth reading... 1. Hacker accesses your name and date of birth from Facebook. 2. With these details he goes to the IncomeTax site and updates them. From there he obtains the pancard and mobile numbers. 3. Then he gets a duplicate pancard made. 4. After this he lodges a mobile theft complaint in a police station. 5. With the duplicate pancard he gets another simcard from the mobile company. 6. Through internet banking he is now ready to access your account. 7. He goes to the site and uses the forgot my password option. 8. Now he easily gets past other options and gets the Internet banking pin on his simcard. This information was issued by the Cyber Cell Police. All those who used Net Banking are requested to edit Facebook profile and delete the birth date and mobile no. as a safety measure. Please share to as many people as possible.. Shared ', '0000-00-00 00:00:00'),
(4, 4, 1, 'https://www.ndtv.com/world-news/thailand-approves-5-5-billion-bullet-train-project-with-china-1723904 👆 Thailand will get a bullet train connecting Bangkok with Southern China, a distance of more than 3000 kms for *US$5.5 billion*. India will get a bullet train linking Mumbai with Ahmedabad, a distance of about 500 kms for *US$17 billion* The taxpaying citizens of India have a right to know the reason of this huge difference.', '0000-00-00 00:00:00'),
(5, 4, 1, 'Congratulation to all of us Our national anthem \"Jana Gana Mana... \"is now declared as the BEST ANTHEM OF THE WORLD by UNESCO. Just few minutes ago. Kindly share this. Very proud to be an INDIAN.', '0000-00-00 00:00:00'),
(6, 4, 1, 'New Company recently registered in London by:\n\nLalit Modi, Vijay Mallya Nirav Modi & Co. \n\n*Name of the company* :: Hindustan Leavers..\n', '0000-00-00 00:00:00');
-- --------------------------------------------------------
--
-- Table structure for table `hoax_activity`
--
CREATE TABLE `hoax_activity` (
`hoax_activity_id` int(11) NOT NULL,
`hoax_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`vote` int(11) NOT NULL DEFAULT '0',
`flag` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `hoax_activity`
--
INSERT INTO `hoax_activity` (`hoax_activity_id`, `hoax_id`, `user_id`, `vote`, `flag`) VALUES
(1, 1, 3, 1, 0),
(2, 3, 5, 2, 0),
(3, 2, 4, 2, 0),
(4, 5, 4, 2, 0),
(5, 1, 4, 1, 0),
(6, 4, 3, 1, 0),
(7, 1, 2, 1, 0),
(8, 6, 4, 2, 0);
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE `user` (
`user_id` int(11) NOT NULL,
`designation` varchar(100) DEFAULT NULL,
`email` varchar(50) DEFAULT NULL,
`name` varchar(50) DEFAULT NULL,
`contact` varchar(11) DEFAULT NULL,
`password` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`user_id`, `designation`, `email`, `name`, `contact`, `password`) VALUES
(1, 'admin', 'admin', 'admin', '1234568790', 'admin'),
(2, 'Student', 'ivanmaria05@gmail.com', 'Ivan Maria', '9920277279', '1234'),
(3, 'Bank Manager', 'atharvaglawe@gmail.com', 'Atharva Aglawe', '123456', '1234'),
(4, 'IAS officer', 'singhshyam473@gmail.com', 'Shyam Singh', '9619077062', '1234'),
(5, 'Security Analyst', 'ameysgorde@gmail.com', 'Amey Gorde', '9869567956', '1234'),
(6, 'MBBS MD', 'steve@gmail.com', 'Steve Fernandes', '9876543210', '1234');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `category`
--
ALTER TABLE `category`
ADD PRIMARY KEY (`category_id`);
--
-- Indexes for table `comment`
--
ALTER TABLE `comment`
ADD PRIMARY KEY (`comment_id`),
ADD KEY `hoax_id` (`hoax_id`),
ADD KEY `hoax_id_2` (`hoax_id`),
ADD KEY `hoax_id_3` (`hoax_id`),
ADD KEY `user-comment` (`user_id`);
--
-- Indexes for table `comment_activity`
--
ALTER TABLE `comment_activity`
ADD PRIMARY KEY (`comment_activity_id`),
ADD KEY `comment-activity` (`comment_id`),
ADD KEY `hoax-activity` (`hoax_id`),
ADD KEY `user-activity` (`user_id`);
--
-- Indexes for table `hoax`
--
ALTER TABLE `hoax`
ADD PRIMARY KEY (`hoax_id`),
ADD KEY `category-hoax` (`category_id`),
ADD KEY `user-hoax` (`user_id`);
--
-- Indexes for table `hoax_activity`
--
ALTER TABLE `hoax_activity`
ADD PRIMARY KEY (`hoax_activity_id`),
ADD KEY `hoax-hoaxact` (`hoax_id`),
ADD KEY `user-hoaxact` (`user_id`);
--
-- Indexes for table `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`user_id`),
ADD UNIQUE KEY `email` (`email`),
ADD UNIQUE KEY `contact` (`contact`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `category`
--
ALTER TABLE `category`
MODIFY `category_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `comment`
--
ALTER TABLE `comment`
MODIFY `comment_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `comment_activity`
--
ALTER TABLE `comment_activity`
MODIFY `comment_activity_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `hoax`
--
ALTER TABLE `hoax`
MODIFY `hoax_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `hoax_activity`
--
ALTER TABLE `hoax_activity`
MODIFY `hoax_activity_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `comment`
--
ALTER TABLE `comment`
ADD CONSTRAINT `hoax-comment` FOREIGN KEY (`hoax_id`) REFERENCES `hoax` (`hoax_id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `user-comment` FOREIGN KEY (`user_id`) REFERENCES `user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `comment_activity`
--
ALTER TABLE `comment_activity`
ADD CONSTRAINT `comment-activity` FOREIGN KEY (`comment_id`) REFERENCES `comment` (`comment_id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `hoax-activity` FOREIGN KEY (`hoax_id`) REFERENCES `hoax` (`hoax_id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `user-activity` FOREIGN KEY (`user_id`) REFERENCES `user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `hoax`
--
ALTER TABLE `hoax`
ADD CONSTRAINT `category-hoax` FOREIGN KEY (`category_id`) REFERENCES `category` (`category_id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `user-hoax` FOREIGN KEY (`user_id`) REFERENCES `user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `hoax_activity`
--
ALTER TABLE `hoax_activity`
ADD CONSTRAINT `hoax-hoaxact` FOREIGN KEY (`hoax_id`) REFERENCES `hoax` (`hoax_id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `user-hoaxact` FOREIGN KEY (`user_id`) REFERENCES `user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;