To access a record
- Super Key: an att or set of att that uniquely identifies a tuple with in a relation.combine
- all att.
- Candidate keys: an att or set of att that uniquely identifies individual occurrences of
- entity type. e,g stdid, nic, passport num..
- Composite key: if there are no such candidate keys then we concatenate more than one
- attr & it makescomposite keys e,g st.name it’s f.name & it’s address combinely can make a
- Primary key: a canditate keywhich is selected to define a record e,g in univ we pronounce
- a person by it’s st.id not by it’s passport num .it’s the key which the organizatoin take as base.
- ]Usually a pkey s designated as underline in writing. There would be no null in primary key.
- alternate key : all those cand keys which are except pkey.
- Foreign key: an att or set of att within one relation that matches the caadidate key of
- some (possibly the same ) relation.It can have only two things one the info to which it s
- related & then null(zero) nothing else.
Rules that ensures that data is accurate.
- Entity Integrity: no nll in pkey ( Null: no value in a key even not space. )
- Referential Integrity J (of reference) if a foreign key exists in a relation,
- either the foreign key value must match a candidate key value of some tuple in it’s
- home relation or the foreign key value must be wholly null.
- Enterprise Constraints: enterprise =organisation ..additional rules specified by the
- users or db admin of a db