Types of keys in E-R modeling

September 17, 2016
Categorised in: Database Management System
- Super key: Allows us to identify uniquely an entity in the entity set. Example: Roll_No attribute of student distinguishes student entity from another.
- Candidate key: A superkey for which no subset is a superkey. Example: Roll_No and {Student_Name, Student_street} are candidate keys
- Primary key: It is a candidate key that is chosen by the database designer as the principle means of identifying entities within an entity set. Example: Address field should not be a primary key whereas Social Security Number can be a primary key.
- Foreign key: An attribute or set of attributes, within one relation that matches the candidate key of some relation. Example: Branch_no in Branch table is primary key. Branch_no in Staff table is foreign key that connects to Branch table.
Pratik Kataria is currently learning Springboot and Hibernate.
Technologies known and worked on: C/C++, Java, Python, JavaScript, HTML, CSS, WordPress, Angular, Ionic, MongoDB, SQL and Android.
Softwares known and worked on: Adobe Photoshop, Adobe Illustrator and Adobe After Effects.