• RonKyle (9/2/2015)


    We all just need to come to terms with the fact that application programmers have a need to locally persist things like shopping carts, messaging, or just generic objects. It doesn't fit well within a relational model, or it just doesn't need a relational model, and that's OK, because what they're doing is not real database design in the first place.

    I could come to terms with this, if that's all this were. But I've seen too many cases where the foreign keys could and should have been used. But they weren't, and there are data issues. There are things that don't lend themselves to the relational model, such as messages. And while a shopping cart might not immediately lend itself to the relational model, when the items are bought or returned, they should be able to fit in the model. There may be some good reasons, but most of the time in my view people are just avoiding what they see as unnecessary or tedious work.

    I was thinking more along the line that inter-process messaging and in progress shopping carts (or just web application session state in general) probably should be persisted in something like MongoDB or XML rather than contained in a RDMS. Now, once the user clicks the submit button on the order entry web page, then the shopping carts gets inserted as a real purcahse order into the RDMS. Until then, it's just digital fluff. Other types of website fluff like click stream data or someone's pet BI project to analyze Twitter feeds should never be persisted to the RDMS... ever.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho