Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.55 KB | None | 0 0
  1. create table Trainer
  2. (
  3. trainerId int auto_increment primary key,
  4. trainerName varchar(30),
  5. phone varchar(15),
  6. address varchar(50),
  7. image varchar(200)
  8. );
  9.  
  10. create table Course
  11. (
  12. courseId int auto_increment primary key,
  13. courseName varchar(50),
  14. fee int,
  15. courseLength int,
  16. image varchar(200)
  17. );
  18.  
  19. create table Schedule
  20. (
  21. scheduleId int auto_increment primary key,
  22. startTime varchar(10),
  23. dayOfWeek varchar(10)
  24. );
  25.  
  26. create table Classes
  27. (
  28. classId int auto_increment primary key,
  29. className varchar(20),
  30. scheduleId int,
  31. courseId int,
  32. trainerId int,
  33. foreign key (scheduleId) references Schedule(scheduleId),
  34. foreign key (courseId) references Course(courseId),
  35. foreign key (trainerId) references Trainer(trainerId)
  36. );
  37.  
  38. ----------------------------------------------------------------------
  39. | dayofweek | time | class | instructor |
  40. ----------------------------------------------------------------------
  41. | Monday | 7:00 | Zumba1 | David |
  42. ----------------------------------------------------------------------
  43. | Tuesday | 7:00 | Kickbox2 | John |
  44. ----------------------------------------------------------------------
  45. | Wednesday| 7:00 | Zumba1 | David |
  46. ----------------------------------------------------------------------
  47. | Thursday | 7:00 | Kickbox2 | John |
  48. ----------------------------------------------------------------------
  49. | Friday | 7:00 | Zumba2 | David |
  50. ----------------------------------------------------------------------
  51. | Monday | 8:00 | Yoga2 | Karen |
  52. ----------------------------------------------------------------------
  53. | Tuesday | 8:00 | Meditate3 | Julie |
  54.  
  55. ---------------------------------------------------------
  56. | Sun | Mon | Tue | Wed | Thu | Fri | Sat |
  57. -------------------------------------------------------------------
  58. | 7:00 | |Zumba1 | |Zumba1 | |Zumba1 | |
  59. -------------------------------------------------------------------
  60. | 8:00 | | | | | | | |
  61. -------------------------------------------------------------------
  62. | 9:00 | | |Zumba2 | |Zumba2 | | Zumba2|
  63. -------------------------------------------------------------------
  64. | 10:00 | | | | | | | |
  65. -------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement