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

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.
主站蜘蛛池模板: 南澳县| 禄劝| 黔西县| 莱西市| 九龙县| 岑溪市| 松原市| 赞皇县| 留坝县| 宜章县| 通渭县| 沾化县| 吴江市| 临夏市| 莱西市| 澄江县| 托克托县| 临夏县| 阳原县| 青岛市| 祁阳县| 东莞市| 托克逊县| 平阳县| 桦川县| 洪洞县| 乳源| 宁津县| 兰考县| 浙江省| 万安县| 湘乡市| 台前县| 孝感市| 梅州市| 宜君县| 丽水市| 乌拉特中旗| 灵丘县| 云林县| 开原市|