How to normalize this database?

1

I have a problem creating a database where a company can have up to 16 employees. Where each worker can have this data:

$sqlupdate3 = "Update tb_detalhe_trabalhador SET
Nome3='$Nome3',Funcao3='$Funcao3',
MedicaValidade3='$MedicaValidade3',
MedicaAnexo3='$MedicaAnexo3',
EPISValidade3='$EPISValidade3',
ProjectistaNumero3='$ProjectistaNumero3',
ProjectistaValidade3='$ProjectistaValidade3',
GasNumero3='$GasNumero3',
GasValidade3='$GasValidade3',
RedesNumero3='$RedesNumero3',
RedesValidade3='$RedesValidade3',
SoldadorNumero3='$SoldadorNumero3',
SoldadorValidade3='$SoldadorValidade3',
MecanicoNumero3='$MecanicoNumero3',
MecanicoValidade3='$MecanicoValidade3',
ClasSoldadorNumero3='$ClasSoldadorNumero3', 
ClasSoldadorValidade3='$ClasSoldadorValidade3'
  where id=$id ";

 mysql_query($sqlupdate3) or die(mysql_error());

Is it better to create a table company and 16 worker or just a worker     

asked by anonymous 26.06.2014 / 18:53

2 answers

4

You can normalize by following the pattern of the 5 Normal Forms (FNs) given this example below for a simpler one and having fewer tables after being normalized:

I think the proposal of this site is to clarify or help in the solution of the problem and not to make a complete problem of presenting its solution completely. The development of the problem starts from your understanding of the problem.

    
24.09.2014 / 23:56
0

The ideal would be to separate everything possible, for example up to the functions of employees, there should be a table called functions and there be registered and then linked by ID to employees. The question is that are few, employees what would result in only making a table to generalize, but it's how I think: Today there are 16 tomorrow may have 20, 30, 100 ...

    
26.06.2014 / 20:18