6 ms·
But functional-only business applications already did take the world by storm! Relational DBs is the defacto way data is organized, and a Junction table is the
by IggleSniggle 6y ago
But functional-only business applications already did take the world by storm! Relational DBs is the defacto way data is organized, and a Junction table is the way you model the data so that a functional query (generally in SQL) can be made against it.
- username90 6y agoSQL is not functional, it mutates global state.
- perl4ever 6y agoSELECT?
- IggleSniggle 6y agoYes, there is a single transactional global state. There is always state somewhere, the question is where it should be. Global state is the input to the program, and a new global state is the output. Given identical inputs, it will always produce the same output. This is the entire principle behind ACID, and mutation of global state is a common approach for functional programmers regardless of whether they they are using a DB or not. If a DB were not fully transactional, or if your queries of the DB are not deterministic themselves, then we’ve moved out of functional territory.