S
S
Stanislav Shendakov2018-06-18 10:40:08
Database
Stanislav Shendakov, 2018-06-18 10:40:08

How to organize the database structure according to the “Employees” entity?

Good afternoon. Rewriting ERP. There were disagreements on the structure of the database. Please share links to examples of the organization's database structure, for starters, only for employees. The information will be standard, address, passport, family, children, phone, email, etc. Thanks in advance

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Eugene, 2018-06-18
@klim76

one table - "employees"
columns in it:
address, passport, family, children, phone, email, etc.
what's wrong?

R
RidgeA, 2018-06-18
@RidgeA

It can be so.
There is a table "Person" - there is a full name, some more data. These will be both employees and family members.
There is a table with employees - there will be a link to an entry in the table of people - these will be employees.
There is a table with a relationship employee - family members, where the relationship will be indicated - spouse, child, etc.
According to a separate table for phones, email, addresses - one person can have several of them - you need a table with a connection between a person and a phone, indicating the status of the phone (primary, work, mobile), etc. (if it is necessary at all)
With addresses it can be a little more difficult - if there is a directory of cities / streets - then indicate the connection with this directory. You can, of course, just a line.
But this option is more complicated, you can do something simpler if there are no requirements for extensibility (but we must remember that the requirements tend to change)

D
d-stream, 2018-06-18
@d-stream

There is still a table "contractors"? (Well, or it will be)
So, an employee is a counterparty + little things regarding access rights, etc. Moreover, at times, the physicist contractor can also become an employee and vice versa ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question