Is the following database modeling in my head?

5

I created this modeling (just an idea), so that it does not have null / white fields.

I have not completely revised it. There may be fields that would be blank. The matrix table was Entities and through the needs of there being no blank fields, the others appeared.

Of course there should be unnecessary fields in some tables, such as who registered / updated and when those actions occurred. I would like someone who understands modeling to have fit my idea and where what I did would hurt development. Thank you.

    
asked by anonymous 30.06.2016 / 20:42

2 answers

4

Outside the adopted nomenclature that I do not like, but not a problem, does not seem to have errors within the request of the question. But if it will not hurt at all it is more complicated to say. I do not know how it will be used.

You can not guarantee just why there will not be whites. Not even null. But the model seems, so far as it can be understood, that it helps to avoid voids.

What is a good but should not be pursued at all costs .

What I found strange is the address table that can only have one item per entity. Or it would be interesting to put the address in the main table, since it only has one, or if this is wrong, you should take the column from the TEntidade table that lists the address and put a column in TEndereco that relates to the entity, so will allow multiple addresses, which I think is the intention.

There is a table that seems to be left over, for example TIE . I do not see why it exists. But there may be a reason I did not understand.

Some things seem loose. I do not see real links with TEntidadesTipos . It may be just a column name problem, but I also do not see link with TSituacoes .

I may have missed something.

    
01.07.2016 / 13:14
1

Nomenclature eh same as the toothbrush neh personal? LOL. But if there is a pattern I would read about.

bigown

The idea of the TENDERECOS eh table does not have duplicates. Wrong writing will exist, but there will always be people who will correct the right way. But if you write Uashinton Soares instead of Washington Soares? We will look for the zip code or via programming include addresses that include the second part of the name or mooring by the state zip codes, with an option to show all.

The TIE table, state registration, I do not know if all states have, but I have seen CNPJs that have not. I, like MEI, have not.

It exists to not leave white / null field in TPJ ;

I think RG should also make a separate table, since it's a secondary document.

TENTIDADESTIPOS are the types of entities (supplier, customer, consumer, employee, outsourcer, etc); TSITUACOES eh by account of the situation of an entity, request, purchase .. can be active, blocked, canceled, pending, closed, open, in transit, delivered ... these things.

    
01.07.2016 / 15:57