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

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: RDBMSes 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 languages eliminates the network data transfer. Finally, some procedural SQL languages utilize clever caching algorithms.
  • Last-minute change: For SQL procedural languages, one could deploy bug fixes without service disruption.
Implementing business logic in the database tier has a lot of pros and cons and it is a highly contentious topic. For example, some disadvantages of implementing business logic in the database are visibility, developer efficiency in writing code due to a lack of proper tools and IDEs, and code reuse.
主站蜘蛛池模板: 白山市| 榆中县| 拜城县| 饶河县| 分宜县| 宣恩县| 吉林市| 陇南市| 峨眉山市| 乐昌市| 泸州市| 德清县| 论坛| 宣恩县| 荥经县| 巩义市| 车险| 绥芬河市| 隆化县| 桂林市| 顺平县| 新干县| 三门峡市| 新源县| 河津市| 石门县| 西畴县| 永年县| 弋阳县| 徐汇区| 内乡县| 潍坊市| 湘潭市| 张家口市| 社会| 安多县| 惠来县| 邻水| 沅陵县| 怀柔区| 鄯善县|