-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathChronos.sql
45 lines (34 loc) · 1.09 KB
/
Chronos.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
Use Chronos;
create table MeetingInfo (
-- the very first row will be classID 1 and each time I add a row classId will increment
meetingID int(11) primary key auto_increment, -- name f column followed by the type(number of characters)
meetingName varchar(20),
hostID int(11) Not null, -- varchar is a variable length character
startDate Date not null,
startTime int(11) not null,
numUsers int(11),
numDays int(11),
numHoursPerDay int(11)
);
create table UserInfo (
userID int(11) primary key auto_increment,
username varchar(20),
hostPassword varchar(20),
email varchar(20),
isHost bool not null
);
/*
create table GuestInfo(
guestID int(11) primary key auto_increment,
meetingID int(11),
foreign key fk1(meetingID) references MeetingInfo(meetingID)
);*/
create table AvailabilityInfo(
meetingID int(11),
foreign key fk1(meetingID) references MeetingInfo(meetingID),
userId int(11) not null,
foreign key fk2(userID) references UserInfo(userID),
rowIndex int(11) not null,
colIndex int(11) not null,
available bool not null
);