官术网_书友最值得收藏!

Semantic constraints

Integrity constraints or business logic constraints describe the database application constraints in general. These constraints are either enforced by the business logic tier of the application program or by SQL procedural languages. Trigger and rule systems can also be used for this purpose. For example, the customer should have at most one active service at a time. Based on the nature of the application, one could favor using an SQL procedural language or a high-level programming language to meet the semantic constraints, or mix the two approaches.

The advantages of using the SQL programming language are as follows:

  • Performance: RDBMSs often have complex analyzers to generate efficient execution plans. Also, in some cases such as data mining, the amount of data that needs to be manipulated is very large. Manipulating the data using procedural SQL language eliminates the network data transfer. Finally, some procedural SQL languages utilize clever caching algorithms.
  • Last minute change: For the SQL procedural languages, one could deploy bug fixes without service disruption.

Implementing business logic in database tier has a lot of pros and cons and it is a highly arguable topic. For example, some disadvantages of implementing business logic in the database is visibility, developers efficiency in writing code due to a lack of proper tools and IDEs, and code reuse.

主站蜘蛛池模板: 北海市| 卓资县| 宝应县| 汤阴县| 南京市| 徐州市| 洛扎县| 万年县| 巴彦县| 康乐县| 鄂托克旗| 深圳市| 漳平市| 米泉市| 开原市| 绵阳市| 松江区| 临沧市| 大城县| 绥棱县| 彭州市| 阿拉善左旗| 新津县| 广安市| 深水埗区| 鄯善县| 龙海市| 汨罗市| 临泽县| 信宜市| 余干县| 玉山县| 嘉兴市| 榆树市| 康平县| 凤城市| 宁武县| 临江市| 莫力| 出国| 甘德县|