Question 1:

Let us suppose that XYZ University's Administration Office needs a database to handle
student’s transcript da...
Each department is managed by a chair, and at least one professor. Professors must be assigned to
one, but possibly more d...
Department




                    Is
                    Assigned




                   Dept-Prof




   offe
          ...
Upcoming SlideShare
Loading in …5
×

Univ

827 views

Published on

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
827
On SlideShare
0
From Embeds
0
Number of Embeds
41
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Univ

  1. 1. Question 1: Let us suppose that XYZ University's Administration Office needs a database to handle student’s transcript data. The following are the requirements: The database keeps track of each student's name, enrollment no. (E. No.), • communication address and phone no., permanent address and phone no., date of birth, sex, class, department, college, major subjects (a 4-char code). Some applications need to refer individually to the city, state (2-char abbrv.) and • zip code (some use 5-digit, some use 9) of the student’s address. Some applications need to refer to student’s first and last names separately. Enrollment no. should be unique number for each student. Each department has a name, a 3-char code, location (main building and room • number), office phone, college, and a list of instructors. Many colleges are affiliated to the University. Department names and code are unique, within the university. Each instructor has his/her enrolment no., first name and last name. • The course catalog contains the list of courses that XYZ University offers. Each • course has a number (e.g. 543), name, description, credit hours and department. Course numbers are unique within a department, but not unique across the university (so taken together, they are unique). Not every course is offered every semester. Each section has a single instructor (first and last names - no team-taught class), • semester (1-4) year (2-digit), course number and section number. A grade report contains the student's name, E. No, course number and section, • letter grade (A, B,C, D, E). Note: If the above user requirements leave out any important detail, assume that it is handled the way XYZ does things in the real world. Answer the following questions based on the above requirements and specifications: Draw an E-R diagram of the above. • List all the accompanying attributes/domains (including constraints). • Convert your E-R diagram to a relational schema: • o Use naming as specified in the E-R diagram. o Use the format as shown in the example below, including: Table name in caps List of attributes with primary key underlined Foreign key specified with table/attribute it references (with .. cascade, it appropriate) (7 marks) Answer:
  2. 2. Each department is managed by a chair, and at least one professor. Professors must be assigned to one, but possibly more departments. At least one professor teaches each course, but a professor may be on leave and not teach any course. Each course may be taught more than once by different professors. We know of the department name, the professor name, the professor employee id, the course names, the course schedule, the term/year that the course is taught, the departments the professor is assigned to, the department that offers the course Identify attribute(s) that uniquely identify each occurrence of that entity. DEPARTMENT: name DEPT-PROF: dept. name employee id PROFESSOR: employee id SEMESTER: employee id course name COURSE: course name STUDENT: enrollment number Semester Identify Attributes Identify all entity characteristics relevant to the domain being analyzed. Excluding those keys already identified: Schedule, Term, Professor name, Department Chair (which is an employee ID, a foreign key to Professor) Map Attributes Determine which to entity each characteristic belongs. Do not duplicate attributes across entities. If necessary, contain them in a new, related, entity. Schedule Semester, term Semester, Chair Department
  3. 3. Department Is Assigned Dept-Prof offe has rs instructor teaches Semester Courses has Student Takes exam Grade

×