Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,026 members, 7,810,829 topics. Date: Saturday, 27 April 2024 at 04:26 PM

Database Gurus. Check and critique My Design Please - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Database Gurus. Check and critique My Design Please (645 Views)

Rate My Design Using CSS And HTML Only (PICTURE) / New To Python, Gurus Please Help Solve These Challenges. Thanks. / How Beneficial Is Forum4africa? nairaland critique (2) (3) (4)

(1) (Reply) (Go Down)

Database Gurus. Check and critique My Design Please by Shugadpuna: 6:28pm On Sep 04, 2021
I have been coding using just NoSql mongodb databases but friends told me I won't go far as a backend if I don't understand things from relational. just started learning SQL and used August to complete a course on SQL from udemy. This is my first attempt at modelling a school database. Can anyone check and point me in the right direction, errors, what I could have done better and so on.
Note: The link between student and class it's not suppose be one to many, should be many to one instead, I made an error with the line direction.
Then there is a missing many to one illustration between student and arm too

Re: Database Gurus. Check and critique My Design Please by hakeemhakeem(m): 11:14pm On Sep 04, 2021
Shugadpuna:
I have been coding using just NoSql mongodb databases but friends told me I won't go far as a backend if I don't understand things from relational. just started learning SQL and used August to complete a course on SQL from udemy. This is my first attempt at modelling a school database. Can anyone check and point me in the right direction, errors, what I could have done better and so on.
Note: The link between student and class it's not suppose be one to many, should be many to one instead, I made an error with the line direction.
Then there is a missing many to one illustration between student and arm too

You are doing well
Re: Database Gurus. Check and critique My Design Please by Shugadpuna: 4:59am On Sep 05, 2021
hakeemhakeem:


You are doing well
Yeah... But no constructive comments?
Re: Database Gurus. Check and critique My Design Please by 4dor: 8:40am On Sep 05, 2021
Shugadpuna:
I have been coding using just NoSql mongodb databases but friends told me I won't go far as a backend if I don't understand things from relational. just started learning SQL and used August to complete a course on SQL from udemy. This is my first attempt at modelling a school database. Can anyone check and point me in the right direction, errors, what I could have done better and so on.
Note: The link between student and class it's not suppose be one to many, should be many to one instead, I made an error with the line direction.
Then there is a missing many to one illustration between student and arm too

It will nice if your tables indicate your primary key.
Re: Database Gurus. Check and critique My Design Please by Shugadpuna: 11:29am On Sep 05, 2021
4dor:


It will nice if your tables indicate your primary key.
Of course they will when I am actually implementing them.
Re: Database Gurus. Check and critique My Design Please by Shugadpuna: 4:07pm On Sep 05, 2021
Hmm
Re: Database Gurus. Check and critique My Design Please by DualCore1: 4:37pm On Sep 05, 2021
I'm not a DBA. So these are just my opinion from my developer point of view.

1. The '_id' suffixes are redundant. The field names could do without them.
e.g the parents_id field under student should be parents

2. The table name prefix before the id are redundant
e.g the parents_id field under parents table should just be id

3. There should be consistency in your table names, either all plural or all singular. I will go with all plural.
e.g arm should be arms

4. The date and time fields in attendance should be a single timestamp field, call it anything descriptive.. I will call it date_time

5. In my opinion if you have fields in your table that have incremental suffixes, it can be improved. Like the test_1 and test_2 in your graders table. It hurts the scalability of your db. I will have a single test field and store all the tests inside it as JSON.

6. Your student_subject table with its present design will have several rows. For better performance, have a student_subjects table with a student field to store the student's id and a subjects field to store a JSON array of the subject IDs. This way you will have just one row per student.
Personally I will discard that table entirely and put a subjects field under students table and store the subject IDs in that field as JSON


I would like to know if the course you took talked about field naming conventions. I prefer to see db table field names follow the same pattern of my variable names in my code. So I would do firstName instead of first_name... but this is just preference and ease.
Re: Database Gurus. Check and critique My Design Please by JFOD: 8:24pm On Sep 16, 2021
I'm no SQL guru , so I'll ask questions instead

I can see the relationship between parent and student table is a one to many relationship.

Looking at the real world, a child/student have two parents (A father and a mother), so I would have gone with a many to many relationship because multiple student can have the same parent.

why did you go with a one to many relationship?

My second question

what kind of school? elementary or high or tertiary?

(1) (Reply)

2013 African Startup Of The Year Awards. / Obama Encourages Students To Learn Computer Programing(exclusive Video) / Any Nairalander Programmer Residing In Ibadan?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 25
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.