rename operation evaluated
git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@115 014f5005-505e-4b48-8d0a-63407b615a7c
This commit is contained in:
parent
720d888c22
commit
79058f3871
22
complexity
22
complexity
@ -16,6 +16,10 @@ Notation
|
||||
Single letters will be used to indicate relations and letters between
|
||||
| will indicate the cardinality (number of tuples) of the relation.
|
||||
|
||||
Then after evaluating the big O notation, an attempt to find more
|
||||
precise results will be done, since it will be important to know
|
||||
with a certain precision the weight of the operation.
|
||||
|
||||
1. UNARY OPERATORS
|
||||
|
||||
Relational defines three unary operations, and they will be studied
|
||||
@ -42,7 +46,23 @@ Notation
|
||||
In the end we have O(|n|) as complexity for a selection on the
|
||||
relation n.
|
||||
|
||||
The assumption made of considering constant the number of fields is
|
||||
a bit strong. For example a relation could have hundreds of fields
|
||||
and two tuples.
|
||||
|
||||
So in general, the complexity is something more like O(|n| * f) where
|
||||
f is the number of the fields.
|
||||
|
||||
1.2 Rename
|
||||
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
The rename operation itself is very simple, just modify the list
|
||||
containing the name of the fields.
|
||||
The big issue is to copy the content of the relation into a new
|
||||
relation object, so the new one can be modified.
|
||||
|
||||
So the operation depends on the size of the relation: O(|n| * f).
|
||||
|
||||
1.3 Projection
|
||||
|
||||
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
Loading…
Reference in New Issue
Block a user