-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tables creation sql queries.txt
48 lines (41 loc) · 919 Bytes
/
Tables creation sql queries.txt
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
create table admin
(
username varchar(12) primary key,
password varchar(12)
);
create table faculty
(
facultyId int primary key auto_increment,
Name varchar(20) not null,
Address varchar(30) not null,
mobile varchar(10) unique not null,
email varchar(30) unique not null,
password varchar(12) not null
);
create table course
(
courseId varchar(20) primary key,
courseName varchar(20) not null,
courseFee int,
description varchar(30)
);
create table batch
(
batchId varchar(20) primary key,
courseId varchar(20),
facultyId int,
numberOfStudent int DEFAULT 0,
startDate date,
durationInDays int,
foreign key (courseId) references course(courseId),
foreign key (facultyId) references faculty(facultyId)
);
create table CoursePlan
(
planId int primary key auto_increment,
batchId varchar(20),
dayNumber int,
topic varchar(20),
status varchar(10) default 'pending',
foreign key (batchid) references batch(batchid)
);