Mysql – How to design Person table in MySQL

database-designMySQLnormalizationsubtypes

I have two person type: Users and Clients.
Users can login the panel but clients can't login the panel.
My current database: (but this design not good for me. I need to connect these tables to the Persons table.)

My database:

You can see these tables storing same data like: firstName, lastName… but the difference is that the customer does not have a password.
enter image description here

How can I connect these tables to Persons table.

  • Users can login with email and password.
  • Client can't login but have email for contact.

I would be happy, If you answer it with a database diagram.

Best Answer

simply, use only one table with a column isclient, which determines if you can log in.

Or if you have lots of more columns for a client a column clientid, which is Null if user is no Client and else use the unique id to the table with clientmoreinformation.

Generally don't have redundant columns or tables.