Let’s say you have a group of settings in your database. There are some settings that are specific for each client. But those settings can also be generic and be used for all the clients. So if ClientID column contains the key of your client you use that value but if there is no such value specified the value defaults to the value specified in the column with ClientID set to NULL. So in a way your client specific value inherits from the default value and if there is no specific value the default is used.
Now the things get more complicated if you can have some setting with a client specific value and no default value and some with a default value and no client specific value.
Let’s set up a test table and test data first.