<div style="MARGIN: 0in 0in 10pt" class="MsoNormal"><font size="3"><font face="Calibri">Hi,</font></font></div>
<p style="MARGIN: 0in 0in 10pt" class="MsoNormal"><font size="3"><font face="Calibri">With reference to my previous ideas regarding zoom search, I present here some of the implementation details of the project. </font></font></p>
<p style="MARGIN: 0in 0in 10pt" class="MsoNormal"><font size="3"><font face="Calibri">Implementation tags: php, jQuery, ajax</font></font></p>
<p style="MARGIN: 0in 0in 10pt" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><font size="3"><font face="Calibri">Default View:</font></font></b></p>
<p style="MARGIN: 0in 0in 10pt" class="MsoNormal"><font size="3"><font face="Calibri">Every database is first represented as a scatter of points based on its primary key values.</font></font></p>
<p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpFirst"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><font size="3" face="Calibri">1.</font><span style="FONT: 7pt 'Times New Roman'"> </span></span></span><font size="3"><font face="Calibri">This is very intuitive if the primary key is a numeric value.</font></font></p>
<p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><font size="3" face="Calibri">2.</font><span style="FONT: 7pt 'Times New Roman'"> </span></span></span><font size="3"><font face="Calibri">For varchar type primary keys we can always define ranges. For example the values based on initials can be clubbed together and represented as a graph. The following illustration shows it</font></font></p>
<p style="MARGIN: 0in 0in 0pt 0.5in" class="MsoListParagraphCxSpMiddle"><font size="3" face="Calibri"> </font></p>
<p style="MARGIN: 0in 0in 0pt 0.5in" class="MsoListParagraphCxSpMiddle"><font size="3"><font face="Calibri">C|</font></font></p>
<p style="MARGIN: 0in 0in 0pt 0.5in" class="MsoListParagraphCxSpMiddle"><font size="3"><font face="Calibri">B|</font></font></p>
<p style="MARGIN: 0in 0in 0pt 0.5in" class="MsoListParagraphCxSpMiddle"><font size="3"><font face="Calibri">A|___________________________________</font></font></p>
<p style="MARGIN: 0in 0in 0pt 0.5in" class="MsoListParagraphCxSpMiddle"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes"> </span>Values with their relative order in the class-></font></font></p>
<p style="MARGIN: 0in 0in 0pt 0.5in" class="MsoListParagraphCxSpMiddle"><font size="3"><font face="Calibri">Example: ‘AB’ and ‘AC’ will belong to the same class of A but ‘AC’ will lie to the right of ‘AB’.</font></font></p>
<p style="MARGIN: 0in 0in 0pt 0.5in" class="MsoListParagraphCxSpMiddle"><font size="3"><font face="Calibri">Zooming into a class will result in more detail scale. Ex A on the y axis will become AA, AB etc.</font></font></p>
<p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpLast"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><font size="3" face="Calibri">3.</font><span style="FONT: 7pt 'Times New Roman'"> </span></span></span><font size="3"><font face="Calibri">If a primary key is represented as enum (which is very rare) then a pie chart can be formed.</font></font></p>
<p style="MARGIN: 0in 0in 10pt" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><font size="3"><font face="Calibri">User defined:</font></font></b></p>
<p style="MARGIN: 0in 0in 10pt" class="MsoNormal"><font size="3"><font face="Calibri">The user will be allowed to pick up 2 columns and then view them graphically. The allowed type will be based on the type on the data type of the 2 columns.</font></font></p>
<p style="MARGIN: 0in 0in 10pt" class="MsoNormal"><font size="3"><font face="Calibri">For example: A varchar and integer col can be represented as a graph with discrete classes (‘A’,’B’ etc) on the x axis and values at the y axis. And can be accordingly mapped. </font></font></p>
<p style="MARGIN: 0in 0in 10pt" class="MsoNormal"><font size="3"><font face="Calibri">At every zoom level we keep a track of the points displayed. The cool feature of this api will be as the user selects 2 columns to view at any zoom level. The points available at that zoom level get affected and form a scatter (or the graph depending on the selection).</font></font></p>
<p style="MARGIN: 0in 0in 10pt" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><font size="3"><font face="Calibri">Some intuitive operation</font></font></b></p>
<p style="MARGIN: 0in 0in 10pt" class="MsoNormal"><font size="3"><font face="Calibri">Once the data is graphically represented we can easily associate values with each point and manipulate them (update, delete).</font></font></p>
<p style="MARGIN: 0in 0in 10pt" class="MsoNormal"><font size="3"><font face="Calibri">Also a nice addition can be a graphical way of inserting data as we can map every single pixel easily using jQuery (even simple javascript also) we can register a click (when user is in the insert mode) and appropriately map the 2 columns displayed and provide a nice ajax pop up that will allow user to add information about other fields in the table.</font></font></p>
<p style="MARGIN: 0in 0in 10pt" class="MsoNormal"><font size="3"><font face="Calibri">These are the feature I find appropriate for a 13*40hr project. One of the hot trends on the mailing list was how to implement zooming feature.</font></font></p>
<p style="MARGIN: 0in 0in 10pt" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><font size="3"><font face="Calibri">ZOOOoooooOM</font></font></b></p>
<p style="MARGIN: 0in 0in 10pt" class="MsoNormal"><font size="3"><font face="Calibri">At this juncture I can think of a simple algorithm based on jQuery. The ui will listen to the mouse wheel. At every discrete step it will create a rectangle with center at the mouse pointer location. Every time we zoom in the rectangle will be reduced in its size. Since we will map every pixel in the ui we can easily find out the points that lie inside the region and hence appropriately show them.</font></font></p>
<p style="MARGIN: 0in 0in 10pt" class="MsoNormal"><font size="3"><font face="Calibri">One advantage of this is we can use simple limits for points and check what all qualifies. Also this will also allow us to provide an abstract view of level of zoom in the database also. </font></font></p>
<p style="MARGIN: 0in 0in 10pt" class="MsoNormal"><font size="3"><font face="Calibri">For example: A small section in the ui can show the database and a rectangle showing where we are right now.<br style="mso-special-character: line-break">
<br style="mso-special-character: line-break"></font></font></p>
<p style="MARGIN: 0in 0in 10pt" class="MsoNormal"><font size="3"><font face="Calibri">Let me know your suggestions.</font></font></p><br clear="all"><br>-- <br>Dushyant Tiwari<br>BITS Pilani KK Birla Goa Campus<br>