This is my new favorite youtube channel. I'll be binging all your videos. Very concise. You aren't saying "uhm" every other word and stumbling over the ideas. Very clear. Great voice! This is how it should be done. Thanks you!
Thanks for the kind words! I try to keep my points focused and well explained so I don’t confuse the viewer and waste their time. I’m glad you’ve noticed that 😊
This was very helpful. Still interested in more of this database, such as fees, payment installment, attendance, quiz scores, maybe authentication for guardians, maybe tables for notes or messageboard, or even students homework, imagination is endless also few queries to pull useful real life cases. I like your tutorials very helpful, just wish they will go bit more advance.
I worked on a SMS before and this gold. There will be one inconvenience with OOP which us the entity named class. The system can also go to supporting school year expenses and having students guardians and teachers as users
Question for 7:20: You say: "We know that students are in one level at a time, but they can be in more than one level during their time at the school. So, we'll need a joining table, as this is a many-to-many relationship". I would say this is a many-to-one relationship: One student can be at EXACTLY ONE year_level at a time. One year_level can be shared amongst MANY students. Thus, Many-to-One. Is my logic flawed?
Good question! Yes, it could be described as a one to many relationship. However, for the data in the table, there would be a record for student 1 in year level 1, then student 1 in year level 2. Only one record would be considered the active or current record, but we would still need to store both in the table. I think the main point here is that it's storing data over many years. If it was only storing the current year, then it would be a one to many and we wouldn't need the joining table.
Thank you for the question and the response! I was confused about this as well thinking about how one student would be in multiple years!. I figured someone else would have noticed and decided to check the comments for a better response! This is very helpful!!! I definitely would take more videos on database structure on your channel! Thank you for the first class lesson!!!
Good day! I can`t understand... If we are going to store information about Students and Levels/Years as N:M, that why we are not gonna do the same trick with Teacher and Class?@@DatabaseStar
Awesome video! but i wanna ask you about the "guardian_type_id" field, I think that this field should be set in "guardian" table instead of "student_guardian" table
Thanks! Yes the guardian type field could also go in the guardian table and that could work. I added it to student guardian because it allows a guardian to have one type for one student and another type for another student. But that may be rare so it could be unnecessary.
Really awesome video! Keep up the great work. I've worked on multiple school management systems, and this seems like a really smart approach. I mostly work in the Netherlands, so we don't know things like terms, but great work.
okay perfect explanation but what i could do if i want to create a section for a classes, let say for grade 1 making tow or three sections like Grade 1-A,Grade 1-B,Grade 1-C .....etc, in my country classes are grouped into Sections
It could be stored there. However, having a pre-defined list of guardian types makes it easier to select from a list, and also ensures that only these values can be used. If it's free text then it's easier to put in the wrong data.
thank you for another fantastic video! In the final schema, the one thing I don’t understand is which start_period_id and end_period_id in the Class table are both linked to the PK in the Period table. Shouldn’t they be linked to the start_time and end_time fields in the Period table? (I’m new at this, haha)
Glad you liked it! Good question. The reason is so that all the classes can have the same start and end time. The start and end times are attributes of a period, and not a class. For example, "Intro to Physics is in period 1 so it starts at 9AM", rather than "Intro to Physics is at 9AM". This also means that any class in period 1 will start at 9AM, which can help with timetables. But this is an assumption for how periods work from when I was at school. Different countries may work differently. Having a start and end time on the class table could also work.
They could be, but you have more control over separate tables and they can appear in drop-down lists. I created a video about enum vs lookup table here: th-cam.com/video/CkRbgDD7jNM/w-d-xo.html
Good question. If that is a possibility you would need to have a joining table I believe, to capture the possibilities or combinations of many classes and many rooms.
Thanks! I would suggest thinking about the kind of things you need to capture for attendance, and then how it relates to each of the existing tables. For example, you may want to capture attendance for each student within each class for each time the class happens. So you may want an attendance table to link to the student, the class, and store a date, and perhaps an indicator of "attended" and "did not attend". You may also want to capture whether or not the student has already let the school know in advance, e.g. "away with a reason", to tell them apart from students who did not attend but nobody knows why.
@@DatabaseStar Thank you. Yes, that's exactly what I want to do. How would I set up my relationships between the three tables: Student, Class, and Attendance?
Please. Could you elaborate on the relationship rules, example if student get removed which data get removed or changed to null. ON DELETE and ON UPDATE. That will be great...
Good idea. Generally you would either remove the related IDs or set them to NULL, depending on what rules you wanted to implement. Alternatively you could have a new column in the student table for "active", and if you need to delete a student you would set active=0 instead, so you kept the data. This concept is called "soft delete" and is common.
Does this cater to students of all year levels and college students? I'm expecting that the diagram would work on Elementary and Senior High School students, but may not work in college as it is quite different. But knowing the moodle is capable of doing it, maybe I'm wrong.
You’re right, it may not work on college students. One reason is that it doesn’t include courses or majors and the ability to have different subjects within them. But the design could be expanded for that I think.
please make on online course database design where each lesson also contains quiz. Student needs need to complete the quiz of the lesson to be able to move to the next lesson
@@DatabaseStar I had an interview and i got rejected cause they asked me to change my database based on some different requirements and i dont know what to study.
Hi sir, is there any way for asking questions to you on your paid courses?, how to contact you if I have questions before enrollment. Could you please provide the contact
This is my new favorite youtube channel. I'll be binging all your videos. Very concise. You aren't saying "uhm" every other word and stumbling over the ideas. Very clear. Great voice! This is how it should be done. Thanks you!
Thanks for the kind words! I try to keep my points focused and well explained so I don’t confuse the viewer and waste their time. I’m glad you’ve noticed that 😊
This was very helpful. Still interested in more of this database, such as fees, payment installment, attendance, quiz scores, maybe authentication for guardians, maybe tables for notes or messageboard, or even students homework, imagination is endless also few queries to pull useful real life cases. I like your tutorials very helpful, just wish they will go bit more advance.
Great ideas! I think they could all be added to the database design. I'll keep this in mind for future designs - especially sample queries.
I worked on a SMS before and this gold. There will be one inconvenience with OOP which us the entity named class.
The system can also go to supporting school year expenses and having students guardians and teachers as users
Thanks! Yeah it can be tricky mapping entities to database tables.
Thanks for the comment on expenses and users, they are great ideas.
Question for 7:20:
You say: "We know that students are in one level at a time, but they can be in more than one level during their time at the school. So, we'll need a joining table, as this is a many-to-many relationship".
I would say this is a many-to-one relationship:
One student can be at EXACTLY ONE year_level at a time. One year_level can be shared amongst MANY students. Thus, Many-to-One.
Is my logic flawed?
Good question! Yes, it could be described as a one to many relationship. However, for the data in the table, there would be a record for student 1 in year level 1, then student 1 in year level 2. Only one record would be considered the active or current record, but we would still need to store both in the table.
I think the main point here is that it's storing data over many years. If it was only storing the current year, then it would be a one to many and we wouldn't need the joining table.
Thank you for the question and the response! I was confused about this as well thinking about how one student would be in multiple years!. I figured someone else would have noticed and decided to check the comments for a better response! This is very helpful!!! I definitely would take more videos on database structure on your channel! Thank you for the first class lesson!!!
Good day! I can`t understand... If we are going to store information about Students and Levels/Years as N:M, that why we are not gonna do the same trick with Teacher and Class?@@DatabaseStar
Thank You!, I'll recommend the video to my students!
Thanks! 😀
So much help was given. Thanks a million ❤❤❤
You're welcome
Thank you for the time and effort you put into this awesome explanation❤
No problem, glad you liked it!
best thing I did last year for my training was subscribe to this channel. great content man!
Thanks! I’m glad you like the content and have subscribed!
Awesome video! but i wanna ask you about the "guardian_type_id" field, I think that this field should be set in "guardian" table instead of "student_guardian" table
Thanks! Yes the guardian type field could also go in the guardian table and that could work. I added it to student guardian because it allows a guardian to have one type for one student and another type for another student. But that may be rare so it could be unnecessary.
@@DatabaseStar Thanks u!
Really awesome video! Keep up the great work. I've worked on multiple school management systems, and this seems like a really smart approach. I mostly work in the Netherlands, so we don't know things like terms, but great work.
Thanks a lot! Glad you liked the video.
Amazing videos, Ben! Keep up the great work. I’ve been using your videos to upskill my Oracle SQL skills that I use at work. Many thanks!
Great to hear! Glad you like the videos and that it is helping your SQL skills
This is education.... thank you sir
You’re welcome!
okay perfect explanation but what i could do if i want to create a section for a classes, let say for grade 1 making tow or three sections like Grade 1-A,Grade 1-B,Grade 1-C .....etc, in my country classes are grouped into Sections
You could expand the database design to add that concept for classes.
After a while finally i find this Gem.
That’s great!
Designing databases is so fun, these videos are very helpful.
Glad you like them!
This video was very helpful for my project. Thank you very much for this!
Awesome! Glad to hear it.
I love your channel
Thanks!
The video is awesome and very usefully thanks
Thanks, glad you like it!
Very informative, thanks.
Glad it was helpful!
Great job and well done, what is the name of the application that you used to draw the ERD, appreciated it.
Thanks! It’s called LucidChart.
Thx, really great tut for me.
Glad you liked it
Why we made separate table for guardian type? The guardian type can be just stored in student_guardian table
It could be stored there. However, having a pre-defined list of guardian types makes it easier to select from a list, and also ensures that only these values can be used. If it's free text then it's easier to put in the wrong data.
thank you for another fantastic video! In the final schema, the one thing I don’t understand is which start_period_id and end_period_id in the Class table are both linked to the PK in the Period table. Shouldn’t they be linked to the start_time and end_time fields in the Period table? (I’m new at this, haha)
Glad you liked it! Good question. The reason is so that all the classes can have the same start and end time. The start and end times are attributes of a period, and not a class. For example, "Intro to Physics is in period 1 so it starts at 9AM", rather than "Intro to Physics is at 9AM". This also means that any class in period 1 will start at 9AM, which can help with timetables.
But this is an assumption for how periods work from when I was at school. Different countries may work differently.
Having a start and end time on the class table could also work.
hey!
This is awesome, we would appreciate if you follow up another video with the rest of the requirements.
Thanks! Sure I can do a follow up video
really helpful video thanks!
Glad it was helpful!
why cant guardian_type and levels be enums?
They could be, but you have more control over separate tables and they can appear in drop-down lists. I created a video about enum vs lookup table here: th-cam.com/video/CkRbgDD7jNM/w-d-xo.html
Hi Do you have a template for school management system on access? Kindly share if any.
Do you mean a template on Microsoft Access? If so, then no, as I don’t use access. But you can use something like this video to start.
Thanks for your video! I have a question that how do we design if a class is held in many rooms and it has many periods on different days of week?
Good question. If that is a possibility you would need to have a joining table I believe, to capture the possibilities or combinations of many classes and many rooms.
Great video! Could you give me some pointers on how to capture Attendance using this same database design?
Thanks! I would suggest thinking about the kind of things you need to capture for attendance, and then how it relates to each of the existing tables.
For example, you may want to capture attendance for each student within each class for each time the class happens. So you may want an attendance table to link to the student, the class, and store a date, and perhaps an indicator of "attended" and "did not attend". You may also want to capture whether or not the student has already let the school know in advance, e.g. "away with a reason", to tell them apart from students who did not attend but nobody knows why.
@@DatabaseStar Thank you. Yes, that's exactly what I want to do. How would I set up my relationships between the three tables: Student, Class, and Attendance?
Please. Could you elaborate on the relationship rules, example if student get removed which data get removed or changed to null. ON DELETE and ON UPDATE. That will be great...
Good idea. Generally you would either remove the related IDs or set them to NULL, depending on what rules you wanted to implement. Alternatively you could have a new column in the student table for "active", and if you need to delete a student you would set active=0 instead, so you kept the data. This concept is called "soft delete" and is common.
Which software is used
I use LucidChart for this.
Does this cater to students of all year levels and college students? I'm expecting that the diagram would work on Elementary and Senior High School students, but may not work in college as it is quite different. But knowing the moodle is capable of doing it, maybe I'm wrong.
You’re right, it may not work on college students. One reason is that it doesn’t include courses or majors and the ability to have different subjects within them. But the design could be expanded for that I think.
@@DatabaseStar Thank you.
Is it same for noSQL database mongoDB
The concepts should be the same, but the implementation may be different. I don’t have any experience with nosql.
please make on online course database design where each lesson also contains quiz. Student needs need to complete the quiz of the lesson to be able to move to the next lesson
Good idea! I'll create it in the future.
@@DatabaseStar thanks
Please can you do this but for colleges
Sure, I think this design should work for colleges as well. The year level could include rows for different years of college.
How can i learn to design a database based on requirements? i know sql commadns but i dont know how to desin a database teh shape etc
I've got a video here that shows you how to design a database from an idea or requirements: th-cam.com/video/5RpUmDEsn1k/w-d-xo.html
@@DatabaseStar I had an interview and i got rejected cause they asked me to change my database based on some different requirements and i dont know what to study.
Hi sir, is there any way for asking questions to you on your paid courses?, how to contact you if I have questions before enrollment. Could you please provide the contact
Contact form does not work. Could you help
Hey, yeah you can contact me with any questions you have at my email: ben@databasestar.com.
What issue are you having with the contact form?
Naming tables in singular? Not a good start.
Yeah singular vs plural is a common debate in the database world. Do you prefer plural?
@@DatabaseStar just messing with you. I do prefer plural though.
Going by the recent happenings in the USA, you should have a separate table for storing the Gender information😅😅
Yeah and I think a lot of places may do this, so that Gender can be a drop-down list.