e-r diagram for a university enterprise

9
©Silberschatz, Korth and Sudarsha 1 atabase System Concepts - 6 th Edition E-R Diagram for a University E-R Diagram for a University Enterprise Enterprise

Upload: mufutau-lawrence

Post on 03-Jan-2016

564 views

Category:

Documents


41 download

DESCRIPTION

E-R Diagram for a University Enterprise. Schema Diagram. Relational Schemas. Classroom ( building , room-number , capacity) Department ( dept-name , building, budget) Course ( course-id , title, dept-name, credits) Instructor ( ID , name, depart-name, salary) - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: E-R Diagram for a  University Enterprise

©Silberschatz, Korth and Sudarshan1Database System Concepts - 6th Edition

E-R Diagram for a University E-R Diagram for a University EnterpriseEnterprise

Page 2: E-R Diagram for a  University Enterprise

©Silberschatz, Korth and Sudarshan2Database System Concepts - 6th Edition

Schema DiagramSchema Diagram

Page 3: E-R Diagram for a  University Enterprise

©Silberschatz, Korth and Sudarshan3Database System Concepts - 6th Edition

Classroom (building, room-number, capacity)

Department (dept-name, building, budget)

Course (course-id, title, dept-name, credits)

Instructor (ID, name, depart-name, salary)

Section (course-id, sec-id, semester, year, building, room-number, time-slot-id)

Teaches (ID, course-id, sec-id, semester, year)

Student (ID, name, dept-name, tot-cred)

Takes (ID, course-id, sec-id, semester, year, grade)

Advisor (s-ID, i-ID)

Time-slot (time-slot-id, day, start-time, end-time)

Prereq (course-id, prereq-id)

Relational SchemasRelational Schemas

Page 4: E-R Diagram for a  University Enterprise

©Silberschatz, Korth and Sudarshan4Database System Concepts - 6th Edition

Page 5: E-R Diagram for a  University Enterprise

©Silberschatz, Korth and Sudarshan5Database System Concepts - 6th Edition

Page 6: E-R Diagram for a  University Enterprise

©Silberschatz, Korth and Sudarshan6Database System Concepts - 6th Edition

Page 7: E-R Diagram for a  University Enterprise

©Silberschatz, Korth and Sudarshan7Database System Concepts - 6th Edition

Page 8: E-R Diagram for a  University Enterprise

©Silberschatz, Korth and Sudarshan8Database System Concepts - 6th Edition

Page 9: E-R Diagram for a  University Enterprise

©Silberschatz, Korth and Sudarshan9Database System Concepts - 6th Edition

1. A list of the names of those instructors who are in the Physics department.

2. Find the ID, name, department and salary for those instructors whose salary is greater than $80000.

3. Find the ID (only) for those instructors whose salary is greater than $80000.

4. Find the names of all instructors whose department is in the Watson building.

5. Find the ID numbers for those courses that were taught in the Fall 2009 semester, the Spring 2010 semester, or both.

6. Find the ID numbers for those courses that were taught in the Fall 2009 semester and in the Spring 2010 semester.

7. Find the ID numbers for those courses taught in the Fall 2009 semester, but not in the Spring 2010 semester.

8. Find those instructor salaries that are not the maximum.

9. Find the largest instructor salary.

10. Find the names of those computer science instructors, along with the titles of all courses that the instructor teaches.

11. Find the monthly salary for each instructor; include the instructor name in the result.

12. Find the average salary for each department; include the department name in the result.

13. Final the ID numbers for those students who have taken all courses offered in the Biology department.

Sample QueriesSample Queries