-
Notifications
You must be signed in to change notification settings - Fork 0
/
db_certificate.sql
184 lines (147 loc) · 4.58 KB
/
db_certificate.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
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 08, 2018 at 02:11 PM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.2
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: `db_certificate`
--
-- --------------------------------------------------------
--
-- Table structure for table `responsable`
--
CREATE TABLE `responsable` (
`responsable_id` int(11) NOT NULL,
`responsable_fname` varchar(30) NOT NULL,
`responsable_lname` varchar(30) NOT NULL,
`responsable_email` varchar(30) NOT NULL,
`responsable_login` varchar(30) NOT NULL,
`responsable_pw` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `responsable`
--
INSERT INTO `responsable` (`responsable_id`, `responsable_fname`, `responsable_lname`, `responsable_email`, `responsable_login`, `responsable_pw`) VALUES
(1, 'abdo', 'abdo', '[email protected]', 'abdel', 'developer');
-- --------------------------------------------------------
--
-- Table structure for table `school`
--
CREATE TABLE `school` (
`school_id` int(11) NOT NULL,
`school_name` varchar(30) NOT NULL,
`school_city` varchar(30) NOT NULL,
`school_logo` varchar(30) NOT NULL,
`school_year` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `school`
--
INSERT INTO `school` (`school_id`, `school_name`, `school_city`, `school_logo`, `school_year`) VALUES
(4, 'success-school', 'belfort', 'iut.jpg', '2018/2019');
-- --------------------------------------------------------
--
-- Table structure for table `speciality`
--
CREATE TABLE `speciality` (
`speciality_id` int(11) NOT NULL,
`speciality_label` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `speciality`
--
INSERT INTO `speciality` (`speciality_id`, `speciality_label`) VALUES
(26, 'Informatique'),
(27, 'Mathematics');
-- --------------------------------------------------------
--
-- Table structure for table `student`
--
CREATE TABLE `student` (
`student_id` int(11) NOT NULL,
`student_fname` varchar(30) NOT NULL,
`student_lname` varchar(30) NOT NULL,
`student_img` varchar(30) NOT NULL,
`student_degree` int(2) NOT NULL,
`speciality_id` int(11) NOT NULL,
`school_id` int(11) NOT NULL,
`staff_member_fname` varchar(30) NOT NULL,
`staff_member_lname` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `student`
--
INSERT INTO `student` (`student_id`, `student_fname`, `student_lname`, `student_img`, `student_degree`, `speciality_id`, `school_id`, `staff_member_fname`, `staff_member_lname`) VALUES
(22, 'abdelwahab', 'web', '1.jpg', 2, 26, 4, 'Me', 'Me');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `responsable`
--
ALTER TABLE `responsable`
ADD PRIMARY KEY (`responsable_id`);
--
-- Indexes for table `school`
--
ALTER TABLE `school`
ADD PRIMARY KEY (`school_id`);
--
-- Indexes for table `speciality`
--
ALTER TABLE `speciality`
ADD PRIMARY KEY (`speciality_id`);
--
-- Indexes for table `student`
--
ALTER TABLE `student`
ADD PRIMARY KEY (`student_id`),
ADD KEY `school_id` (`school_id`),
ADD KEY `speciality_id` (`speciality_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `responsable`
--
ALTER TABLE `responsable`
MODIFY `responsable_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `school`
--
ALTER TABLE `school`
MODIFY `school_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `speciality`
--
ALTER TABLE `speciality`
MODIFY `speciality_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28;
--
-- AUTO_INCREMENT for table `student`
--
ALTER TABLE `student`
MODIFY `student_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `student`
--
ALTER TABLE `student`
ADD CONSTRAINT `student_ibfk_1` FOREIGN KEY (`school_id`) REFERENCES `school` (`school_id`),
ADD CONSTRAINT `student_ibfk_2` FOREIGN KEY (`speciality_id`) REFERENCES `speciality` (`speciality_id`);
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 */;