How to handle different types of users?

my site will now begin to allow signing of two different types of users ...

  • normal people
  • the company

both will be able to do the same thing on the site, but their profiles will look different, and I'm sure they will want to store different types of information about themselves.

My question is: should I store them in separate mysql tables? or ... should I put them on 1 and designate them as "user" or "company"?

I could use your input to help avoid mistakes with ...

thanks!

+3
source share
2 answers

.

" " UID, .

"" , UID, , , , "" , .

, .

:

Accounts
UID|UserName|Password|Account Type

Companies
UID|Company Name|Address|Contact Person

Users
UID|First Name|Last Name|Display Name
+8

, , , . , , "" . , .

+1

Source: https://habr.com/ru/post/1703148/


All Articles