Business Logic: Database or Application Layer

前端 未结 24 3208
春和景丽
春和景丽 2020-11-28 02:50

The age old question. Where should you put your business logic, in the database as stored procedures ( or packages ), or in the application/middle tier? And more importantly

24条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-28 03:44

    It's really up to you, as long as you're consistent.

    One good reason to put it in your database layer: if you are fairly sure that your clients will never ever change their database back-end.

    One good reason to put it in the application layer: if you are targeting multiple persistence technologies for your application.

    You should also take into account core competencies. Are your developers mainly application layer developers, or are they primarily DBA-types?

提交回复
热议问题