Sloppy Data Modelling

davorg on 2003-02-20T11:02:16

Recently we ordered a lot of DVDs from Play.com. We placed half a dozen or so orders over a period of two weeks. One of the reasons for the separate orders was because we wanted some of the packages to go to different places. Sometimes we'd place two orders at the same time and ask for them to be delivered to two different addresses.

Not all of the DVDs we wanted were in stock as we ordered then, so the different orders were all sent out at different times over the next couple of weeks. But then we started getting phone calls from some of the various people that we'd sent them to saying that they'd got the wrong DVDs. Or no DVDs. We eventually got everything we ordered, but the packages seemed to go to random addresses.

So we contacted Play.com to find out what had happened. It turns out that we were the victims of sloppy data modelling on their part.

In their database, delivery address is an attribute of an account. Each account can only have one current delivery address. This means that as each delivery is shipped out, it is sent to the last delivery address that was given for that account.

This means that it's impossible to make two orders at the same time and send them to different addresses. They will both go the same address.

Note to Play.com's IT department - delivery address is an attribute of an order, not an account. It's ok to have a default delivery address as an attribute of the account, but a customer must be able to override that on any particualr order.

Didn't these people study business systems modelling?