Answer the question
In order to leave comments, you need to log in
How to start database design?
In general, I'll start with the fact that I need to do a thesis, I was going to do the "School Management System". I want to make a web face, I chose python and the django 1.10 framework. The project is conceived in such a way that any parent can go to the site and see the progress, attendance, etc. of their child. Every school has a director, teachers, students, and they are all connected with each other. It is easy to implement if you are making this system for one school, but what if there are 200 schools in the city? And for each school to do everything separately? Create a separate application with migrations etc in django for each school? I thought of everything in my head, but when I decided to design a database, it became not at all easy.
PS I'm not asking you to solve this problem for me. I want experienced people to give advice, where is the best place to start? How to do it right? How to implement all this without pitfalls.
PSS In general, I'm a 2nd year student, there are still 2.5 years before my diploma, you can think about everything well.
I started making TK , did a little.
Answer the question
In order to leave comments, you need to log in
собрался делать "Система управления школьниками"- всегда о такой мечтал!
There is no need to make separate decisions for each school. It is enough to do one.
Start by thinking about what features your system will have, what information and to whom it will provide.
Try to write down on paper the roles of the system participants (principal, parent, teacher, student), what actions they can take on the portal, what information the portal provides them with, what information they can enter.
After that, try to identify information entities (user, parent, teacher, student, director, school, class, subject, lesson, lesson schedule, grade, grade, homework, etc.).
Then proceed to the description of the individual elements of these entities (grade - grade number, link to school, class, student, subject, lesson, date, teacher, grade date, teacher comment, etc.)
Think about what types of data you will use to store information.
Create a diagram of the future database.
Think about how your entities will be related to each other.
Don't use DBMS terms - table, fields, etc.
When working with django, part of the subd functionality is used behind the scenes and doesn't require your intervention
However, model design requires you to use 3NF
So you need to read how to make a CustomUser in django and how you will expand access rights management to restrict access principal_can_manage_only_his_school, etc.
class School(models.Model):
name = models.CharField(max_length=200)
address = models.CharField(max_length=200)
class MyUser(AbstractBaseUser):
GROUP_DIRECT = 0
GROUP_TEACHER = 1
# ...
GROUP_PARENT = 8
GROUP_STUDENT = 9
GROUP = (
(GROUP_DIRECT, 'Director'),
(GROUP_TEACHER, 'Teacher'),
# ...
(GROUP_PARENT, 'Parent'),
(GROUP_STUDENT, 'Student'),
)
name = models.CharField(max_length=200)
email = models.EmailField()
group = models.IntegerField(choices=GROUP)
class Lesson(models.Model):
name = models.CharField(max_length=200)
# ...
school = models.ForeignKey(School)
class Director(MyUser):
description = models.CharField(max_length=200)
# ...
school = models.ForeignKey(School)
class Teacher(MyUser):
description = models.CharField(max_length=200)
# ...
school = models.ForeignKey(School)
class Student(MyUser):
description = models.CharField(max_length=200)
# ...
school = models.ForeignKey(School)
class Parent(MyUser):
description = models.CharField(max_length=200)
children = models.ManyToManyField(Student)
# ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question