Relationship in tables in the database

0

I have a table in the database called Veiculo and it has the following fields: placa , renavam , marca , cor and categoria .

For placa and renavam everything is fine, since the data is unique.

My question is regarding the columns marca , cor and categoria . Today I save everything in the Veiculo table and I do not make a relationship with other tables. It is necessary and / or recommended, through "good practices", to create a table for marca , another for cor and another for categoria and just reference its ID in table Veiculo ? >

Does the database behave this way better by avoiding repeated information?

    
asked by anonymous 24.10.2017 / 18:26

1 answer

0

Yes, best to relate tables by agilidade and mainly economia de espaço .

For example: All registro of a "black" car will have 5 caracteres correct?

If you have a tabela relacionada , it would only be chave

Also at the time of consulta , the more data the greater the processamento .

Basically that's it.

    
24.10.2017 / 18:33