An instance of a relation refers to the data in the relation at any particular

An instance of a relation refers to the data in the

This preview shows page 20 - 27 out of 40 pages.

An instance of a relation refers to the data in the relation at any particular point in time . For example , the instance of a relation on Monday is different from the instance of the relation on Wednesday (if changes were made between the two days). A relation schema refers to the structure of a relation together with a specification of the domain constraints and any other constraints/restrictions on possible values An instance of a relation schema R is denoted as r Enterprise User Requirements Specification Advanced Database Systems Slide 20 of 40
Image of page 20

Subscribe to view the full document.

Question 4 State whether the following integrity constraint is static or dynamic “The salary of an employee must not increase or decrease by more than 5% per transaction” Further state whether the integrity constraint above is interrelational or intrarelational
Image of page 21
Answer to Q.4 It is a dynamic IC because it restricts how the data in the database changes as opposed to restricting the values that can be stored in the database It is intrarelational because it refers to a salary stored in one relation such that the constraint on the salary does not need to refer to an employee. In so far as it is a salary, the constraint shall apply.
Image of page 22

Subscribe to view the full document.

Static and Dynamic ICs Static ICs are generally easier to implement in a database than dynamic ICs In many cases, application developers need to provide additional code that enforces dynamic constraints within the transactions that update the database It is therefore common to find the Database Administration team and the Application Development team working closely together In fact in small organizations or start-ups, one person can have the role of both a database administrator and a programmer at the same time Enterprise User Requirements Specification Advanced Database Systems Slide 23 of 40
Image of page 23
1. Transactions in databases 2. Integrity constraints 3. Static and dynamic ICs 4. Key constraints 5. Referential integrity 6. Semantic constraints Outline
Image of page 24

Subscribe to view the full document.

Key Constraints Enterprise User Requirements Specification Advanced Database Systems Slide 25 of 40 student_ID student_CourseCode student_Semester student_Grade STUDENT SCHEMA KEY CONSTRAINT An instance of the student relation schema satisfies the primary key constraint (the red-coloured set) if its instance does not contain a pair of tuples that agree (have the same values for) on the key constraint but disagree on the other attributes of the student schema relation
Image of page 25
Key Constraints Enterprise User Requirements Specification Advanced Database Systems Slide 26 of 40 student_ID student_CourseCode student_Semester student_Grade STUDENT SCHEMA KEY CONSTRAINT Formally: For each two tuples ( 𝒕 ? and 𝒕 ? ): 𝒕 ? 𝒓, 𝒕 ? 𝒓 If 𝒕 ? 𝑲 = 𝒕 ? [ 𝑲 ] , then 𝒕 ? [ 𝑨 ] = 𝒕 ?
Image of page 26

Subscribe to view the full document.

Image of page 27
  • Spring '18
  • Daniel Machanje

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

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes