-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschool-management-bbdd.txt
70 lines (51 loc) · 1.19 KB
/
school-management-bbdd.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# TOOL: https://dbdiagram.io/d
# CODE:
Table students {
id int [pk, increment]
name string
surname string
age int
classroom_id int
created_at timestamp
updated_at timestamp
}
Table classrooms {
id int [pk, increment]
course string
academic_year string
created_at timestamp
updated_at timestamp
}
Table student_subject {
id int [pk, increment]
academic_year string
student_id int
subject_id int
created_at timestamp
updated_at timestamp
}
Table subjects {
id int [pk, increment]
name string
created_at timestamp
updated_at timestamp
}
Table student_subject_grade {
id int [pk, increment]
academic_year string
student_subject_id int
grades_id int
created_at timestamp
updated_at timestamp
}
Table grades {
id int [pk, increment]
gradeNum float
created_at timestamp
updated_at timestamp
}
Ref: classrooms.id < students.classroom_id
Ref: student_subject.student_id < students.id
Ref: subjects.id < student_subject.subject_id
Ref: student_subject.id < student_subject_grade.student_subject_id
Ref: grades.id < student_subject_grade.grades_id