Bank modeling with classes with n relationship for n

Asked

Viewed 87 times

0

Galera Good morning.

I’m modeling a company that owns several branches. Basically I have information, of size, of the organization chart of each size, and of positions in the branches.

For example

Size: Small 1, Small 2 , medium, large, ...

Item Chart: Direction, Markting, Sales, Logistics, Manage ...

Position: Director, Secretary, Manager, Seller, Deliverer, Co-deputy...

That’s basically the problem.

Every branch of the company has a size. A port can have several items of the organizational chart (for example if the unit is small 1 can have only the item of the sales org chart, if it is small 2 can have management and sales, if it is medium can have direction, manage and sales, etc. ), and an item of the organization chart may be linked to various sizes (for example, direction may be in small to large, already management may be only in medium and large size, etc.). An organogram item can be related to another, for example, I have direction as a parent and under direction I have management and markting, and under markting I have sales and so on. Each position is linked to an organizational chart item, which can have one or more (e.g.: In the management chart I can have the position of director and secretary), as well as each item can have one or more positions. And the positions are linked to subsidiaries, a branch can have several positions, and I can have the same position in several branches, but the position is not linked to the size itself, for example I can have the position of secretary in the governing chart of a small branch, but maybe you don’t have a position as head office in a middle branch, or it depends on each unit.

I did some modeling at Astah Essa. However I do not know if it is correct, and from it (or the correct one), how would model the database (Using mysql).

Organograma

1 answer

0

It’s not correct, _rel_organograma_de_porte, you have a link going from you to yourself, please delete it. If variables are connected, you have to make a separate table. When the connection is 'n' to 'n', it also creates an intermediate table that will store the values but with different ids. Leaving [Size] n ---- 1 [AUXILIARY TABLE] 1 ---- n [item_organogram]. Finally, it is not convenient to have "T" connections a dashed line does not separate into 2, makes the independent connections.

Example of a good data model: Good example

  • So would you have to have another chart of size org chart relationship for the org chart of size? Another thing I didn’t understand the question of the "T" call, how so do independent? You mean the classes have no association relationship?

  • Yes to the first question, on the second question, you must have a relationship yes. I was just saying to put the tables with the different links, that is, the _rel_organograma_de_porte, was a link to Porte and another link to item_organograma, but independent. Two separate lines. And establish if the classes are all Large at the beginning, for some homogeneity.

Browser other questions tagged

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