Split table in two?

1

I have a table with 25 columns (counting the FK) and two groups of users, one will only access 10 columns and the other will access almost all. Because I thought I had many columns in a single table (and think of object orientation as well) I ended up splitting it in two, but I think this only increased complexity.

Then I would like to know:

- 25 columns is too much for a table?

- Thinking about goal orientation, are many attributes for a class? (Large Class?)

- 6 FK is a high number?

- What would be ideal in a situation like this?

Columns:

codigo_projeto
codigo_interno
valor *
nota_fiscal *
data_entrega_relatorio
status
observacao1
observacao2
finalidade
tipo
setor
data_instalacao
data_ultima_avaliacao
data_conclusao
data_conclusao_laudo
concluido
idlocalizacao
idcultura
idalvo
idagrotoxico

You can add a few more fields.

    
asked by anonymous 13.12.2016 / 15:54

1 answer

6
  
  • 25 columns is too much for a table?
  •   

No, it's a misery.

  
  • Thinking about goal orientation, are many attributes for a class? (Large Class?)
  •   

Think about the need for your model, forget about this size thing. Object orientation is something else. If you do not understand what it is, do not even run after it. If you think it will help you, fully understand how it works before doing something, otherwise go in the obvious and howl.

  
  • 6 Is FK a high number?
  •   

No, numbers do not matter, what matters is whether you are expressing what you need. It may be exaggerated, but not because of the number, just because you may be doing what you do not need.

  
  • What would be ideal in a situation like this?
  •   

You can not tell without knowing the problem in depth.

    
13.12.2016 / 15:58