patternMinor
Relational algebra and indexes
Viewed 0 times
relationalalgebraandindexes
Problem
How might indexes be represented in the context of relational algebra?
How would an optimizer transform a query to use indexes?
How would an optimizer transform a query to use indexes?
Solution
Indices must not appear in relational algebra. That is because relational algebra is just a formal language which describes what you must do, but not how you must do it.
It is comparable to the multiplication and other operations of the elementary arithmetic.
There is a definition of what multiplying is but not of the way how you have to do it. There are several algorithms to multiply two numbers but the results are all equal. For further information see Wikipedia (What does it mean to multiply two natural numbers?).
Relating to your question that means that the result of an operation is the same with or without indices. The only difference is the increasing performance if you use indices.
It is comparable to the multiplication and other operations of the elementary arithmetic.
There is a definition of what multiplying is but not of the way how you have to do it. There are several algorithms to multiply two numbers but the results are all equal. For further information see Wikipedia (What does it mean to multiply two natural numbers?).
Relating to your question that means that the result of an operation is the same with or without indices. The only difference is the increasing performance if you use indices.
Context
StackExchange Computer Science Q#82100, answer score: 4
Revisions (0)
No revisions yet.