Question

Introduction to Database Systems

The following is the ỤML class diagram which was discussed in class Students Departments DName 1SName majorsAbbr GradYear enr

3. Suppose we want to ensure that the foreign key Courseld values of the SECTION table records are never modified, either acc

The following is the ỤML class diagram which was discussed in class Students Departments DName 1SName majorsAbbr GradYear enrolls offers Enrollments Sections Courses Grade Title Professor OfYearOffered offeredIn A UML diagram for a university Here we assume courses are year long courses The artificial primary keys and foreign keys are added to the UML diagram to get the schemas. The schemas Departments (DId DName, Abbr) Courses (CId, Title, Deptld) Sections (SectId, Professor, YearOffered, Courseld) Students (StudentId, SName, GradYear, Majorld) Enrollments (EId, Grade, Studentld, Sectionld) Primary keys are underlined; foreign keys are in italics.
3. Suppose we want to ensure that the foreign key Courseld values of the SECTION table records are never modified, either accidentally or intentionally. That is, no section should possibly be assigned to a different course other than the course it was originally intended for. Design a trigger that intercepts a modification to this field and sets the value back to what it was
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer.)

Trigger to update CourseId to its old value, after it is being modified:

create or replace trigger update_actual_course
after update on Sections
FOR EACH ROW
begin
update Sections set CourseId= :old.CourseId
where SecId = :old.SecId;
end;

Add a comment
Know the answer?
Add Answer to:
Introduction to Database Systems The following is the ỤML class diagram which was discussed in class Students Departments DName 1SName majorsAbbr GradYear enrolls offers Enrollments Sections Courses...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • (MMU) has decided to consolidate the functionality of three small overlapping database systems, which support applications...

    (MMU) has decided to consolidate the functionality of three small overlapping database systems, which support applications for 1) teaching (e.g. instructor assignment and evaluation), for 2) registration (e.g. online course status, waiting lists), and for 3) student records (e.g. transcript generation) The resulting new system will support the following enterprise description: Professors and GTAs are assigned to teach the sections of each class being offered in a semester. At the end of the semester, they get a "team rating" (professors...

  • Create an Entity-Relationship Diagram (ERD). In the ERD include the following:

    Create an Entity-Relationship Diagram (ERD).In the ERD include the following: entities primary keys for all entities attributes - use "good" names for attributes, use only single-valued attributes relationships - use Crow's foot or UML notation; name relationships that could be ambiguous cardinality - minimum (optional/mandatory) and maximum (one or many) on both ends of the relationship - use reasonable assumptions if there is insufficient information in the descriptionStudent/Course registration system for a universityStudents have a unique identification number, first name, middle initial, last name, year...

  • DATABASE SYSTEMS Project INDIVIDUAL WORK DELIVERABLE #: SUBMISSION DATE No Group Work Allowed Apr...

    DATABASE SYSTEMS Project INDIVIDUAL WORK DELIVERABLE #: SUBMISSION DATE No Group Work Allowed April 8 Introduction to Coursework You have been approached by a University for the design and implementation of a relational database system that will provide information on the courses it offers, the academic departments that run the courses, the academic staff and the enrolled students. The system will be used mainly by the students and the academic staff. The requirement collection and analysis phase of the database...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT