Designing SQL database with two types of users
If that is a good model or not depends mostly on how you use the tables:


If you expect that many queries or foreign key constraints will refer to &ldquo;brand and/or customer&rdquo;, your proposed model may be the way to go.
If the tables are mostly used separately, using only two tables might be better.


If your concern is mostly that the tables should share certain columns, you could also use PostgreSQL table inheritance:

CREATE TABLE users (
   id bigint PRIMARY KEY,
   username text NOT NULL,
   email text,
   password text NOT NULL
);

CREATE TABLE brands (
   storename text NOT NULL,
   ...
) INHERITS (users);

CREATE TABLE customers (
   stripeuserid text NOT NULL,
   ...
) INHERITS (users);


Then brands and customers are separate tables, but they are guaranteed to have the same columns as users (and others in addition).

Then you can query users to see rows from both customers and brands, but you cannot use users as the destination of foreign keys to either customers or brands.