Postgresql – Making a foreign key nullable where it wouldn't always make sense
I'm trying to come up with a good database design for this use case I have a table called expenses as follows id category_id item_id Problem item_id column wouldn't make sense if the expenses category is i.e. "Rent" It would…