andioop@programming.dev to Programmer Humor@programming.devEnglish · 3 days agoLittle Timmy Tablesprogramming.devimagemessage-square52fedilinkarrow-up11.16Karrow-down110
arrow-up11.15Karrow-down1imageLittle Timmy Tablesprogramming.devandioop@programming.dev to Programmer Humor@programming.devEnglish · 3 days agomessage-square52fedilink
minus-squareunalivejoy@lemmy.ziplinkfedilinkarrow-up86arrow-down1·edit-23 days agoI would make two separate views. CREATE VIEW NiceList AS SELECT * FROM Children WHERE behavior = 'nice' AND parent.income > 40000; CREATE VIEW NaughtyList AS SELECT * FROM Children WHERE behavior = 'naughty';
minus-squareNullPointerException@lemmy.calinkfedilinkarrow-up57·3 days agoThe income is a nice touch.
minus-squarecriss_cross@lemmy.worldlinkfedilinkarrow-up22·3 days agoThe poor kids can’t even afford coal and fall through the cracks.
minus-squareLaurel Raven@lemmy.ziplinkfedilinkEnglisharrow-up10·2 days agoOnly the nice ones, the naughty poor children get free coal
minus-squareRusty Shackleford@programming.devlinkfedilinkEnglisharrow-up3·1 day agoThe poor nice ones get beaten by the naughty rich ones.
minus-squareKairuByte@lemmy.dbzer0.comlinkfedilinkarrow-up7·3 days agoWhy are we using magic strings for behavior?
minus-squareThe Octonaut@mander.xyzlinkfedilinkarrow-up14·3 days agoIt’s an ENUM and other people have to read this fucking codebase too, Brian!
minus-squareOlap@lemmy.worldlinkfedilinkarrow-up5·2 days agoI’ve a DBA who would insist on this being in a dimension table and using a foreign key constraint instead of just a fucking string
minus-squareluciferofastora@feddit.orglinkfedilinkarrow-up5·2 days agoI like your DBA! Users probably don’t.
minus-squareWilly@sh.itjust.workslinkfedilinkEnglisharrow-up7arrow-down2·3 days agostop static “variables”! use COL. congress should do the same for setting minimum wage. eg parent.income > COL
I would make two separate views.
CREATE VIEW NiceList AS SELECT * FROM Children WHERE behavior = 'nice' AND parent.income > 40000; CREATE VIEW NaughtyList AS SELECT * FROM Children WHERE behavior = 'naughty';The income is a nice touch.
The poor kids can’t even afford coal and fall through the cracks.
Only the nice ones, the naughty poor children get free coal
But not the poor nice ones
The poor nice ones get beaten by the naughty rich ones.
Why are we using magic strings for behavior?
Feel free to fork my comment.
Does Santa accept PRs?
It’s an ENUM and other people have to read this fucking codebase too, Brian!
I’ve a DBA who would insist on this being in a dimension table and using a foreign key constraint instead of just a fucking string
I like your DBA!
Users probably don’t.
stop static “variables”! use COL. congress should do the same for setting minimum wage. eg parent.income > COL