How to model in a correct way

4

I have the following table structure:

First: Is this modeling right?

Second: is there any way to improve? Reduce the number of tables?

The system will work as follows:

Each Candidate has a Professional Purpose. And each Professional Objective can be composed by Shift (Morning / Afternoon / Integral), Days (Monday to Friday), Profissoes (Analyst ... etc ...), and Salary Pretension. However, when filling out the Professional Objective, the Candidate may select more than one shift / day / profession.

    
asked by anonymous 26.06.2016 / 22:20

1 answer

4

As far as you can understand the description, it is correct.

You can always reduce the number of tables. A few days ago I saw a case of an entire system that fit into a table: D It even has to be with a single column and in most cases in a row:)

Joke aside, it is possible to reduce, but not necessarily advisable.

If mooring tables will always be accessed through ObjetivoProfissional , you can delete them and create 3 columns of variable size with each item's code list. This can be with VARCHAR , for example, but this is implementation detail. Contrary to popular belief, this can be very advantageous with little or no downside depending on what you want.

While totally correct, it is out of what people are accustomed to and can make the application somewhat difficult (it can also ease, it depends). It will certainly be faster.

I'm not saying I should do this, but it's an option I never rule out.

If you need independent access to tied items without going through ObjetivoProfissional , for example, see all the professionals that have a certain goal, then it is better to have the extra tables. Even if you can solve with the single table, it will be more complicated. That seems to be the case. So leave it as you modeled.

    
26.06.2016 / 22:35