External employee registration Validation mysql php

Asked

Viewed 62 times

0

I want to register external employees in a mysql database using php.

Each employee has to have in his possession an access credential where it appears: Company, Validity of credential, validity of insurance against risks and medical fitness to work.

I am trying with the following tables: People, Zones, Credentials, Medical Aptitude, Insurance and a record table to calculate how many working hours this employee worked. (In the future I would like to have a log to know the days and hours, but for now so arrives!)

This attached relationship is correct ? Or it can improve ?

Thank you very much.

inserir a descrição da imagem aqui

1 answer

0

Your model is functional but you’ve thought about using nvarchar for complex text fields such as the name? varchar saves a string of characters in 8 bits, while nvarchar keeps a Unicode string, allowing accentuation and special characters.

The amount of memory spent with nvarchar is bigger but it is worth spending a few more bytes to not worry more with coding errors.

  • Thank you so much for your help! Another question is also the two types of relationship with identification and without identification. In this case you think this without identification is the most suitable ? Thank you

Browser other questions tagged

You are not signed in. Login or sign up in order to post.