this is for holding javascript data
H.S.Bhathiya(110059X) edited section_Proposed_Solution_We_propose__.tex
about 8 years ago
Commit id: 5408b9d5ed55712a9406a1f7864de33cc6f71964
deletions | additions
diff --git a/section_Proposed_Solution_We_propose__.tex b/section_Proposed_Solution_We_propose__.tex
index cfdabb4..afe5c2a 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
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
\end{verbatim}
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 INSTRUCTOR,TEACHES,COURSE
WHERE TEACHES.COURSE_ID=COURSE.COURSE_ID),
t2 as (SELECT /*+ no_merge */ STUDENT.ID as Student_ID,
student.name 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}