From: Jeremy Shaw <jeremy.shaw@li...>  20051117 20:10:24

Hello, I highly recommend this book[1] for anyone interested in developing next generation haskelldb: Database System Implementation Hector GarciaMolina Jeffrey D. Ullman Jennifer Widom Prentice Hall http://wwwdb.stanford.edu/~ullman/dbsi.html Most of the book is not relevant to haskelldb  BUT the first halfs of chapters 6 and 7 contain a relational algebra that: (1) works on bags instead of sets (2) supports sub queries (3) supports various joins, sorts, grouping, aggregation (4) supports bag aware query optimization The rest of the book is probably not too helpful for haskelldb development  so you may want to visit a university library if you can... On the otherhand  if you want to write an entire DB in haskell, it is a pretty easy, comprehensive book. Jeremy Shaw. [1] Apparently this book has been superceded  I have not looked at "Database Systems: The Complete Book", but it appears it contains similar (perhaps better) information in chapters 5 and 16 5 Relational Algebra 5.1 An Example Database Schema 5.2 An Algebra of Relational Operations 5.2.1 Basics of Relational Algebra 5.2.2 Set Operations on Relations 5.2.3 Projection 5.2.4 Selection 5.2.5 Cartesian Product 5.2.6 Natural Joins 5.2.7 ThetaJoins 5.2.8 Combining Operations to Form Queries 5.2.9 Renaming 5.2.10 Dependent and Independent Operations 5.2.11 A Linear Notation for Algebraic Expressions 5.2.12 Exercises for Section 5.2 5.3 Relational Operations on Bags 5.3.1 Why Bags? 5.3.2 Union, Intersection, and Difference of Bags 5.3.3 Projection of Bags 5.3.4 Selection on Bags 5.3.5 Product of Bags 5.3.6 Joins of Bags 5.3.7 Exercises for Section 5.3 5.4 Extended Operators of Relational Algebra 5.4.1 Duplicate Elimination 5.4.2 Aggregation Operators 5.4.3 Grouping 5.4.4 The Grouping Operator 5.4.5 Extending the Projection Operator 5.4.6 The Sorting Operator 5.4.7 Outerjoins 5.4.8 Exercises for Section 5.4 5.5 Constraints on Relations 5.5.1 Relational Algebra as a Constraint Language 5.5.2 Referential Integrity Constraints 5.5.3 Additional Constraint Examples 5.5.4 Exercises for Section 5.5 5.6 Summary of Chapter 5 5.7 References for Chapter 5 16.2 Algebraic Laws for Improving Query Plans 16.2.1 Commutative and Associative Laws 16.2.2 Laws Involving Selection 16.2.3 Pushing Selections 16.2.4 Laws Involving Projection 16.2.5 Laws About Joins and Products 16.2.6 Laws Involving Duplicate Elimination 16.2.7 Laws Involving Grouping and Aggregation 16.2.8 Exercises for Section 16.2 