You are on page 1of 11


Page 1


2011/CS/035 2011/CS/087 2011/CS/151 2011/CS/187 2011/CS/219


Page 2

A university has several departments and these departments and these departments employ professors for purposes of teaching, research and administration. A department may have many professors but has to employ at least five. A professor, however, belongs to only one department at any time. In addition to teaching, some of the professors may work as department heads. Each department has a department head, but no more than one. Every department should continue to exist as long as it has at least one professor associated with it or it offers at least one course. If a faculty member serving as a department head leaves the university, some other professor (often, the most senior faculty member of the department) assumes the role by default. The departments may offer several courses as part of their academic mission. However, any particular course is offered by only one department. Not all courses are offered all the time- but, every course is offered sometime. When offered, multiple sections of some of the courses may be offered during a semester in a year. If a particular course is no longer offered, all offerings (sections) of that course should be deleted unless there are students enrolled in the course sections. If, however, a student leaves, that student's enrollment in all associated course sections should be removed. A course may have no more than one prerequisite for several other courses, but a course may have no more than one prerequisite. A course cannot be removed from the database as long as it is a prerequisite for other course(s); however, if it only has prerequisites, then its deletion should be accompanied by the removal of its links to all of its prerequisites, then its deletion should be accompanied by the removal of its links to all of its prerequisites. Some professor may be co-authoring a book, but all textbooks used by the university need not have one of its professors as an author. Some professors are also authors of multiple textbooks. There is no plan to record authorship of professors that are not working in the university. When a professor leaves the university, the university no longer keeps track of books written by that professor. Likewise, if a textbook is no longer in use, the authorship of the textbook is not preserved either. The system also needs to record which professor uses what book in which course. However, if a course is removed from the catalogue, its link to a professor using a particular textbook is also removed. Likewise, if a faculty member leaved the university, the link to the textbook used by the professor in a specific course is also deleted. All professors teach, and a professor may teach several course sections. A course section, however, is taught by just one professor and must have some professor assigned to teach it. Some of the course sections may have multiple lab sessions in a semester. Each lab session caters to only one course section-that is, no joint lab sessions. If a course section has an associated lab session, cancellation of the course section is not permitted. Students enroll in course sections. In fact, to remain a student, one has to take at least one course (section), but university rules forbid a student from taking more than six courses (sections) in a semester. Each section has to have at least ten students enrolled; otherwise it will be cancelled. If a student has registered for a section, the section should continue to exist. Also, when a professor is assigned to teach a section, deletion of the professor record is prohibited. The university admits mostly graduate and undergraduate students, but a few non-matriculating students are GROUP 20 Page 3

