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

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.
主站蜘蛛池模板: 清丰县| 湖北省| 博湖县| 静宁县| 长宁区| 南通市| 宁德市| 道孚县| 白沙| 宁津县| 江永县| 株洲县| 长顺县| 河南省| 霞浦县| 河西区| 文成县| 隆化县| 枣强县| 岑巩县| 枞阳县| 白河县| 砀山县| 台东县| 阜新| 叶城县| 星子县| 夏河县| 新泰市| 山阴县| 岗巴县| 大洼县| 贵阳市| 富锦市| 邵阳市| 寻乌县| 红河县| 新平| 临海市| 苍溪县| 潼关县|