Is a 'blackhole' table evil?

后端 未结 8 602
一生所求
一生所求 2021-01-01 16:09

Reading to this question i\'ve just learned the existence of the blackhole table trick: basically consist in using a single table to insert data, and then a tri

8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-01 16:47

    Don't do this. The fact that it's called a trick and not a standard way of doing something says enough for me.

    This totally kills the normal usage pattern of the relational model. Not sure that it actually kills normal form as you can still have that all in place. It's just messing with the way data is making it to the destination tables. Looks like a performance nightmare on top of a maintenance nightmare. Imagine one table having a trigger that has to fire for 1,800 plus table inserts for example. That just makes me feel sick.

    This is a interesting parlor trick nothing more.

提交回复
热议问题