From 39dcac2281970febcce36a0151796af2986388b3 Mon Sep 17 00:00:00 2001 From: Martin Michalec Date: Sat, 7 Nov 2026 09:12:48 +0300 Subject: publish --- src/schema.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/schema.h (limited to 'src/schema.h') diff --git a/src/schema.h b/src/schema.h new file mode 100644 index 0000000..6570e31 --- /dev/null +++ b/src/schema.h @@ -0,0 +1,35 @@ +#ifndef INCLUDED_SCHEMA_H +#define INCLUDED_SCHEMA_H + +#define SCHEMA_GROUP_COUNT 300 +#define SCHEMA_SUBJECT_COUNT 9 +#define SCHEMA_TEACHER_COUNT 100 +#define SCHEMA_LAB_ASSIGNMENT_PER_GROUP_MIN_COUNT 15 +#define SCHEMA_LAB_ASSIGNMENT_PER_GROUP_MAX_COUNT 25 +#define SCHEMA_LAB_PER_SUBJECT_MIN_COUNT 30 +#define SCHEMA_LAB_PER_SUBJECT_MAX_COUNT 100 +#define SCHEMA_STUDENT_PER_GROUP_MIN_COUNT 15 +#define SCHEMA_STUDENT_PER_GROUP_MAX_COUNT 30 +#define SCHEMA_TEACHER_PER_LAB_ASSIGNMENT_MIN_COUNT 1 +#define SCHEMA_TEACHER_PER_LAB_ASSIGNMENT_MAX_COUNT 5 +#define SCHEMA_STUDENT_PER_LAB_MIN_COUNT 0 +#define SCHEMA_STUDENT_PER_LAB_MAX_COUNT 3 + +enum tables { + TABLE_TEACHERS, + TABLE_SUBJECTS, + TABLE_GROUPS, + TABLE_STUDENTS, + TABLE_LABS, + TABLE_LAB_ASSIGNMENTS, + TABLE_LAB_ASSIGNMENTS_TEACHERS, + TABLE_STUDENTS_LAB_ASSIGNMENTS, + TABLE_COUNT +}; + +extern void drop_schema(void); +extern void create_schema (void); +extern void generate_tables(void); +extern void describe_schema (void); + +#endif -- cgit v1.3.1