I am developing an application where I have multiple types of users. They all need the following data:
id | email | last_login
Beside these data, each have some type-specific data. For instance, I have a type user
with additional data:
first_name | last_name
and a type shop
with additional data:
shop_name | adress | phone | website
and finally a type supplier
supplier_name | adress | phone | category
I have been trying to find a solution, my first thought was to create 1 table and have an extra column extras
with a JSON list of data - but this would be bad for SQL sorting purposes.
How can I do this in a proper way?