Sei sulla pagina 1di 2

SSN COLLEGE OF ENGINEERING Department of Computer Science & Engineering CS2258 DBMS Lab Assignment 1 Title: DDL for

or Student Course Enrollment

Faculty: P.Mirunalini, Asst. Prof. Umalakshmi, Asst. Prof. Assigned: 7-Jan-13 Due: 2 Lab Hours

Student Course Enrollment The University has decided to store information on the various courses offered by the department and the list of students who enrolled for different courses in a database. The following are the information collected during the interation with the Database users: a) The Student has a number, name, major, level and age. b) The Department has the details of ID, name and the head-of-department. c) The Faculty have their Faculty ID, name and the department for which they are working for. d) The Class has its name, meets_at day[s] of class conducted and the timing, for example: MTW 10:30-12:00, room number and the faculty handling the class. e) The Enrolled contains information about the students who have enrolled for their corresponding classes. The criteria assumed in while storing the student details are: # A class is handled by atmost one faculty. # The major is the course for which the student is enrolled within the department. # The course is different from the class enrolled by a student. Create the database with the following specifications: 1. The student number, faculty ID, class name and department ID are used to retrieve the tuple(s) individually from respective relations. 2. The level of the students can be FR for a freshman, SO for a sophomore, JR for a junior and SR for a senior. 3. Ensure that the student and class details can not be removed without deleting the enrolled details. Similarly the department details can not be removed without deleting the faculty which in turn can not be deleted without removing class details. 4. A student can enroll for as many classes. Similarly a class can be enrolled by as many

students. 5. The student number is of eight digits exactly. 6. The major of subject in which the student is studying must always be recorded. 7. The room where the classes are conducted must begin with LH. 8. The age of the student should not be less than 18. The following changes have been identified due to some semantic changes. As a database designer you must accommodate these changes in your design. 9. It was learnt that the faculty do not have the same name. 10. Make sure that the head of department is also one among the faculty. 11. The class that meets on different days can not be recorded without a room detail. 12. Sometimes the name of a student exceeds the defined column width. Hence accommodate full name of the student. 13. Age is a derived value, hence date of birth of a student can be stored instead of his/her age. 14. Ensure that a students' date of born can not be earlier than 1990. 15. Due to various reasons, a student may withdraw from the course(s) in which he/she enrolled. Hence while removing the information pertained to a student ensure that his/her corresponding class enrolled details are also removed. What you have to submit: 1. Schema Diagram with constraints 2. Demo script file

Potrebbero piacerti anche