{"title":"设计和评估计算数据库关系的传递闭包的算法","authors":"Hongjun Lu, K. Mikkilineni, J. Richardson","doi":"10.1109/ICDE.1987.7272364","DOIUrl":null,"url":null,"abstract":"Recursive query evaluation is a capability of deductively-augmented database systems that conventional database systems do not support well, if at all. Many recursive queries involve computation of the transitive closure of a relation. Previously published algorithms for transitive closure are iterative in nature, performing repeated joins, unions, and differences until convergence is obtained. In this paper, we present an adaptation of Warren's algorithm for computing the transitive closure of a relation. Warren's algorithm was originally designed for a bit matrix representation of a binary relation; we have adapted it for use with a binary relation represented as a set of tuples, as in a relational database management system. This adapted algorithm computes the transitive closure in two passes over the relation. We analyze the performance of this algorithm, and compare it to the performance of two algorithms based on relational algebra: an iterative algorithm, and an improved version of the iterative algorithm that eliminates unnecessary I/O at the expense of more computation. We evaluate the performance of the algorithms for different source relation sizes, available memory sizes, join selectivities, and maximum path length. Our results show that no algorithm has uniformly superior performance; the adaptation of Warren's algorithm is superior when the source and result relations are not too much larger than main memory. We conclude that in future systems with large main memory, Warren's algorithm generally performs best, and thus should be implemented with the option of switching to an iterative algorithm when the source or result sizes are very large.","PeriodicalId":145433,"journal":{"name":"1987 IEEE Third International Conference on Data Engineering","volume":"69 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1987-02-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"59","resultStr":"{\"title\":\"Design and evaluation of algorithms to compute the transitive closure of a database relation\",\"authors\":\"Hongjun Lu, K. Mikkilineni, J. Richardson\",\"doi\":\"10.1109/ICDE.1987.7272364\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Recursive query evaluation is a capability of deductively-augmented database systems that conventional database systems do not support well, if at all. Many recursive queries involve computation of the transitive closure of a relation. Previously published algorithms for transitive closure are iterative in nature, performing repeated joins, unions, and differences until convergence is obtained. In this paper, we present an adaptation of Warren's algorithm for computing the transitive closure of a relation. Warren's algorithm was originally designed for a bit matrix representation of a binary relation; we have adapted it for use with a binary relation represented as a set of tuples, as in a relational database management system. This adapted algorithm computes the transitive closure in two passes over the relation. We analyze the performance of this algorithm, and compare it to the performance of two algorithms based on relational algebra: an iterative algorithm, and an improved version of the iterative algorithm that eliminates unnecessary I/O at the expense of more computation. We evaluate the performance of the algorithms for different source relation sizes, available memory sizes, join selectivities, and maximum path length. Our results show that no algorithm has uniformly superior performance; the adaptation of Warren's algorithm is superior when the source and result relations are not too much larger than main memory. We conclude that in future systems with large main memory, Warren's algorithm generally performs best, and thus should be implemented with the option of switching to an iterative algorithm when the source or result sizes are very large.\",\"PeriodicalId\":145433,\"journal\":{\"name\":\"1987 IEEE Third International Conference on Data Engineering\",\"volume\":\"69 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1987-02-03\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"59\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"1987 IEEE Third International Conference on Data Engineering\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ICDE.1987.7272364\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"1987 IEEE Third International Conference on Data Engineering","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICDE.1987.7272364","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Design and evaluation of algorithms to compute the transitive closure of a database relation
Recursive query evaluation is a capability of deductively-augmented database systems that conventional database systems do not support well, if at all. Many recursive queries involve computation of the transitive closure of a relation. Previously published algorithms for transitive closure are iterative in nature, performing repeated joins, unions, and differences until convergence is obtained. In this paper, we present an adaptation of Warren's algorithm for computing the transitive closure of a relation. Warren's algorithm was originally designed for a bit matrix representation of a binary relation; we have adapted it for use with a binary relation represented as a set of tuples, as in a relational database management system. This adapted algorithm computes the transitive closure in two passes over the relation. We analyze the performance of this algorithm, and compare it to the performance of two algorithms based on relational algebra: an iterative algorithm, and an improved version of the iterative algorithm that eliminates unnecessary I/O at the expense of more computation. We evaluate the performance of the algorithms for different source relation sizes, available memory sizes, join selectivities, and maximum path length. Our results show that no algorithm has uniformly superior performance; the adaptation of Warren's algorithm is superior when the source and result relations are not too much larger than main memory. We conclude that in future systems with large main memory, Warren's algorithm generally performs best, and thus should be implemented with the option of switching to an iterative algorithm when the source or result sizes are very large.