-
Notifications
You must be signed in to change notification settings - Fork 0
/
wt_database.sql
236 lines (188 loc) · 5.81 KB
/
wt_database.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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 05, 2017 at 05:53 PM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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: `wt_database`
--
-- --------------------------------------------------------
--
-- Table structure for table `book`
--
CREATE TABLE `book` (
`Username` varchar(30) NOT NULL,
`Fname` varchar(30) NOT NULL,
`Gender` varchar(10) NOT NULL,
`CID` int(5) NOT NULL,
`DID` int(5) NOT NULL,
`DOV` date NOT NULL,
`Timestamp` datetime NOT NULL,
`Status` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `book`
--
INSERT INTO `book` (`Username`, `Fname`, `Gender`, `CID`, `DID`, `DOV`, `Timestamp`, `Status`) VALUES
('user', 'patient', 'male', 1, 1, '2017-11-08', '2017-11-05 16:43:48', 'Booking Registered.Wait for the update');
-- --------------------------------------------------------
--
-- Table structure for table `clinic`
--
CREATE TABLE `clinic` (
`cid` int(11) NOT NULL,
`name` varchar(30) NOT NULL,
`address` varchar(100) NOT NULL,
`town` varchar(30) NOT NULL,
`city` varchar(30) NOT NULL,
`contact` bigint(20) NOT NULL,
`mid` varchar(5) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `clinic`
--
INSERT INTO `clinic` (`cid`, `name`, `address`, `town`, `city`, `contact`, `mid`) VALUES
(1, 'Clinic', 'XYZ apartment, CST', 'CST', 'Mumbai', 9999988888, '1');
-- --------------------------------------------------------
--
-- Table structure for table `doctor`
--
CREATE TABLE `doctor` (
`did` int(11) NOT NULL,
`name` varchar(30) NOT NULL,
`gender` varchar(30) NOT NULL,
`dob` date NOT NULL,
`experience` int(11) NOT NULL,
`specialization` varchar(30) NOT NULL,
`contact` bigint(20) NOT NULL,
`address` varchar(100) NOT NULL,
`username` varchar(30) NOT NULL,
`password` varchar(30) NOT NULL,
`region` varchar(30) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `doctor`
--
INSERT INTO `doctor` (`did`, `name`, `gender`, `dob`, `experience`, `specialization`, `contact`, `address`, `username`, `password`, `region`) VALUES
(1, 'doctor', 'male', '1980-01-01', 10, 'Orthodontist', 9999999999, 'XYZ tower, CST', 'doctor', 'doctor', 'Mumbai');
-- --------------------------------------------------------
--
-- Table structure for table `doctor_availability`
--
CREATE TABLE `doctor_availability` (
`cid` int(11) NOT NULL,
`did` int(11) NOT NULL,
`day` varchar(50) NOT NULL,
`starttime` time NOT NULL,
`endtime` time NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `doctor_availability`
--
INSERT INTO `doctor_availability` (`cid`, `did`, `day`, `starttime`, `endtime`) VALUES
(1, 1, 'Friday', '14:00:00', '18:00:00'),
(1, 1, 'Monday', '14:00:00', '18:00:00'),
(1, 1, 'Thursday', '14:00:00', '18:00:00'),
(1, 1, 'Tuesday', '14:00:00', '18:00:00'),
(1, 1, 'Wednesday', '14:00:00', '18:00:00');
-- --------------------------------------------------------
--
-- Table structure for table `manager`
--
CREATE TABLE `manager` (
`mid` int(11) NOT NULL,
`name` varchar(30) NOT NULL,
`gender` varchar(30) NOT NULL,
`dob` date NOT NULL,
`contact` bigint(20) NOT NULL,
`address` varchar(100) NOT NULL,
`username` varchar(30) NOT NULL,
`password` varchar(30) NOT NULL,
`region` varchar(30) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `manager`
--
INSERT INTO `manager` (`mid`, `name`, `gender`, `dob`, `contact`, `address`, `username`, `password`, `region`) VALUES
(1, 'Manager', 'male', '1990-01-01', 8888899999, 'XYZ complex CST', 'manager', 'manager', 'Mumbai');
-- --------------------------------------------------------
--
-- Table structure for table `manager_clinic`
--
CREATE TABLE `manager_clinic` (
`cid` int(11) NOT NULL,
`mid` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `manager_clinic`
--
INSERT INTO `manager_clinic` (`cid`, `mid`) VALUES
(1, 1);
-- --------------------------------------------------------
--
-- Table structure for table `patient`
--
CREATE TABLE `patient` (
`name` varchar(30) NOT NULL,
`gender` varchar(30) NOT NULL,
`dob` date NOT NULL,
`contact` bigint(20) NOT NULL,
`email` varchar(30) NOT NULL,
`username` varchar(20) NOT NULL,
`password` varchar(20) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `patient`
--
INSERT INTO `patient` (`name`, `gender`, `dob`, `contact`, `email`, `username`, `password`) VALUES
('user', 'male', '1985-01-01', 7897897897, '[email protected]', 'user', 'user');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `book`
--
ALTER TABLE `book`
ADD PRIMARY KEY (`Username`,`Fname`,`DOV`,`Timestamp`);
--
-- Indexes for table `clinic`
--
ALTER TABLE `clinic`
ADD PRIMARY KEY (`cid`,`name`);
--
-- Indexes for table `doctor`
--
ALTER TABLE `doctor`
ADD PRIMARY KEY (`did`);
--
-- Indexes for table `doctor_availability`
--
ALTER TABLE `doctor_availability`
ADD PRIMARY KEY (`cid`,`did`,`day`,`starttime`,`endtime`);
--
-- Indexes for table `manager`
--
ALTER TABLE `manager`
ADD PRIMARY KEY (`mid`);
--
-- Indexes for table `manager_clinic`
--
ALTER TABLE `manager_clinic`
ADD PRIMARY KEY (`cid`,`mid`);
--
-- Indexes for table `patient`
--
ALTER TABLE `patient`
ADD PRIMARY KEY (`email`,`username`);
/*!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 */;