Dbms chapter v
Upcoming SlideShare
Loading in...5
×
 

Dbms chapter v

on

  • 70 views

 

Statistics

Views

Total Views
70
Views on SlideShare
70
Embed Views
0

Actions

Likes
0
Downloads
5
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Dbms chapter v Dbms chapter v Presentation Transcript

  • Subject Name Code Credit Hours Database System COMP 219 3 Chapter V
  • Subject Name Code Credit Hours Database System COMP 219 3 Keys • It is used to uniquely identify entities within a given entityset or a relationship set. • Keys in Entity set: • (i) Primary Key: – It is a key used to uniquely identify an entity in the entity set. – E,g, eno,rno,dno etc…
  • Subject Name Code Credit Hours Database System COMP 219 3 Keys • Super Key: • It is a set of one or more attributes that allow us to uniquely identify an entity in the entity set. Among them one must be a primary key attribute. • E.G.. Eid (primary key) and ename together can be identify an entity in entity set.
  • Subject Name Code Credit Hours Database System COMP 219 3 Keys • Candidate key: • They are minimal super keys for which no proper subset is a superkey. • E.g.. Ename and eaddr can be sufficient to identify an employee in employee set. • {eid} and {ename,eaddr} – Candidate keys
  • Subject Name Code Credit Hours Database System COMP 219 3 FOREIGN -----------------------Keys • An attribute which makes a reference to an attribute of another entity type is called foreign key
  • Subject Name Code Credit Hours Database System COMP 219 3 Key  E.g… eid Ename eaddr dno dnamedno dloc Employee – E1 Dept – E2 Foreign Ke
  • Subject Name Code Credit Hours Database System COMP 219 3 Domain • A range of values can be defined for an attribute and is called as Domain of that attribute. • E.g.. Age – attribute A • Domain (A)= {1,2,….100}
  • Subject Name Code Credit Hours Database System COMP 219 3 Keys in Relationship set: • Case 1: If the relationship set R has no attributes, then the set of attributes Primarykey(E1) U Primarykey(E2) U Primarykey (n) Case2: If the relationship set R has attributes, then the set of attributes,
  • Subject Name Code Credit Hours Database System COMP 219 3 Keys in Relationship set Primarykey(E1) U Primarykey(E2) U Primarykey (n)U{a1,a2,…an} describes an individual relationship in set R. In both cases, Primarykey(E1) U Primarykey(E2) U Primarykey (n) forms a superkey for a relationship set.