also admitted. The undergraduate students may, as part of their academic program, enroll for professional practice (company) sessions with companies. Several students may be enrolled in the same company session has at least one undergraduate student enrolled in it. An undergraduate student can have 0more than one company session. When a student leaves the university for whatever reason, if it is a graduate student the associated graduate student record is deleted from the database; but, if it is an undergraduate student, the deletion of the student record is stopped so that the company status of the student can be properly verified. If a decision is made to drop the undergraduate student information from the system all company enrollments for that student should also be erased. Cancellation of a company session is prohibited if there is/are student(s) enrolled in it. As part of their academic experience some of the graduate students are assigned to conduct one or more lab sessions. A lab session can be conducted by at most one graduate student, but some lab sessions are not assigned to any graduate student. When a student graduates, the lab sessions assigned to him/her cannot be cancelled; instead, the capability should exist to indicate that, for the present, the lab session is not handled by a graduate student. Students borrow books from a single (main) library on the campus. A student may borrow a lot of books and a book may be borrowed by several students when available. Book-returns by students are also recorded in this system. The return pattern is the same as that of borrowing. Deletion of a student record is not allowed if he or she has any borrowed books outstanding. If a book is removed from the library catalogue, all borrow and return links for that book are removed. When a student leaves, the book-return links for that student are also discarded. It is important to note that a book should have been borrowed in order for it to be returned.The registration system should capture student information like the name , address, and a unique student ID for each student. In addition the status of the student should be recorded. Thesis option and the undergraduate major (i.e the main subject stream) of each graduate student should be captured by this system. A company session is identified by year and semester and each company session has a session manager. A particular student during a particular company session works in a company and the database should record the name of the company and company assessment for the student for each company session. Every professor has a name, employee ID, office , and phone . Both professor name and employee ID have unique values. Data gathered about a department are: the department name , department code , location and phone# . For a department, the name and code are both unique. The courses offered have data on course name, credit hours, college , and course#. The course# is used to distinguish between courses. Each course may have multiple course sections with data including the classroom , class time, class size , section number, semester, and year. There is no unique identifier for course section, because the course section has existence dependency on course--section number, semester, and year together in conjunction with course# can uniquely identify course sections. The grade a student makes in a particular course should be available through the system. The lab sessions have information about the topic ; time, lab location, and the lab session number for a given course section. Attributes of textbooks include ISBN, the unique identifier, Year , Title, and Publisher . The library books, on the other hand are identified by a call#. The ISBN# and Copy# together also identify a copy of the book. The name of the book and author are also recorded. GROUP 20 Page 4



Page 5

Assumptions 1. Books are uniquely identified from its ISBN no. 2. Session no is identified as a key attribute in lab session. 3. It is assume that department head who is a professor is also included inside the entity professor. 4. The link that prerequisite has each other is not considered in the diagram so that its influence to the deletion of course is not shown. 5. Student enrollment in course section is shown clearly on the diagram but the maximum no of courses that one particular student can follow is omitted here. 6. The deletion of the information of graduate and undergraduate students is not included in the diagram 7. In the diagram the library books and text books are considered as one single entity. Mapping..

