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

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.
主站蜘蛛池模板: 平泉县| 册亨县| 闽清县| 开化县| 东方市| 四会市| 武强县| 商南县| 偃师市| 宣武区| 利川市| 白水县| 芮城县| 大埔区| 武义县| 泉州市| 二手房| 墨竹工卡县| 晋州市| 钟祥市| 长岭县| 志丹县| 永安市| 靖边县| 慈利县| 揭东县| 东方市| 当涂县| 手游| 澄迈县| 沅江市| 祁东县| 平武县| 定陶县| 武城县| 峡江县| 华安县| 弋阳县| 麻城市| 察隅县| 绥宁县|