Example Queries Find the names of all instructors whose department is in the Watson building {t|3s e instructor(t [name]=s [name Au∈department(u[dept_name]=s[dept_name]“ Au[building]=“Vatson"”)} Find the set of all courses taught in the Fall 2009 semester,or in the Spring 2010 semester,or both {t3s e section(t [course_id]=s [course_id] s [semester]="Fall^s [year]=2009 v3ue section(t [course_id]=u [course_id] u[semester]=“Spring'”^u [year]=2010)} Database System Concepts-7th Edition 27.7 ©Silberscha乜,Korth and Sudarshan
Database System Concepts - 7 27.7 ©Silberschatz, Korth and Sudarshan th Edition Example Queries ▪ Find the names of all instructors whose department is in the Watson building ▪ Find the set of all courses taught in the Fall 2009 semester, or in the Spring 2010 semester, or both {t | s section (t [course_id ] = s [course_id ] s [semester] = “Fall” s [year] = 2009 v u section (t [course_id ] = u [course_id ] u [semester] = “Spring” u [year] = 2010 )} {t | s instructor (t [name ] = s [name ] u department (u [dept_name ] = s[dept_name] “ u [building] = “Watson” ))}
Example Queries Find the set of all courses taught in the Fall 2009 semester,and in the Spring 2010 semester (t |3s e section (t [course_id]=s [course_id s [semester]="Fall"^s [year]2009 A3u∈section(t[course_id]=u[course_id]∧ u[semester]=“Spring”∧u [year]=2010)} ■ Find the set of all courses taught in the Fall 2009 semester,but not in the Spring 2010 semester {t |3s e section (t [course_id]=s [course_id s [semester]="Falls [year]2009 3ue section (t [course_id ]=u [course_id] u[semester]=“Spring”Au[year]=2010)} Database System Concepts-7th Edition 27.8 ©Silberscha乜,Korth and Sudarshan
Database System Concepts - 7 27.8 ©Silberschatz, Korth and Sudarshan th Edition Example Queries {t | s section (t [course_id ] = s [course_id ] s [semester] = “Fall” s [year] = 2009 u section (t [course_id ] = u [course_id ] u [semester] = “Spring” u [year] = 2010 )} ▪ Find the set of all courses taught in the Fall 2009 semester, and in the Spring 2010 semester ▪ Find the set of all courses taught in the Fall 2009 semester, but not in the Spring 2010 semester {t | s section (t [course_id ] = s [course_id ] s [semester] = “Fall” s [year] = 2009 u section (t [course_id ] = u [course_id ] u [semester] = “Spring” u [year] = 2010 )}