4 ms·
Let's assume there is a business requirement that an order belongs to a customer. By definition, this is business logic. If you implement this requirement by cr
by taffer 6y ago
Let's assume there is a business requirement that an order belongs to a customer. By definition, this is business logic. If you implement this requirement by creating a foreign key constraint, then you have added business logic to the database. If there is a business requirement to calculate the sum of all wages in a department, and you do this via an aggregation in SQL, then you have processed business logic in the database.
If you are not allowed to do this kind of things, then what is left? Do you interact with your database as if it were just a bunch of VSAM files?
- UK-Al05 6y agoTbh a lot of NoSQL databases don't use foreign key constraints. If you have a SQL system with messaging and eventual consistency you have to turn them off anyway. So in a lot of ways, yes people use databases like they're just persistent memory with indexes.