The only legal supplier numbers are ones that can be

Info icon This preview shows pages 22–24. Sign up to view the full content.

View Full Document Right Arrow Icon
The only legal supplier numbers are ones that can be represented by a character string of at least two characters, of which the first is an “S” and the remainder denote a decimal integer in the range 0 to 9999. (5-Marks) (3) All red parts must weigh less than 50 pounds. (5-Marks) (4) At most one supplier can be located in Athens at anyone time. (5-Marks) (5) Every London supplier must supply part P 2 . (5-Marks) 7. Education database contains information about an in house company education training scheme. For each training course, the database contains details of all prerequisite courses for that course and all offerings for that course; for each offering, it contains details of all teachers and all student enrollments for that offering. The database also contains information about employees. The relevant relvars as follows in outline: COURSE { COURSE#, TITLE } PREREQ { SUP-COURSE#, SUB-COURSE# } OFFERING { COURSE#, OFF#, OFFDATE, LOCATION } TEACHER { COURSE#, OFF#, EMP# } ENROLLMENT { COURSE#, OFF#, EMP#, GRADE } EMPLOYEE { EMP#, ENAME, JOB } The meaning of the PREREQ relvar is that the superior course (SUP-COURSE#) has the subordinate course (SUB-COURSE#) as an immediate prerequisite: The other should be self-explanatory. Draw a referential diagram for this database. Also give the corresponding database definition(i.e write an appropriate set of type and relvar definitions. (20-Marks) 8. (a) Write the operation that might course the applicable constraint to be violated. (10-Marks) (1) No shipment can have a quantity more than double the average of all such quantities. (2) Every project must be located in a city in which there is at least one supplier. (3) The average supplier status must be greater than 18. (4) At least one red part must weigh less than 50 pounds. (5) Supplier in London must supply more parts in total than suppliers in Paris.
Image of page 22

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
(b) Define the following terms. (10-Marks) (1) reference (2) referential integrity (3) referential constraint (4) referencing (5) referenced 9. Give SQL solutions to the following operations. (20-Marks) (1) No two project can be located in the same city. (2) The highest status supplier must not be located in the same city as the lowest status supplier. (3) Every project must be located in a city in which there is at least one supplier of that project. (4) There must exist at least one red part. 10. Write the CREATE ASSERTION to the following operations. (10-Marks) (1) Every supplier has status at least five. (2-Marks) (2) Every part has a positive weight. (2-Marks) (3) All red parts must be stored in London. (2-Marks) (4) No shipment has a total weight (part weight times shipment quantity) greater than 20,000: (2-Marks) (5) No supplier with status less than 20 can supply any part in a quantity greater than 500 (b) Define the following terms: (10-Marks) (1) The Golden Rule (2-Marks) (2) Extend Rule (2-Marks) (3) Superkey Rule (2-Marks) (4) Functional Dependency (2-Marks) (5) Triggered Procedure (2-Marks) 11. What do you understand about view, explain with reasons? (20-Marks) 12. (1) Define a view consisting of supplier numbers and part numbers for suppliers and parts that are not colocated. (5-Marks) (2) Define a view for suppliers in London.
Image of page 23
Image of page 24
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern