有效地监视数据库断言

M. Hammer, S. Sarin
{"title":"有效地监视数据库断言","authors":"M. Hammer, S. Sarin","doi":"10.1145/509252.509290","DOIUrl":null,"url":null,"abstract":"A principal impediment to the use of declarative assertions for monitoring the state of a dynamic database is the high cost of conventional implementation techniques for such a facility. This paper presents a means of efficiently detecting violations of assertions caused by updates to a database. Our technique is based on the premise that the structure of updates to a database can generally be anticipated, and that an analysis of the potential effect that an update may have on an assertion can enable the assertion to be efficiently tested when the update is performed.This analysis is performed by a compile-time assertion processor; for each type of update operation defined on the database, the assertion processor synthesizes a procedure that will be used to evaluate a set of given assertions whenever an operation of the given type is performed on the database. For each assertion and operation, the assertion processor performs a detailed logical analysis, called perturbation analysis, of the effect that the operation may have on the assertion. Perturbation analysis identifies conditions that can be efficiently tested at run-time (when an operation of the given type is performed) and that minimize the extent to which the assertion must be fully reevaluated; the identified conditions also enable the assertion to be tested before the update is actually performed, thereby avoiding the need for expensive back-out procedures in the case that the assertion is found to be violated. Based on this analysis, the assertion processor generates a set of alternative efficient means of determining whether or not execution of the operation causes the assertion to be violated. A database transaction processor, which estimates the performance cost of each of the alternatives in the context of the physical representation and access methods of the database, can then be used to identify the least expensive means of testing the assertion.This work has been done in the particular context of semantic integrity assertions, but it readily extends to related problems of database monitoring. The efficiency of testing that can be achieved through the use of our assertion processing technique in comparable with that attainable through the use of hand-coded procedures. The technique therefore supports all the advantages of the declarative approach to database assertion-monitoring, while retaining the level of efficiency that is usually associated with procedural methods.","PeriodicalId":385279,"journal":{"name":"Proceedings of the 1978 ACM SIGMOD international conference on management of data","volume":"31 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1978-05-31","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"56","resultStr":"{\"title\":\"Efficient monitoring of database assertions\",\"authors\":\"M. Hammer, S. Sarin\",\"doi\":\"10.1145/509252.509290\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"A principal impediment to the use of declarative assertions for monitoring the state of a dynamic database is the high cost of conventional implementation techniques for such a facility. This paper presents a means of efficiently detecting violations of assertions caused by updates to a database. Our technique is based on the premise that the structure of updates to a database can generally be anticipated, and that an analysis of the potential effect that an update may have on an assertion can enable the assertion to be efficiently tested when the update is performed.This analysis is performed by a compile-time assertion processor; for each type of update operation defined on the database, the assertion processor synthesizes a procedure that will be used to evaluate a set of given assertions whenever an operation of the given type is performed on the database. For each assertion and operation, the assertion processor performs a detailed logical analysis, called perturbation analysis, of the effect that the operation may have on the assertion. Perturbation analysis identifies conditions that can be efficiently tested at run-time (when an operation of the given type is performed) and that minimize the extent to which the assertion must be fully reevaluated; the identified conditions also enable the assertion to be tested before the update is actually performed, thereby avoiding the need for expensive back-out procedures in the case that the assertion is found to be violated. Based on this analysis, the assertion processor generates a set of alternative efficient means of determining whether or not execution of the operation causes the assertion to be violated. A database transaction processor, which estimates the performance cost of each of the alternatives in the context of the physical representation and access methods of the database, can then be used to identify the least expensive means of testing the assertion.This work has been done in the particular context of semantic integrity assertions, but it readily extends to related problems of database monitoring. The efficiency of testing that can be achieved through the use of our assertion processing technique in comparable with that attainable through the use of hand-coded procedures. The technique therefore supports all the advantages of the declarative approach to database assertion-monitoring, while retaining the level of efficiency that is usually associated with procedural methods.\",\"PeriodicalId\":385279,\"journal\":{\"name\":\"Proceedings of the 1978 ACM SIGMOD international conference on management of data\",\"volume\":\"31 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1978-05-31\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"56\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 1978 ACM SIGMOD international conference on management of data\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/509252.509290\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 1978 ACM SIGMOD international conference on management of data","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/509252.509290","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 56

摘要

使用声明性断言监视动态数据库状态的一个主要障碍是这种工具的传统实现技术的高成本。本文提出了一种有效检测由数据库更新引起的断言违反的方法。我们的技术基于这样一个前提:通常可以预测数据库更新的结构,并且分析更新可能对断言产生的潜在影响,可以在执行更新时有效地测试断言。该分析由编译时断言处理器执行;对于在数据库上定义的每种类型的更新操作,断言处理器将合成一个过程,该过程将用于在数据库上执行给定类型的操作时计算一组给定断言。对于每个断言和操作,断言处理器对操作可能对断言产生的影响执行详细的逻辑分析,称为扰动分析。摄动分析确定可以在运行时(当执行给定类型的操作时)有效测试的条件,并将断言必须完全重新评估的程度降至最低;所标识的条件还允许在实际执行更新之前对断言进行测试,从而避免在发现违反了断言的情况下执行代价高昂的回退过程。基于此分析,断言处理器生成一组可选的有效方法,用于确定操作的执行是否会导致断言被违反。数据库事务处理器在数据库的物理表示和访问方法上下文中估计每个备选方案的性能成本,然后可以使用它来确定测试断言的成本最低的方法。这项工作是在语义完整性断言的特定上下文中完成的,但它很容易扩展到数据库监视的相关问题。通过使用我们的断言处理技术可以实现的测试效率与通过使用手工编码的过程可以达到的效率相当。因此,该技术支持用于数据库断言监视的声明性方法的所有优点,同时保留了通常与过程方法相关的效率级别。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Efficient monitoring of database assertions
A principal impediment to the use of declarative assertions for monitoring the state of a dynamic database is the high cost of conventional implementation techniques for such a facility. This paper presents a means of efficiently detecting violations of assertions caused by updates to a database. Our technique is based on the premise that the structure of updates to a database can generally be anticipated, and that an analysis of the potential effect that an update may have on an assertion can enable the assertion to be efficiently tested when the update is performed.This analysis is performed by a compile-time assertion processor; for each type of update operation defined on the database, the assertion processor synthesizes a procedure that will be used to evaluate a set of given assertions whenever an operation of the given type is performed on the database. For each assertion and operation, the assertion processor performs a detailed logical analysis, called perturbation analysis, of the effect that the operation may have on the assertion. Perturbation analysis identifies conditions that can be efficiently tested at run-time (when an operation of the given type is performed) and that minimize the extent to which the assertion must be fully reevaluated; the identified conditions also enable the assertion to be tested before the update is actually performed, thereby avoiding the need for expensive back-out procedures in the case that the assertion is found to be violated. Based on this analysis, the assertion processor generates a set of alternative efficient means of determining whether or not execution of the operation causes the assertion to be violated. A database transaction processor, which estimates the performance cost of each of the alternatives in the context of the physical representation and access methods of the database, can then be used to identify the least expensive means of testing the assertion.This work has been done in the particular context of semantic integrity assertions, but it readily extends to related problems of database monitoring. The efficiency of testing that can be achieved through the use of our assertion processing technique in comparable with that attainable through the use of hand-coded procedures. The technique therefore supports all the advantages of the declarative approach to database assertion-monitoring, while retaining the level of efficiency that is usually associated with procedural methods.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信