5 ms·
I suspect with (non-standard?) SQL extensions and pl/sql functions you could add enough validation that is otherwise inexpressible (in standard SQL). But then y
by wereHamster 12y ago
I suspect with (non-standard?) SQL extensions and pl/sql functions you could add enough validation that is otherwise inexpressible (in standard SQL). But then you have to replicate some of that logic in your application code and the database. Anyways, let's start with something simple: sumtypes. While simple sumtypes could be described using enums, what if the alternatives have more data attached to them?
data User = Anonymous | Registered UserData
data UserData = UserData
{ userName :: UserName
, registredAt :: UTCTime
}
Foreign keys is something that can't be easily verified in Haskell code. So that's something where a proper database still is useful.