Sony Arouje

a programmer's log

Worse denormilization I ever heard

with 4 comments

I was interviewing a guy for a new project with 7+ years experience. To start with I gave him a problem of representing a sales order in C# class. The candidate asked some more details about the Sales Order, so I explained like, I went to a shop and purchased Paste, tooth brush, etc, that means a sale order can have multiple items.

He tried for some time but couldn’t come up the class design. In my mind I already rejected him, to give him a feeling of some success, I asked him to design the table structure for the Sales Order. This is what he come up with.

Column Name Data Type
OrderId int
OrderDate Date
Paste int
ToothBrush int
Rice int
Onion int


He explained the design as well. If the user purchase Paste then the Quantity will go to the Paste column and like that. I wanted to see how extend he will go. I told him that my company have 100k products and how you will fit it in the above design. He answered, alter the table and add 100k columns to that table.

I interviewed so many persons in my career and never talked about the details to any one. But this one was the worse interview I ever had and thought of sharing it.


Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Martin Golding

Let me know if you guys have any experience like this.

Written by Sony Arouje

November 12, 2013 at 12:58 pm

Posted in Uncategorized

Tagged with

4 Responses

Subscribe to comments with RSS.

  1. Which was his native ????


    November 12, 2013 at 7:06 pm

  2. He might have said that with ignorance. But he may be into something which can be future. He flipped the way we think about data and database and flattened the table. I always like poeple who thinks differently than others. That gives a different prespective to my team. He may not be fit for your job. But that doesn’t mean that its the worst answer which cannot be used somewhere. That design may be easier for some other purpose… But that depends on your data and storage requirement.



    November 13, 2013 at 2:55 am

    • pramod, will you take him to your team for the current projects? lets leave the future

      Sony Arouje

      November 13, 2013 at 10:27 am

Leave a Reply to Sony Arouje Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: