Database modeling

4

I created the following model:

Would you like to know what can be improved? taking into consideration good practices for database?

Explanation:

In% of%, a person will create a login, which can be of type TBLogin or PessoaFisica . NOTE: In this case a PessoaJuridica = PessoaJuridica

In Empresa I put the fields that are common for both types of people.

TBPessoas TBEndereco TBCidades is for storing the location.

TBEstados related to TBVagas (Enterprise). It would be the vacancies that this person / company would register to divulge.

TBPessoaJuridica All TBCurriculos can only have one curriculum. The curriculum consists of PessoaFisica that in the case would be the languages that the person speaks, being able to have + of 1.

TBIdiomas It is a professional background from where the person has already worked. TBEmpregos Are the trainings that a person has. (College / Faculty / Courses) TBFormacoes are the types of training. Ex: (undergraduate / post-graduate / master's / doctorate / high school / etc)

OBS: I'm not very good with modeling, I have little knowledge of table relationships and stuff.

    
asked by anonymous 25.09.2015 / 17:41

2 answers

6
  

I do not know what to do now because the answer was invalidated by editing the question.

It is always difficult without knowing the real requirements. What may be right in one case may be wrong in another.

I did not find any serious bugs as seen on many models. Generally I liked everything, even the details, except for prefixing the tables with TB and naming the tables in the plural. Of course the information is scarce. Tables have few columns. What I see is that real listings usually have more data. But it may not be your case. It may be that you want to expand later. Then the model can start to go wrong. But I can only speak of what I see now.

What I do not like but I can not say that it is wrong without knowing the details:

Have a relationship table of people with addresses depending on whether it is physical or legal. It makes something sense to do so but I would not. I think it's duplication of effort in most cases.

I find it strange to be bound to resume, but will know if there is a reason. Maybe it's the person's turn of interest. She can have several, right? Have you thought about this?

Obviously there is a simplification and rigidity of what can be in a curriculum but I can not argue this in the concrete case. Even depending on the position it is likely that specific tables may be needed to report on certain types of skills. But it's just speculation of mine. You can be creative here.

Ah, positioning the diagram could give more emphasis to the most important tables and make the least important, secondary, complementary satellites clearer. But nothing that affects the model, of course.

    
25.09.2015 / 18:08
2

From my point of view the model is practically correct.

The only change I would make would be as follows:

Pessoa -> Endereco (1..N)
Pessoa -> PessoaFisica (1..1)
Pessoa -> PessoaJuridica (1..1)

So eliminating the tables:
- TBPessoasFisicas_has_TBEndereco . - TBPessoaasJuridicas_has_TBEndereco .

After all, a person has an address, no matter if it is legal or physical. Thus creating TBPessoa_has_TBEndereco .

I did not understand the table of Vagas , related to legal entity, after all you are identifying the person, Vagas would be better related to a Empresa table because the company has vacancies.     

25.09.2015 / 18:13