this is for holding javascript data
H.S.Bhathiya(110059X) edited section_Proposed_Solution_We_propose__.tex
about 8 years ago
Commit id: e783a7850b4f3c25d4189eb9f472a30206718727
deletions | additions
diff --git a/section_Proposed_Solution_We_propose__.tex b/section_Proposed_Solution_We_propose__.tex
index afe5c2a..9888138 100644
--- a/section_Proposed_Solution_We_propose__.tex
+++ b/section_Proposed_Solution_We_propose__.tex
...
Here is normal query which results in left-deep tree on oracle
\begin{verbatim}
SELECT STUDENT.ID as Student_ID,
STUDENT.NAME as STUDENT_NAME,
INSTRUCTOR.ID as
Instructor_ID,COURSE.TITLE Instructor_ID,
COURSE.TITLE
FROM INSTRUCTOR ,TEACHES,COURSE,
TAKES, STUDENT
WHERE TEACHES.COURSE_ID=COURSE.COURSE_ID
AND TAKES.COURSE_ID = COURSE.COURSE_ID
AND STUDENT.ID = TAKES.ID
...
Now we force to build bushy tree by breaking down the queries to two sub queries. While sub queries result in multiple left deep-tree
\begin{verbatim}
WITH
t1 as (SELECT /*+ no_merge */
INSTRUCTOR.ID as Instructor_ID,
COURSE.COURSE_ID, COURSE.COURSE_ID as T1_ID
FROM
INSTRUCTOR,TEACHES,COURSE
WHERE
TEACHES.COURSE_ID=COURSE.COURSE_ID),
t2 as (SELECT /*+ no_merge */
STUDENT.ID as Student_ID,
STUDENT.name as Student_Name,
COURSE.COURSE_ID,
COURSE.COURSE_ID as T2_ID,
COURSE.TITLE as TITLE
FROM
COURSE, TAKES, STUDENT
WHERE
TAKES.COURSE_ID = COURSE.COURSE_ID AND STUDENT.ID = TAKES.ID)
SELECT t2.Student_ID, t2.Student_Name,
t1.Instructor_ID, t2.TITLE
FROM t1, t2
WHERE t1.T1_ID = t2.T2_ID;
\end{verbatim}