Database Relational Keys

RELATIONAL KEYS:

To access a record

  1. Super Key: an att or set of att that uniquely identifies a tuple with in a relation.combine
  2.  all att.
  3. Candidate keys: an att or set of att that uniquely identifies individual occurrences of
  4. entity type. e,g stdid, nic, passport num..
  5. Composite key: if there are no such candidate keys then we concatenate more than one
  6.  attr & it makescomposite keys e,g st.name it’s f.name & it’s address combinely can make a
  7. composite
  8. Primary key: a canditate keywhich is selected  to define a record e,g in univ we pronounce
  9. a person by it’s st.id not by it’s passport num .it’s the key which the organizatoin take as base.
  10. ]Usually a pkey s designated as underline in writing. There would be no null in primary key.
  11. alternate key : all those cand keys which are except pkey.
  12. Foreign key: an att or set of att within one relation that matches the caadidate key of
  13. some (possibly the same ) relation.It can have only two things one the info to which it s
  14. related & then null(zero) nothing else.

RELATIONAL INTEGRITY:

Rules that ensures that data is accurate.

  1. Entity Integrity: no nll in pkey ( Null: no value in a key even not space. )
  2. Referential Integrity J (of reference) if a foreign key exists in a relation,
  3. either the foreign key value must match a candidate key value of some tuple in it’s
  4. home relation or the foreign key value must be wholly null.
  5. Enterprise Constraints: enterprise =organisation ..additional rules specified by the
  6.  users or db admin of a db