Use {course# , ProfName, ProfEmpID , ISBN} Student {StudentID , Address , Name , Status ,Undergraduate major} Graduate {StudentID} Undergraduate { StudentID } Non-matriculate { StudentID } Course { Course# , CourseName , College , CreditHours , Prerequisite form , DepName , DepCode} Course Section { Section No , ClassTiime , ClassSize , ClassRoom , Semester , Year , StudentID , Course # , ProfName , ProfEmpID , SessionNo} CompanySession { Semester , Year , SessionManager , StudentID }


Page 6

LabSession { SessionNo , Topic , Location , Time , StudentID } Professor { Name , EmpID , PhoneNo , Office , DepName , DepCode } Textbook { Title , Year , Publisher , Call , Copy# , Author , ISBN , ProfName ,ProfEmpID } Department { DepName , DepCode , Phone , Location } Return { ISBN , StudentID} Borrow { ISBN , StudentID }

Suwasetha Medical Associates (CMA) is a private hospital located in Kandy which has multiple owners. Currently it is owned by a group of medical corporations and individual physicians. For medical corporations with ownership interest in the hospital, the corporation name and headquarters are obtained. Corporation name uniquely identifies a medical corporation. The percentage ownership for each owner is also recorded. The employees working at the hospital include physicians, surgeons, nurses, and support staff. All employees except the surgeons are on an annual salary. Surgeons do not receive a salary but works for Suwasetha Medical Associates on a contract basis. As stated above it is possible for a physician to have an ownership position in the hospital. All employees have an employee number, name, gender (male or female), address and telephone number and with the exception of surgeons, all employees also have a salary. Each person who works in the hospital can be identified by an employee number. For each physician, his or her specialty is captured whereas for each surgeon data pertaining to his or her specialty and contract are captured. Contract data for surgeons include the type of contract and the length of the contract (in years). Grade and years of experience represent the specific data requirement for nurses. Dependents details of each employee is also recorded for welfare/insurance purposes. These details include the name of the dependent, gender, relationship to the employee and the birth date.A patient may have several illness and several patients may have the same illness. For each illness a code and description are recorded. In order to qualify as a patient, a patient must have at least one illness and Suwasetha keeps track of the patients those who are treated at the hospital. Data for patients consists of both personnel data and medical data. Personal data includes patient number (the unique identifier of a patient), name, gender (male or female), date of birth, address, and telephone number. Medical data includes the patient's blood type, cholesterol level, blood sugar, and the names of all patient's allergies. It should also be noted that a patient may have several allergies.


Page 7

Surgeons perform surgery on patients as needed. It is required that a surgery schedule keeps track of the operation theatre where a surgeon performs a certain surgery type on a particular patient and when that surgery type is performed. Only some patients need surgeries and others don't. A surgery code is used to identify each specific type of surgery. In addition, the name, category and special needs are also captured for each surgery type. Moreover, there is the need to keep track of nurses who can be assigned to a specific surgery type since all nurses cannot be assigned to assist in all type of surgeries. A nurse cannot be assigned to more than one surgery type. It is the policy of the hospital that all types of surgeries have number of nurses. Suwasetha maintains a list of surgery skills and each surgery skill is identified by its description and a unique skill code. A surgery type may require many surgery skills. Nurses possess one or more of these surgery skills. In order to assign a nurse to a surgery type, a nurse should possess one or more of the skills required for that surgery type. Depending on the health condition, some patients may stay at the hospital for a few days. Additional data for each in-patient consists of a required date of admission along with the patient's location (nursing unit, room number, and bed number). A nurse attends to several in-patients. No more than one nurse attends to an in-patient; but some in-patients may not have any nurse attending to them. Every physician serves as a primary care physician for number of patients. A patient is assigned one physician for primary care. Physicians prescribe medications to patients. Thus it is necessary to capture which physician(s) prescribes what medication(s) to which patient(s) along with dosage and frequency. Medications are identified by their unique medication code and also include name, quantity on hand, quantity on order and unit cost. As a medicine may interact with several other medicines, the severity of such interaction must be recorded in the system.


Page 8



Page 9

1. Owner is identified by ownerID in entity Owner. 2. PhysicianID is the identification for Physician. 3. PatientRegistrationNo works as an identity for Patient. 4. Illness is identified by illnessID. Mapping
Medication {MedicalCode , Quantity(OnHand , OnOrder) , UnitCode , Name } Employee { EmpNo , Address , TPhoneNo , Name , Gender , PhysicianID } Dependent { Gender , Name ,BDate ,Relationship ,EmpNo} Staff { Salary , EmpNo} Surgeon { ContactID , EmpNo } Nurse { Salary , Gender ,Experience , EmpID , SurgeoryCode } Illnesses { IllnessType } Have { IllnessType , PatientRegistrationNo } Surgeory {SurgeoryCode , Name , Category , SpecialNeeds , TrackOfTheatre , TimeOfPerformence , TrackOfNurce } SurgeorySkills { SkillCode , Description , EmpID }
GROUP 20 Page 10

Give { PatientRegistrationNo , NIC } Contract { Type , Length , ContractID , EmpID } Patient { PatientRegistrationNo , PatientID } InPatient { DateOfAdmission , Location(NursingUnit ,RoomNo ,BedNo) , PatientRegistrationNo , EmpID } OutPatient { PatientRegistrationNo } TrackOfPatient { NIC } Personal { Gender , BDate , Address , Number , Name , TPhoneNo , NIC } Medical { BloodSuger , BloodType , CholesterolLevel , NIC } Owner { %Ownership , OwnerID , PatientID } Physician {Speciality , OwnerID , PhysicianID } MedicalAlergyInformation { NameofAlergy , NIC } Prescribe { MedicalCode , PhysicianID , PatientRegisterNo } Performance { ContractID , PatientRegisterNo , SurgeoryCode }



Page 11