-
Notifications
You must be signed in to change notification settings - Fork 0
/
db_tubes.sql
218 lines (176 loc) · 6.66 KB
/
db_tubes.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
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
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 22, 2022 at 03:42 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 7.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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: `db_tubes`
--
-- --------------------------------------------------------
--
-- Table structure for table `admin`
--
CREATE TABLE `admin` (
`id_admin` int(11) NOT NULL,
`username` varchar(255) NOT NULL,
`password_admin` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `admin`
--
INSERT INTO `admin` (`id_admin`, `username`, `password_admin`) VALUES
(1, 'admin', '123');
-- --------------------------------------------------------
--
-- Table structure for table `course`
--
CREATE TABLE `course` (
`id_course` int(11) NOT NULL,
`nama_course` varchar(255) NOT NULL,
`photo_course` varchar(255) NOT NULL,
`description` varchar(255) NOT NULL,
`price` int(11) NOT NULL,
`category` varchar(255) NOT NULL,
`videos` int(11) NOT NULL,
`instructor` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `course`
--
INSERT INTO `course` (`id_course`, `nama_course`, `photo_course`, `description`, `price`, `category`, `videos`, `instructor`) VALUES
(1, 'Understand Banks & Financial Markets', 'course1.png', 'ini ini deskprisi', 20, 'Finance', 34, 'Aether Teyvat'),
(5, 'Motion Design with Figma and Others', 'course2.jpg', 'blablabla', 111, 'Design', 12, 'James'),
(8, 'The Complete JavaScript Course 2022:', 'course3.jpg', 'blablabal', 322, 'Programming', 11, 'Moriatry'),
(9, 'Blockchain and Bitcoin Fundamentals', 'course4.jpg', 'blabla', 23, 'Finance', 18, 'Hidari'),
(10, 'Personal Financial Well-Being', 'course5.jpg', 'Understanding Your Financial Life', 12, 'Finance', 32, 'Richard Okumoto'),
(11, 'Digital Marketing: How to Generate Sales Leads', 'course6.jpg', 'Learn How To Generate Leads With A Step-By-Step Workbook & Action Plan To Boost Your Sales in 2019', 25, 'Marketing', 43, 'Lawrence'),
(12, 'The Complete 2022 Web Development Bootcamp', 'course7.png', 'Become a Full-Stack Web Developer with just ONE course. HTML, CSS, Javascript, Node, React, MongoDB, Web3 and DApps', 32, 'Programming', 23, 'Angela Yu'),
(13, 'Laravel 9 - Build Complete Inventory Management', 'course8.jpg', 'In This Course, You Will Build Two Different Projects With Laravel 9 including Inventory Management System A-Z', 33, 'Programming', 20, 'Kazi Ariyan'),
(20, 'Tailwind CSS From Scratch | Learn By Projects', 'course9.png', 'Build great looking layouts fast and efficiently using Tailwind CSS utility classes', 45, 'Programming', 23, 'Brad Traversy'),
(23, 'Zapier 101: Automate your work', 'course11.png', 'Get rid of tedious tasks & amplify your work through automation', 25, 'Productivity', 22, 'Janosch Herman'),
(24, 'Master Notion - Beginner to Advanced', 'course12.jpg', 'Learn how to use Notion and create tools to organize your personal and work life.', 40, 'Productivity', 34, 'Jerad Hill'),
(25, 'Investing In Stocks The Complete Course', 'course13.jpg', 'Master Stock Market Investing & Trading in the Stock Market. Top Instructor & Millionaire Investor. Investing & Trading', 54, 'Finance', 15, 'Steve Ballinger');
-- --------------------------------------------------------
--
-- Table structure for table `enrollment`
--
CREATE TABLE `enrollment` (
`id_enroll` int(11) NOT NULL,
`id_user` int(11) NOT NULL,
`id_course` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `payment`
--
CREATE TABLE `payment` (
`id_payment` int(11) NOT NULL,
`photo_payment` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `payment`
--
INSERT INTO `payment` (`id_payment`, `photo_payment`) VALUES
(20, 'mikasa.jpg'),
(21, 'course10.png'),
(24, 'course9.png');
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE `user` (
`id_user` int(11) NOT NULL,
`fname` varchar(255) NOT NULL,
`lname` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`photo` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`id_user`, `fname`, `lname`, `email`, `password`, `photo`) VALUES
(1, 'Yosafat', '.', 'yosafatcrypter@gmail.com', '123', '9cc37ed30024a6654c754d027f002177.jpg'),
(18, 'Clarin', 'Moriatry', 'clarinnn@gmail.com', '123', 'rean.jpg');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `admin`
--
ALTER TABLE `admin`
ADD PRIMARY KEY (`id_admin`);
--
-- Indexes for table `course`
--
ALTER TABLE `course`
ADD PRIMARY KEY (`id_course`);
--
-- Indexes for table `enrollment`
--
ALTER TABLE `enrollment`
ADD PRIMARY KEY (`id_enroll`),
ADD KEY `id_course` (`id_course`),
ADD KEY `id_user` (`id_user`);
--
-- Indexes for table `payment`
--
ALTER TABLE `payment`
ADD PRIMARY KEY (`id_payment`);
--
-- Indexes for table `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`id_user`),
ADD UNIQUE KEY `email` (`email`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `admin`
--
ALTER TABLE `admin`
MODIFY `id_admin` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `course`
--
ALTER TABLE `course`
MODIFY `id_course` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;
--
-- AUTO_INCREMENT for table `enrollment`
--
ALTER TABLE `enrollment`
MODIFY `id_enroll` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=78;
--
-- AUTO_INCREMENT for table `payment`
--
ALTER TABLE `payment`
MODIFY `id_payment` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;
--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
MODIFY `id_user` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `enrollment`
--
ALTER TABLE `enrollment`
ADD CONSTRAINT `enrollment_ibfk_1` FOREIGN KEY (`id_course`) REFERENCES `course` (`id_course`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `enrollment_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `user` (`id_user`) 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 */;