2 ms·
Splitting data is just a hardcore way of splitting the responsibility for the data. You can't have 42 different classes directly poking the User-table for exam
by theshrike79 3y ago
Splitting data is just a hardcore way of splitting the responsibility for the data.
You can't have 42 different classes directly poking the User-table for example. You need one clear location that has the responsibility for the data.
If you move the User-table to a different database schema, other places CANNOT touch it because they won't have access to it =)
- aledalgrande 3y agoAnd then the order table will need to set user ids as a foreign key and you will have two sources of truth lol Will be fun when you decide that you want to have organizations to be linked to orders instead of users. All this to say, data management and having more than one source of truth complicates your world a lot. The responsibility for writing the data has to be solved at the appropriate layer: only one entity writing it.
- rewmie 3y ago> And then the order table will need to set user ids as a foreign key and you will have two sources of truth lol Why should your order manager service be tightly-coupled to your IAM service when the only responsibility it has is to store a single ID?
- fragmede 3y ago> And then the order table will need to set user ids as a foreign key and you will have two sources of truth You might be databasing wrong if that results in two sources of truth.