andioop@programming.dev to Programmer Humor@programming.devEnglish · 1 month agoLittle Timmy Tablesprogramming.devimagemessage-square8linkfedilinkarrow-up11arrow-down10
arrow-up11arrow-down1imageLittle Timmy Tablesprogramming.devandioop@programming.dev to Programmer Humor@programming.devEnglish · 1 month agomessage-square8linkfedilink
minus-squareNullPointerException@lemmy.calinkfedilinkarrow-up0·1 month agoWhy would Santa need two separate tables for this?
minus-squareunalivejoy@lemmy.ziplinkfedilinkarrow-up1·1 month 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-squareKairuByte@lemmy.dbzer0.comlinkfedilinkarrow-up0·1 month agoWhy are we using magic strings for behavior?
minus-squareThe Octonaut@mander.xyzlinkfedilinkarrow-up1·1 month agoIt’s an ENUM and other people have to read this fucking codebase too, Brian!
minus-squareOlap@lemmy.worldlinkfedilinkarrow-up1·1 month 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-up1·1 month agoI like your DBA! Users probably don’t.
Why would Santa need two separate tables for this?
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';Why are we using magic strings for behavior?
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.
Feel free to fork my comment.
Does Santa accept PRs?