1
I have a table with 25 columns (counting the FK) and two groups of users, one will access only 10 columns and the other will access almost all. Because I thought I had many columns in a single table (and I think object orientation too) I ended up dividing them into two, but I think it just increased the complexity.
So I’d like to know:
- 25 columns is a lot for a table?
- Thinking about goal orientation, are there many attributes to 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
A few more fields can be added.
Depends, depends on several factors. perincipalmente of your business.
– Marco Souza
Don’t divide tables randomly just by dividing, anyway. There are right ways and wrong ways to do this. With this amount of fields, there are likely to be some normalizations to be done. See this: http://answall.com/a/151394/132
– Victor Stafusa
Ah, and if you want better help, detail what your 25 fields are, one by one. Detail which are your 6 Fks and tell which are the exact 10 fields should be open to the first user. Without giving this information, the best you’ll get is a vague, generic, superficial response. With this information, it will be much easier to give you the answer you need.
– Victor Stafusa
I thought of a generic way to get a sense, but really, without detailing it gets difficult. I added the columns and seeing now, they are less columns and Fks than I thought, and it is also only the two asterisked columns that will not be visualized by one of the groups. Observing now it is evident that it is best not to separate. Thank you.
– Fernando Zabin