Jeff Vyduna

ENG±Design ¤ Course6±Couse15 ¤ DJ±Gigs ¤ Ski±Powder ¤ Fly±Current 

Bad ideas - No referential integrity? Cascade orphans vs plugging orphans

Cascading deletes in RI prevent orphans.

From a recent migration:

# Kill orphaned payment methods... they DO exist :(
    execute "delete from payment_methods where user_id is null"

Since we have no proper cascading deletes at the DB level, this just pushes the problem upstream while deleting valuable historic data.  In other words, now we have orphaned orders with respect to payment methods.

If Kaiser Healthcare taught me one good trick, it's that if you're not using RI and you encounter orphaned relationships, plug the holes, don't remove the holes by sandblasting a bigger hole.  Update orphans with a specific row that identifies them.  Next time make a User with a first name "WARNING:ORPHAN" and assign it to all the orphaned payment methods.

Comments [0]

Two funny vids

Comments [0]

Poll Everywhere has new JBL Eons. 60lbs per RMS kilowatt. Shivers.

Comments [0]

Home Media Solutions: Goodbye, Hello, and Other Salutations

Goodbye Comcast Cable TV, SlimServer/Squeezebox, Terk LeapFrog

Hello Rdio, Spotify, and AirFoil, UAWKS. I buy you. I eagerly await Plex.

You can stay, iTunes.

Welcome back WinVNC, Chicken of the VNC, and overpriced iPad VNC client.

Thanks for sucking, AT&T (grumble hello Microcell, grumble)

Please die a painful death, Comcast "Domain Helper".  

DropBox, I'd buy you at any price if you offered a 1TB plan and fixed your small team limits/counting.

Comments [0]

As with any typical American moving story, it both starts and ends with Comcast flexing its bountiful incompetence to screw you 5 ways to Sunday.

Posted from my mobile phone (SMS)

Comments [0]

Appalachia man questions Flip Video capabilities

The Flip Video has ULTRA HD?

Comments [0]

Getting excited to move to SF on Aug 1. So many _good_ people there.

Comments [4]

SuidICE Bombing of Posterous

Last nice I got iced by Agarwal. 

Today I iced their entire office.

Comments [0]

Oil painting

Comments [0]

Check out this site I found on StumbleUpon!

StumbleUpon | Discover Your Web.
Discover Favorites Stumblers
Hi,

Check out this site I found using StumbleUpon!

FilterMusic | Internet radio stations, electronic & house ..
su.pr/1UXmkp


- Jvyduna


View now! >


About StumbleUpon
Discover great web content recommended by your friends and like-minded stumblers just by clicking the Stumble! button - learn more.
If you do not wish to receive emails sent by your friends via StumbleUpon, please click click here.

Comments [0]