Answer the question
In order to leave comments, you need to log in
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
one table - "employees"
columns in it:
address, passport, family, children, phone, email, etc.
what's wrong?
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)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question