Database Design
Generic question. I cannot figure out how to design the database in the following scenario:
OtherTable
is in relation with Users
, but there is a default Value
that should belong to all users.
This can be solved by creating a resource with the same value for each user, but I feel like this is a bad practice.
What other options do I have? I am using EF with Postgres, but I do not think that matters.2 Replies
You can use a default value for the column https://www.postgresql.org/docs/current/ddl-default.html
PostgreSQL Documentation
5.2. Default Values
5.2. Default Values # A column can be assigned a default value. When a new row is created and no values …
Thanks, this would be a good option