开发者

what exactly does it mean to not do work in the database if we can do it elsewhere?

http://www.percona.com/ppc2009/PPC2009_Boring_MySQL.pdf:

Don't do work in the database if you can do it elsewhere

I must say I don't quite understand this statement开发者_Python百科. Can someone elaborate on it?

Does it mean the we should enforce integrity on the application level instead of at the database level?

Or does it mean something else completely?


We have no way of knowing. The only person who knows what he meant by that is the author, Baron Schwartz. A quick scan of his slides suggests he isn't an idiot, so I'm pretty sure he doesn't mean enforce integrity in the application not the database. He probably means don't overload the database with other processing that can be done more efficiently elsewhere.


Dont add business logic to the db if you can do it at the application level.

Database should be used as its name implies - to store data.

As a general rule of thumb, try keeping all logic in there to a minimum, otherwise your application becomes harder to maintain and more bug prone.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