for every attribute A in R K corresponds to the key constraint in the student

For every attribute a in r k corresponds to the key

This preview shows page 26 - 34 out of 40 pages.

[ 𝑨 ] for every attribute A in R K - corresponds to the key constraint in the student relation schema R - corresponds to the student schema r - corresponds to an instance of the student schema A - corresponds to an attribute in the student schema, e.g. student_Grade
Image of page 26

Subscribe to view the full document.

Key Constraints Enterprise User Requirements Specification Advanced Database Systems Slide 27 of 40 student_ID student_CourseCode student_Semester student_Grade STUDENT SCHEMA KEY CONSTRAINT Minimality property : No subset of a primary key can be designated as another primary key in the same relation schema Uniqueness property : a relation instance, r, satisfies the uniqueness property if it does not contain a pair of distinct tuples whose values agree on all the attributes of a constraint K
Image of page 27
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 28

Subscribe to view the full document.

Referential Integrity Referential integrity requires that the referenced tuple exist (when the semantics of the data so requires) An important type of referential integrity is the foreign- key constraint Enterprise User Requirements Specification Advanced Database Systems Slide 29 of 40
Image of page 29
Referential Integrity We can have relation schemas, R 1 and R 2 (not necessarily distinct) We can also have an attribute or a pair of attributes, S 1 and S 2 , such that: ? ? ? ? , ? ? ? ? ? ? is a key of R 2 The number of attributes and their respective domains in S 1 and S 2 are the same A pair of instances, r 1 and r 2 , satisfies a foreign key constraint ( S 1 , S 2 ) if for every tuple 𝒕 ? 𝒓 ? , 𝒕 ? ? ? = 𝒕 ? ? ? for some tuple 𝒕 ? 𝒓 ? or 𝒕 ? ? ? is NULL Please refer to the following link for further reading : - or-duplicate Enterprise User Requirements Specification Advanced Database Systems Slide 30 of 40
Image of page 30

Subscribe to view the full document.

Referential Integrity Further explanation of the last point in the previous slide: A business has a client. The client has made several transactions (of which are financial). The contract between the client and the business ends. As per the business rules the client record is subsequently deleted, however the financial records still need to be stored for Business Intelligence/Business Analytics/Financial reporting purposes in future. The transactions associated with the deleted client record would then refer to a NULL client_ID key in this case. This would be a “SET NULL ON DELETE” option as we will see later in the semester Enterprise User Requirements Specification Advanced Database Systems Slide 31 of 40
Image of page 31
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 32

Subscribe to view the full document.

Semantic Constraints Semantic constraints implement a business rule or convention in a particular enterprise This is as opposed to being concerned with the structure of the data Semantic constraints are derived from the particular application domain being modeled by the database For example : no employee can earn more than the boss (it does not talk about the employee ID being unique or referencing another attribute) Enterprise User Requirements Specification Advanced Database Systems Slide 33 of 40
Image of page 33
Image of page 34
  • 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