Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create table Trainer
- (
- trainerId int auto_increment primary key,
- trainerName varchar(30),
- phone varchar(15),
- address varchar(50),
- image varchar(200)
- );
- create table Course
- (
- courseId int auto_increment primary key,
- courseName varchar(50),
- fee int,
- courseLength int,
- image varchar(200)
- );
- create table Schedule
- (
- scheduleId int auto_increment primary key,
- startTime varchar(10),
- dayOfWeek varchar(10)
- );
- create table Classes
- (
- classId int auto_increment primary key,
- className varchar(20),
- scheduleId int,
- courseId int,
- trainerId int,
- foreign key (scheduleId) references Schedule(scheduleId),
- foreign key (courseId) references Course(courseId),
- foreign key (trainerId) references Trainer(trainerId)
- );
- ----------------------------------------------------------------------
- | dayofweek | time | class | instructor |
- ----------------------------------------------------------------------
- | Monday | 7:00 | Zumba1 | David |
- ----------------------------------------------------------------------
- | Tuesday | 7:00 | Kickbox2 | John |
- ----------------------------------------------------------------------
- | Wednesday| 7:00 | Zumba1 | David |
- ----------------------------------------------------------------------
- | Thursday | 7:00 | Kickbox2 | John |
- ----------------------------------------------------------------------
- | Friday | 7:00 | Zumba2 | David |
- ----------------------------------------------------------------------
- | Monday | 8:00 | Yoga2 | Karen |
- ----------------------------------------------------------------------
- | Tuesday | 8:00 | Meditate3 | Julie |
- ---------------------------------------------------------
- | Sun | Mon | Tue | Wed | Thu | Fri | Sat |
- -------------------------------------------------------------------
- | 7:00 | |Zumba1 | |Zumba1 | |Zumba1 | |
- -------------------------------------------------------------------
- | 8:00 | | | | | | | |
- -------------------------------------------------------------------
- | 9:00 | | |Zumba2 | |Zumba2 | | Zumba2|
- -------------------------------------------------------------------
- | 10:00 | | | | | | | |
- -------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement