DMG Forums | Project 2 discussion
DMG Forums >> 6th Semester >> CSEN 604 - Databases II >> Project 2 discussion Page of 3
Project 2 discussion
Author Topic

GUC Faculty

Join Date: 10/7/2008
Posts: 14

Posted: 4/7/2009 11:59:01 PM

Dear All,

Please use this forum to post any questions you have about Project 2: Visual Query Tracer for SimpleDB.

The main goal of this project is for you to understand the process of Query processing and optimization by building an Interface that traces a Query in SimpleDB.

The main packages that concern you are:

SimpleDB has several limitations inSQL statements:
(checkout the final paragraph of the readme.txt )
Don’t consider any Update SQL statements
(Only Select-From-Where statements)
You can use any visual APIs, Tree APIs, tree data structures, or a totally new way for visualising the process (it up to you)
Documentation of the code, the notes of these slides and some scanned notes on MET are enough resources for you to get this done.

Don’t worry about the simpledb.parse: your work starts with the QueryData object which has the query and gives methods for extracting Query info

When specifying the cost next to each, you don’t have to specify the algorithm, focus on number of records and blocks accessed

Your project effort includes following and understanding the steps of the Basic planner and the heuristic optimizer of SimpleDB; therefore, Shereen and I will not answer any questions except about:
Requirements of the project
How it should look like
General Database concepts.
In all cases, use the MET forums to post these questions, so everyone will see the answers. We are not going to answer the same question a million times.

The best tool will be demonstrated for the whole class to visualise some example queries
Also, it will be used for next generations of this course
A Bachelor project to improve the algorithms of SimpleDB will be using this tool as well with credits to the original developers of course

Wait for the Slides on the site on Saturday (11/4) since I had problems posting them today.


Join Date: 10/19/2008
Posts: 1

Posted: 4/12/2009 3:05:01 PM

When is the deadline for project 2?

GUC Faculty

Join Date: 10/7/2008
Posts: 14

Posted: 4/12/2009 5:24:39 PM

The deadline is 7th of May


Join Date: 9/19/2008
Posts: 5

Posted: 4/17/2009 11:45:03 PM

What exactly do you want to see in the log and in the visualizer?
Please give me a list of information you want to see as output.



Join Date: 9/19/2008
Posts: 5

Posted: 4/18/2009 12:25:38 PM

The requirements aren't specified clearly anywhere (in the lecture, you didn't say the required output other than that in the picture of the program view which is not enough).
Also I can't get the plan tree (there is no get methods for the plans inside the plans)

GUC Faculty

Join Date: 10/7/2008
Posts: 14

Posted: 4/18/2009 10:50:08 PM

Dear Mina,

What I want to see in the log: the steps taking place in the process
The level of detail is up to you but for example,

Create a plan for the product of Table Student and Table department
Create a select of dept=1 on the result

About the nodes in the visualiser, look at the Query trees we talked about in heuristic optimization. You will find tables as leaf nodes and operations as internal nodes, so that is what I want to see.

For each node, you can print out the number of records and number of blocks easily from any plan datatype, they are built in methods.

There is nothing called plan tree, you build the tree based on your understanding of what goes on between tables and operations.

Again remmeber that tables are leafs and operations are internal nodes.


Join Date: 9/19/2008
Posts: 5

Posted: 4/19/2009 3:59:08 PM

Can I modify the classes of simpledb or I am not allowed?

There is not methods in simpledb that allows me to get the plan order, for examle: what i understood is that SelectPlan can contatin another Plan which maybe ProjectPlane, TablePlan or whatever. But, there is not get methods inside each type of Plan to get the child Plan. So, this means I have to use the Plans myself to construct the tree (But you said that I don't have to. Also this why HeuristicPlanner is there), or add get methods for the Plan object inside each kind of Plan to get the tree.

What should I do?

GUC Faculty

Join Date: 10/7/2008
Posts: 14

Posted: 4/19/2009 7:48:32 PM

You really don't need to add anything except whatever you do to collect data or visualise them.

If you follow the steps of the planner, you will know that the tree is built step by step and if you just record or visualise these steps, you have your tree. There is nothing like child or parent data structures, it is all logical now.

For example, in the basic planner when the planner starts by gathering the tables and rotates through them to create a product, this will mean to you that you have these tables names as leafs and the product is your internal node that connects these leafs. So now I have a tree but I didn't actually call any extra methods to know that. It only requires my understanding of the process and that is what I am asking for.

Just trace the process, it simply tracing of Java in addition to understanding of what we said in the lecture about heuristic optimization.

Good luck


Join Date: 10/16/2008
Posts: 6

Posted: 4/20/2009 1:35:51 AM


should I let the user choose between using Heuristic Optimization or not as I saw in picture of the program in the lecture or i just use it right away as its better than not using it?

In the picture i saw Output records and blocks accessed twice under log and visualise. Whats the meaning of putting them twice or it is just an example? if the two are the same it is ok to just put the records/block accessed under the log (as in visualising, the output is mainly a diagram) right?

And if i made step by step execution, each step should correspond to a thing done in the query processing or it can be more than one thing depending on how i want to detail eac step?


GUC Faculty

Join Date: 10/7/2008
Posts: 14

Posted: 4/21/2009 12:02:59 AM


The work you will do includes support for both basic and heuristic anyway. changing the planner to be heuristic or basic requires almost no effort. However, you should do it since it is a requirement and it will make you read the basicqueryplanner which is very simple yet good to understand. I would start with the basic planner in any case.

I don't understand your second question however, the text log is like a secondary way of visualising so, you have the tree and you have the text next to it. So, it is repeated anyway.

I will leave the step by step execution detail up to you as long as you use the text log to make us understand what is going on.

Good luck,


Join Date: 9/19/2008
Posts: 5

Posted: 4/23/2009 1:30:21 AM


Now, to do the job of the HeuristicPlanner and to build the plan tree, I need to use TablePlanner to start with the leaves, but TablePlanner has a default (package) access only and not public. So, can I modify it to be public in order to use it in my package?


GUC Faculty

Join Date: 10/7/2008
Posts: 14

Posted: 4/24/2009 10:35:49 PM


I don't know how you designed your visualiser but you don't need to change even the access permissions of the classes. However, only for this project, I don't care that you do any changes that you want as long as you are not changing the logic of the simpledb


Join Date: 9/14/2008
Posts: 1

Posted: 5/3/2009 3:59:44 PM

i just want to ask:
1. what is the "QueryData data" & "Transaction tx"
in the "" class.
2. Is their exist a method to take the query as a string , or how can i input the query as a string and return the plan".


Join Date: 10/25/2008
Posts: 1

Posted: 5/4/2009 4:37:24 PM

I just want to ask:
What should I do? I do not understand what the project is about? I also believe it is worth more than 5%.
I am a BI student, we'll finish exams on 5th of May, we have software engineering project and other assignments to submit. Can you please consider changing the deadline? Thank you


Join Date: 9/20/2008
Posts: 2

Posted: 5/4/2009 8:32:43 PM

can i assume that the input queries entered are always correct syntactically & logically ?

GUC Faculty

Join Date: 10/7/2008
Posts: 14

Posted: 5/4/2009 9:48:32 PM

For Nada,

Please read the description again of the project from the slides, or pass by me or by the TA for this question.

I already made an extension and the project is due friday midnight.
Also, the project is announced a long time ago, since 8th of April, so I will not accept complaints about having midterms because you had time before that.

In software engineering, you had no midterm, and again i didn a whole week extension for it demos.

all in all, please start working because I am not accepting execuses about time.

If you have any other questions or complaints related to material or understanding, please ask as much as you like
   Page of 3 Next »    Last »