Advertisement
Maks140888

Untitled

Jun 2nd, 2022
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. create table lesson (
  2. id number not null,
  3. number_lesson number,
  4. time_start varchar(100),
  5. time_end varchar(200),
  6. name varchar (50),
  7. constraint lesson_pk primary key (id)
  8. );
  9.  
  10. create table day_week (
  11. id number not null,
  12. day_week varchar (50),
  13. constraint day_pk primary key (id)
  14. );
  15.  
  16. create table study_group (
  17. id number not null,
  18. name varchar (50),
  19. constraint group_pk primary key (id)
  20. );
  21.  
  22. create table cind_lesson (
  23. id number not null,
  24. name varchar (50),
  25. constraint cind_pk primary key (id)
  26. );
  27.  
  28. create table subject (
  29. id number not null,
  30. name varchar (50),
  31. constraint subject_pk primary key (id)
  32. );
  33.  
  34. create table audience (
  35. id number not null,
  36. name varchar (50),
  37. constraint audience_pk primary key (id)
  38. );
  39.  
  40. create table sheldule (
  41. id number not null,
  42. day_week number not null,
  43. lesson number not null,
  44. study_group number not null,
  45. subject number not null,
  46. cind_lesson number not null,
  47. audience number not null,
  48. CONSTRAINT sheldule_pk PRIMARY KEY (id),
  49. CONSTRAINT fk_day_week_id
  50. FOREIGN key (day_week)
  51. references day_week (id),
  52. CONSTRAINT fk_lesson_id
  53. FOREIGN key (lesson)
  54. references lesson (id),
  55. CONSTRAINT fk_group_id
  56. FOREIGN key (study_group)
  57. references study_group (id),
  58. CONSTRAINT fk_subject_id
  59. FOREIGN key (subject)
  60. references subject (id),
  61. CONSTRAINT fk_cind_id
  62. FOREIGN key (cind_lesson)
  63. references cind_lesson (id),
  64. CONSTRAINT fk_audience_id
  65. FOREIGN key (audience)
  66. references audience (id)
  67. );
  68.  
  69.  
  70.  
  71.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement