From 79058f387135ff5321dc5899f486e88035083c07 Mon Sep 17 00:00:00 2001 From: LtWorf Date: Thu, 19 Mar 2009 12:56:15 +0000 Subject: [PATCH] rename operation evaluated git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@115 014f5005-505e-4b48-8d0a-63407b615a7c --- complexity | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/complexity b/complexity index d6cec86..48fadab 100644 --- a/complexity +++ b/complexity @@ -15,6 +15,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 @@ -41,8 +45,24 @@ 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 -1.3 Projection \ No newline at end of file + 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 \ No newline at end of file