A
A
Andrew2021-09-14 14:13:14
Database design
Andrew, 2021-09-14 14:13:14

How to correctly distribute information across tables?

Hello! I am designing a system in which there will be a website, cms for it, as well as crm. I settled on the option where the site + cms on one host, and crm on another (previously there was an option to make a monolithic application site + cms + crm in one).

On the site + cms there will be a table with users, and in crm there will be leads, contacts and employees (leads are converted into contacts over time, and employees are converted to staff who use crm), that is, a total of 4 tables only for users!

Thus, the question arises: how to share it correctly? In my understanding, 4 tables, where there are many identical fields - this is not very normal.

UPD.
The site + cms will have users with 3 roles: clients, editors, admins. After registering on the site, clients enter the contact tables of the crm system, where it is almost completely duplicated, but several fields are added.
Any customer data (phone number, mail, etc.) gets into the lead table, but there is not always a full name. Ultimately, the lead is converted into a client, where the missing information is supplemented.
Crm is administered by employees with roles: manager, admin (more, these are taken as an example).

If anyone has come across, please let me know!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2021-09-14
@saboteur_kiev

Well, how can you answer something like this?
How do we know what exactly you plan to do in your tables?
Where did a lot of the same fields come from if you have different data everywhere?
1. Can you give a normal example of the structure of tables, then you can think about it.
2. Look at ANY CMS, how it's done


In my understanding, 4 tables, where there are many identical fields - this is not very normal.

It's bad if there is a lot of the same data, but just the same fields - well, there are millions of examples of databases with logs, where a new table starts every month, with the same fields, and this is normal.

J
jazzus, 2021-09-15
@jazzus

users
roles
user_role (many to many)
profile fields in profiles mixed for all roles or for example client_profile for clients (has one)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question