How many tables will be needed in MySQL?

0

I'm starting a project that aims to manage student grade and grade.

The information I need to store is:

  • Total subjects (All subjects that the student will need to study)
  • Matters in force (Matters released for the semester, ex 7)
  • Notes Proof 1, Proof 2, Proof-Exam and Average
  • Students (Full Name and CPF)
  • Test Dates

The correct thing would be to organize this information as? Would you create 5 tables and FK for everyone? Then you would pull each item when you needed it?

I tried to do with 2 tables, but it seems impossible ...

Obs. I just need what good practice would look like, you do not have to send the code, just the relational model anyway.

    
asked by anonymous 14.08.2018 / 05:28

1 answer

0

The hard part is collecting the requirements and looking deeply into what you need. Maybe you already did it well, you might not. If it is not well done, we can not help precisely.

Any reason to create as few tables as possible? I see no reason and it seems very wrong. I've already seen whole complex systems on a single table, it was at the same time one of the most tragic and comical things I've ever seen in IT.

Do you know normalization ? Need to know to model database tables.

On top, and I do not know if this is useful, they would really be the ones that stood out, but only because it was described like this:

  • Students
  • Disciplines
  • Disciplines X Semesters
  • Testing
  • Notes

I am considering that you only have one course and the semesters do not have relevant information and are considered implicitly without needing to register, the application will deal with it.

Data will be obtained according to normalization, in many cases using JOIN considering FK. In fact, this does not seem to be a difficult problem to solve, it requires something exceptional, unless the collection of requirements and analysis is wrong.

He spoke of good practice to the wrong person, I hate it, and I think it causes a mess in the minds of people, because deep down you want a universal cake recipe that solves her problem without having to think. In software development if this exists you do not have to hire people just to apply it, you would have it all ready. You have to learn the basics, understand everything as it works, the contexts, deeply analyze and apply each basic knowledge to find the best solution to the specific problem within that context.

Anyway, this is what gives you the answer, the model depends and it would be the code for you, it would not make sense because nothing indicates that you have code in it. That's why I do not like good practices, it seems the phrase was formulas, did not consider the context.

If you have any specific problems you can ask.

    
14.08.2018 / 05:43